From owner-svn-src-head@freebsd.org Sun May 20 00:22:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52E6FEEA1A5; Sun, 20 May 2018 00:22:30 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07E798631C; Sun, 20 May 2018 00:22:30 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD49B6B97; Sun, 20 May 2018 00:22:29 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K0MT37046642; Sun, 20 May 2018 00:22:29 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K0MSAl046636; Sun, 20 May 2018 00:22:28 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200022.w4K0MSAl046636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 00:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333905 - in head/sys: netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: netinet netinet6 X-SVN-Commit-Revision: 333905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 00:22:30 -0000 Author: mmacy Date: Sun May 20 00:22:28 2018 New Revision: 333905 URL: https://svnweb.freebsd.org/changeset/base/333905 Log: ip(6)_freemoptions: defer imo destruction to epoch callback task Avoid the ugly unlock / lock of the inpcbinfo where we need to figure out what kind of lock we hold by simply deferring the operation to another context. (Also a small dependency for converting the pcbinfo read lock to epoch) Modified: head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/ip_var.h head/sys/netinet6/in6_mcast.c head/sys/netinet6/in6_var.h head/sys/netinet6/ip6_var.h Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Sat May 19 23:50:54 2018 (r333904) +++ head/sys/netinet/in_mcast.c Sun May 20 00:22:28 2018 (r333905) @@ -165,8 +165,6 @@ static void inm_reap(struct in_multi *); static void inm_release(struct in_multi *); static struct ip_moptions * inp_findmoptions(struct inpcb *); -static void inp_freemoptions_internal(struct ip_moptions *); -static void inp_gcmoptions(void *, int); static int inp_get_source_filters(struct inpcb *, struct sockopt *); static int inp_join_group(struct inpcb *, struct sockopt *); static int inp_leave_group(struct inpcb *, struct sockopt *); @@ -199,10 +197,6 @@ static SYSCTL_NODE(_net_inet_ip_mcast, OID_AUTO, filte CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip_mcast_filters, "Per-interface stack-wide source filters"); -static STAILQ_HEAD(, ip_moptions) imo_gc_list = - STAILQ_HEAD_INITIALIZER(imo_gc_list); -static struct task imo_gc_task = TASK_INITIALIZER(0, inp_gcmoptions, NULL); - #ifdef KTR /* * Inline function which wraps assertions for a valid ifp. @@ -1665,46 +1659,15 @@ inp_findmoptions(struct inpcb *inp) return (imo); } -/* - * Discard the IP multicast options (and source filters). To minimize - * the amount of work done while holding locks such as the INP's - * pcbinfo lock (which is used in the receive path), the free - * operation is performed asynchronously in a separate task. - * - * SMPng: NOTE: assumes INP write lock is held. - */ -void -inp_freemoptions(struct ip_moptions *imo, struct inpcbinfo *pcbinfo) -{ - int wlock; - - if (imo == NULL) - return; - - INP_INFO_LOCK_ASSERT(pcbinfo); - wlock = INP_INFO_WLOCKED(pcbinfo); - if (wlock) - INP_INFO_WUNLOCK(pcbinfo); - else - INP_INFO_RUNLOCK(pcbinfo); - - KASSERT(imo != NULL, ("%s: ip_moptions is NULL", __func__)); - IN_MULTI_LIST_LOCK(); - STAILQ_INSERT_TAIL(&imo_gc_list, imo, imo_link); - IN_MULTI_LIST_UNLOCK(); - taskqueue_enqueue(taskqueue_thread, &imo_gc_task); - if (wlock) - INP_INFO_WLOCK(pcbinfo); - else - INP_INFO_RLOCK(pcbinfo); -} - static void -inp_freemoptions_internal(struct ip_moptions *imo) +inp_gcmoptions(epoch_context_t ctx) { + struct ip_moptions *imo; struct in_mfilter *imf; size_t idx, nmships; + imo = __containerof(ctx, struct ip_moptions, imo_epoch_ctx); + nmships = imo->imo_num_memberships; for (idx = 0; idx < nmships; ++idx) { imf = imo->imo_mfilters ? &imo->imo_mfilters[idx] : NULL; @@ -1721,20 +1684,18 @@ inp_freemoptions_internal(struct ip_moptions *imo) free(imo, M_IPMOPTS); } -static void -inp_gcmoptions(void *context, int pending) +/* + * Discard the IP multicast options (and source filters). To minimize + * the amount of work done while holding locks such as the INP's + * pcbinfo lock (which is used in the receive path), the free + * operation is deferred to the epoch callback task. + */ +void +inp_freemoptions(struct ip_moptions *imo) { - struct ip_moptions *imo; - - IN_MULTI_LIST_LOCK(); - while (!STAILQ_EMPTY(&imo_gc_list)) { - imo = STAILQ_FIRST(&imo_gc_list); - STAILQ_REMOVE_HEAD(&imo_gc_list, imo_link); - IN_MULTI_LIST_UNLOCK(); - inp_freemoptions_internal(imo); - IN_MULTI_LIST_LOCK(); - } - IN_MULTI_LIST_UNLOCK(); + if (imo == NULL) + return; + epoch_call(net_epoch_preempt, &imo->imo_epoch_ctx, inp_gcmoptions); } /* Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sat May 19 23:50:54 2018 (r333904) +++ head/sys/netinet/in_pcb.c Sun May 20 00:22:28 2018 (r333905) @@ -1382,18 +1382,14 @@ in_pcbfree(struct inpcb *inp) #ifdef MAC mac_inpcb_destroy(inp); #endif - if (!in_pcbrele_wlocked(inp)) - INP_WUNLOCK(inp); -#if defined(INET) && defined(INET6) - if (imo == NULL && im6o == NULL) - return; -#endif #ifdef INET6 - ip6_freemoptions(im6o, pcbinfo); + ip6_freemoptions(im6o); #endif #ifdef INET - inp_freemoptions(imo, pcbinfo); + inp_freemoptions(imo); #endif + if (!in_pcbrele_wlocked(inp)) + INP_WUNLOCK(inp); } /* @@ -1545,6 +1541,8 @@ in_pcbpurgeif0(struct inpcbinfo *pcbinfo, struct ifnet /* * Drop multicast group membership if we joined * through the interface being detached. + * + * XXX This can all be deferred to an epoch_call */ for (i = 0, gap = 0; i < imo->imo_num_memberships; i++) { Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Sat May 19 23:50:54 2018 (r333904) +++ head/sys/netinet/ip_var.h Sun May 20 00:22:28 2018 (r333905) @@ -36,6 +36,7 @@ #define _NETINET_IP_VAR_H_ #include +#include /* * Overlay for ip header used by other protocols (tcp, udp). @@ -95,7 +96,7 @@ struct ip_moptions { u_short imo_max_memberships; /* max memberships this socket */ struct in_multi **imo_membership; /* group memberships */ struct in_mfilter *imo_mfilters; /* source filters */ - STAILQ_ENTRY(ip_moptions) imo_link; + struct epoch_context imo_epoch_ctx; }; struct ipstat { @@ -202,7 +203,7 @@ extern struct pr_usrreqs rip_usrreqs; #define V_rsvp_on VNET(rsvp_on) #define V_drop_redirect VNET(drop_redirect) -void inp_freemoptions(struct ip_moptions *, struct inpcbinfo *); +void inp_freemoptions(struct ip_moptions *); int inp_getmoptions(struct inpcb *, struct sockopt *); int inp_setmoptions(struct inpcb *, struct sockopt *); Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Sat May 19 23:50:54 2018 (r333904) +++ head/sys/netinet6/in6_mcast.c Sun May 20 00:22:28 2018 (r333905) @@ -1616,22 +1616,19 @@ in6p_findmoptions(struct inpcb *inp) * Discard the IPv6 multicast options (and source filters). * * SMPng: NOTE: assumes INP write lock is held. + * + * XXX can all be safely deferred to epoch_call + * */ -void -ip6_freemoptions(struct ip6_moptions *imo, struct inpcbinfo *pcbinfo) + +static void +inp_gcmoptions(epoch_context_t ctx) { + struct ip6_moptions *imo; struct in6_mfilter *imf; size_t idx, nmships; - int wlock; - if (imo == NULL) - return; - INP_INFO_LOCK_ASSERT(pcbinfo); - wlock = INP_INFO_WLOCKED(pcbinfo); - if (wlock) - INP_INFO_WUNLOCK(pcbinfo); - else - INP_INFO_RUNLOCK(pcbinfo); + imo = __containerof(ctx, struct ip6_moptions, imo6_epoch_ctx); nmships = imo->im6o_num_memberships; for (idx = 0; idx < nmships; ++idx) { @@ -1648,10 +1645,14 @@ ip6_freemoptions(struct ip6_moptions *imo, struct inpc free(imo->im6o_mfilters, M_IN6MFILTER); free(imo->im6o_membership, M_IP6MOPTS); free(imo, M_IP6MOPTS); - if (wlock) - INP_INFO_WLOCK(pcbinfo); - else - INP_INFO_RLOCK(pcbinfo); +} + +void +ip6_freemoptions(struct ip6_moptions *imo) +{ + if (imo == NULL) + return; + epoch_call(net_epoch_preempt, &imo->imo6_epoch_ctx, inp_gcmoptions); } /* Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Sat May 19 23:50:54 2018 (r333904) +++ head/sys/netinet6/in6_var.h Sun May 20 00:22:28 2018 (r333905) @@ -810,7 +810,7 @@ void in6m_print(const struct in6_multi *); int in6m_record_source(struct in6_multi *, const struct in6_addr *); void in6m_release_deferred(struct in6_multi *); void in6m_release_list_deferred(struct in6_multi_head *); -void ip6_freemoptions(struct ip6_moptions *, struct inpcbinfo *); +void ip6_freemoptions(struct ip6_moptions *); int ip6_getmoptions(struct inpcb *, struct sockopt *); int ip6_setmoptions(struct inpcb *, struct sockopt *); Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Sat May 19 23:50:54 2018 (r333904) +++ head/sys/netinet6/ip6_var.h Sun May 20 00:22:28 2018 (r333905) @@ -66,6 +66,8 @@ #ifndef _NETINET6_IP6_VAR_H_ #define _NETINET6_IP6_VAR_H_ +#include + /* * IP6 reassembly queue structure. Each fragment * being reassembled is attached to one of these structures. @@ -121,6 +123,7 @@ struct ip6_moptions { u_short im6o_max_memberships; /* max memberships this socket */ struct in6_multi **im6o_membership; /* group memberships */ struct in6_mfilter *im6o_mfilters; /* source filters */ + struct epoch_context imo6_epoch_ctx; }; /* From owner-svn-src-head@freebsd.org Sun May 20 01:00:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A8EDEEADD2; Sun, 20 May 2018 01:00:57 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D3D38706E; Sun, 20 May 2018 01:00:57 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E284A708F; Sun, 20 May 2018 01:00:56 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K10uYj063131; Sun, 20 May 2018 01:00:56 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K10uJh063130; Sun, 20 May 2018 01:00:56 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200100.w4K10uJh063130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 01:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333906 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 333906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 01:00:57 -0000 Author: mmacy Date: Sun May 20 01:00:56 2018 New Revision: 333906 URL: https://svnweb.freebsd.org/changeset/base/333906 Log: epoch.h: move kernel only bits under _KERNEL Modified: head/sys/sys/epoch.h Modified: head/sys/sys/epoch.h ============================================================================== --- head/sys/sys/epoch.h Sun May 20 00:22:28 2018 (r333905) +++ head/sys/sys/epoch.h Sun May 20 01:00:56 2018 (r333906) @@ -39,8 +39,6 @@ typedef struct epoch *epoch_t; extern epoch_t global_epoch; extern epoch_t global_epoch_preempt; -DPCPU_DECLARE(int, epoch_cb_count); -DPCPU_DECLARE(struct grouptask, epoch_cb_task); struct epoch_context { void *data[2]; @@ -59,6 +57,10 @@ void epoch_wait_preempt(epoch_t epoch); void epoch_call(epoch_t epoch, epoch_context_t ctx, void (*callback) (epoch_context_t)); int in_epoch(void); +#ifdef _KERNEL +DPCPU_DECLARE(int, epoch_cb_count); +DPCPU_DECLARE(struct grouptask, epoch_cb_task); + static __inline void epoch_enter_preempt(epoch_t epoch) { @@ -83,5 +85,5 @@ epoch_exit_preempt(epoch_t epoch) if (td->td_epochnest-- == 1) epoch_exit_preempt_internal(epoch, td); } - +#endif /* _KERNEL */ #endif From owner-svn-src-head@freebsd.org Sun May 20 01:30:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 599B5EEC4E1; Sun, 20 May 2018 01:30:20 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 005986845D; Sun, 20 May 2018 01:30:20 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFFF77653; Sun, 20 May 2018 01:30:19 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K1UJuH077338; Sun, 20 May 2018 01:30:19 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K1UJKn077337; Sun, 20 May 2018 01:30:19 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805200130.w4K1UJKn077337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 01:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333907 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 01:30:20 -0000 Author: eadler Date: Sun May 20 01:30:19 2018 New Revision: 333907 URL: https://svnweb.freebsd.org/changeset/base/333907 Log: top(1): be constant in a structure This silences some warnings that are still hidden since the remainder of top(1) does not build with higher WARNS yet. Modified: head/usr.bin/top/sigconv.awk Modified: head/usr.bin/top/sigconv.awk ============================================================================== --- head/usr.bin/top/sigconv.awk Sun May 20 01:00:56 2018 (r333906) +++ head/usr.bin/top/sigconv.awk Sun May 20 01:30:19 2018 (r333907) @@ -6,8 +6,8 @@ BEGIN { print "/* This file was automatically generated */" print "/* by the awk script \"sigconv.awk\". */\n" print "struct sigdesc {" - print " char *name;" - print " int number;" + print " const char * const name;" + print " const int number;" print "};\n" print "struct sigdesc sigdesc[] = {" } From owner-svn-src-head@freebsd.org Sun May 20 01:32:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2310EEC708; Sun, 20 May 2018 01:32:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6585D687B6; Sun, 20 May 2018 01:32:29 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46C3677FD; Sun, 20 May 2018 01:32:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K1WTuC081466; Sun, 20 May 2018 01:32:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K1WSQB081461; Sun, 20 May 2018 01:32:28 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805200132.w4K1WSQB081461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 01:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333908 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 01:32:30 -0000 Author: eadler Date: Sun May 20 01:32:27 2018 New Revision: 333908 URL: https://svnweb.freebsd.org/changeset/base/333908 Log: top(1): remove use of 'register' keyword This keyword is meaningless is obscures future diffs that help clear up warnings in top. Modified: head/usr.bin/top/commands.c head/usr.bin/top/display.c head/usr.bin/top/top.c head/usr.bin/top/username.c head/usr.bin/top/utils.c Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Sun May 20 01:30:19 2018 (r333907) +++ head/usr.bin/top/commands.c Sun May 20 01:32:27 2018 (r333908) @@ -116,7 +116,7 @@ z - toggle the displaying of the system idle pro char *next_field(str) -register char *str; +char *str; { if ((str = strchr(str, ' ')) == NULL) @@ -138,8 +138,8 @@ char *str; int *intp; { - register int val = 0; - register char ch; + int val = 0; + char ch; /* if there is nothing left of the string, flag it as an error */ /* This fix is dedicated to Greg Earle */ @@ -214,10 +214,10 @@ static char *err_listem = char *err_string() { - register struct errs *errp; - register int cnt = 0; - register int first = Yes; - register int currerr = -1; + struct errs *errp; + int cnt = 0; + int first = Yes; + int currerr = -1; int stringlen; /* characters still available in "string" */ static char string[STRMAX]; @@ -279,8 +279,8 @@ int len; int err; { - register char *msg; - register int msglen; + char *msg; + int msglen; msg = err == 0 ? "Not a number" : errmsg(err); msglen = strlen(msg) + 2; @@ -308,7 +308,7 @@ char *arg; int first; { - register int arglen; + int arglen; arglen = strlen(arg); if (!first) @@ -335,10 +335,10 @@ int first; int err_compar(p1, p2) -register struct errs *p1, *p2; +struct errs *p1, *p2; { - register int result; + int result; if ((result = p1->errnum - p2->errnum) == 0) { @@ -366,8 +366,8 @@ void show_errors() { - register int cnt = 0; - register struct errs *errp = errs; + int cnt = 0; + struct errs *errp = errs; printf("%d error%s:\n\n", errcnt, errcnt == 1 ? "" : "s"); while (cnt++ < errcnt) @@ -388,7 +388,7 @@ char *kill_procs(str) char *str; { - register char *nptr; + char *nptr; int signum = SIGTERM; /* default */ int procnum; struct sigdesc *sigp; @@ -478,7 +478,7 @@ char *renice_procs(str) char *str; { - register char negate; + char negate; int prio; int procnum; int uid; Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Sun May 20 01:30:19 2018 (r333907) +++ head/usr.bin/top/display.c Sun May 20 01:32:27 2018 (r333908) @@ -126,7 +126,7 @@ int Header_lines = 7; int display_resize() { - register int lines; + int lines; /* first, deallocate any previous buffer that may have been there */ if (screenbuf != NULL) @@ -167,9 +167,9 @@ int display_updatecpus(statics) struct statics *statics; { - register int *lp; - register int lines; - register int i; + int *lp; + int lines; + int i; /* call resize to do the dirty work */ lines = display_resize(); @@ -199,10 +199,10 @@ int display_init(statics) struct statics *statics; { - register int lines; - register char **pp; - register int *ip; - register int i; + int lines; + char **pp; + int *ip; + int i; lines = display_updatecpus(statics); @@ -255,7 +255,7 @@ int mpid; double *avenrun; { - register int i; + int i; /* i_loadave also clears the screen, since it is first */ top_clear(); @@ -284,7 +284,7 @@ int mpid; double *avenrun; { - register int i; + int i; if (mpid != -1) { @@ -370,7 +370,7 @@ int total; int *brkdn; { - register int i; + int i; /* write current number of processes and remember the value */ printf("%d processes:", total); @@ -399,7 +399,7 @@ int *brkdn; { static char new[MAX_COLS]; - register int i; + int i; /* update number of processes only if it has changed */ if (ltotal != total) @@ -452,7 +452,7 @@ int *brkdn; char *cpustates_tag() { - register char *use; + char *use; static char *short_tag = "CPU: "; static char *long_tag = "CPU states: "; @@ -480,10 +480,10 @@ i_cpustates(states) int *states; { - register int i = 0; - register int value; - register char **names; - register char *thisname; + int i = 0; + int value; + char **names; + char *thisname; int cpu; for (cpu = 0; cpu < num_cpus; cpu++) { @@ -526,11 +526,11 @@ u_cpustates(states) int *states; { - register int value; - register char **names; - register char *thisname; - register int *lp; - register int *colp; + int value; + char **names; + char *thisname; + int *lp; + int *colp; int cpu; for (cpu = 0; cpu < num_cpus; cpu++) { @@ -577,10 +577,10 @@ void z_cpustates() { - register int i = 0; - register char **names; - register char *thisname; - register int *lp; + int i = 0; + char **names; + char *thisname; + int *lp; int cpu, value; for (cpu = 0; cpu < num_cpus; cpu++) { @@ -907,8 +907,8 @@ int line; char *thisline; { - register char *p; - register char *base; + char *p; + char *base; /* make sure we are on the correct line */ while (lastline < y_procs + line) @@ -938,9 +938,9 @@ int line; char *newline; { - register char *optr; - register int screen_line = line + Header_lines; - register char *bufferline; + char *optr; + int screen_line = line + Header_lines; + char *bufferline; /* remember a pointer to the current line in the screen buffer */ bufferline = &screenbuf[lineindex(line)]; @@ -985,8 +985,8 @@ u_endscreen(hi) int hi; { - register int screen_line = hi + Header_lines; - register int i; + int screen_line = hi + Header_lines; + int i; if (smart_terminal) { @@ -1065,7 +1065,7 @@ char *msgfmt; caddr_t a1, a2, a3; { - register int i; + int i; /* first, format the message */ (void) snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3); @@ -1116,10 +1116,10 @@ int size; int numeric; { - register char *ptr = buffer; - register char ch; - register char cnt = 0; - register char maxcnt = 0; + char *ptr = buffer; + char ch; + char cnt = 0; + char maxcnt = 0; /* allow room for null terminator */ size -= 1; @@ -1198,10 +1198,10 @@ int numeric; static int string_count(pp) -register char **pp; +char **pp; { - register int cnt; + int cnt; cnt = 0; while (*pp++ != NULL) @@ -1215,12 +1215,12 @@ static void summary_format(str, numbers, names) char *str; int *numbers; -register char **names; +char **names; { - register char *p; - register int num; - register char *thisname; + char *p; + int num; + char *thisname; char rbuf[6]; /* format each number followed by its string */ @@ -1274,16 +1274,16 @@ register char **names; static void line_update(old, new, start, line) -register char *old; -register char *new; +char *old; +char *new; int start; int line; { - register int ch; - register int diff; - register int newcol = start + 1; - register int lastcol = start; + int ch; + int diff; + int newcol = start + 1; + int lastcol = start; char cursor_on_line = No; char *current; @@ -1404,8 +1404,8 @@ char *printable(str) char *str; { - register char *ptr; - register char ch; + char *ptr; + char ch; ptr = str; while ((ch = *ptr) != '\0') Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Sun May 20 01:30:19 2018 (r333907) +++ head/usr.bin/top/top.c Sun May 20 01:32:27 2018 (r333908) @@ -245,9 +245,9 @@ int argc; char *argv[]; { - register int i; - register int active_procs; - register int change; + int i; + int active_procs; + int change; struct system_info system_info; struct statics statics; Modified: head/usr.bin/top/username.c ============================================================================== --- head/usr.bin/top/username.c Sun May 20 01:30:19 2018 (r333907) +++ head/usr.bin/top/username.c Sun May 20 01:32:27 2018 (r333908) @@ -76,7 +76,7 @@ char *username(uid) int uid; { - register int hashindex; + int hashindex; hashindex = hashit(uid); if (is_empty_hash(hashindex) || (hash_table[hashindex].uid != uid)) @@ -117,7 +117,7 @@ char *name; int wecare; /* 1 = enter it always, 0 = nice to have */ { - register int hashindex; + int hashindex; #ifdef DEBUG fprintf(stderr, "enter_hash(%d, %s, %d)\n", uid, name, wecare); Modified: head/usr.bin/top/utils.c ============================================================================== --- head/usr.bin/top/utils.c Sun May 20 01:30:19 2018 (r333907) +++ head/usr.bin/top/utils.c Sun May 20 01:32:27 2018 (r333908) @@ -26,7 +26,7 @@ int atoiwi(str) char *str; { - register int len; + int len; len = strlen(str); if (len != 0) @@ -65,10 +65,10 @@ _Static_assert(sizeof(int) <= 4, "buffer too small for char *itoa(val) -register int val; +int val; { - register char *ptr; + char *ptr; static char buffer[16]; /* result is built here */ /* 16 is sufficient since the largest number we will ever convert will be 2^32-1, @@ -96,10 +96,10 @@ register int val; char *itoa7(val) -register int val; +int val; { - register char *ptr; + char *ptr; static char buffer[16]; /* result is built here */ /* 16 is sufficient since the largest number we will ever convert will be 2^32-1, @@ -133,7 +133,7 @@ int digits(val) int val; { - register int cnt = 0; + int cnt = 0; while (val > 0) { @@ -150,8 +150,8 @@ int val; char *strecpy(to, from) -register char *to; -register char *from; +char *to; +char *from; { while ((*to++ = *from++) != '\0'); @@ -168,7 +168,7 @@ char *string; char **array; { - register int i = 0; + int i = 0; while (*array != NULL) { @@ -195,13 +195,13 @@ char *line; int *cntp; { - register char *from; - register char *to; - register int cnt; - register int ch; + char *from; + char *to; + int cnt; + int ch; int length; int lastch; - register char **argv; + char **argv; char **argarray; char *args; @@ -278,15 +278,15 @@ long percentages(cnt, out, new, old, diffs) int cnt; int *out; -register long *new; -register long *old; +long *new; +long *old; long *diffs; { - register int i; - register long change; - register long total_change; - register long *dp; + int i; + long change; + long total_change; + long *dp; long half_total; /* initialization */ @@ -375,9 +375,9 @@ char *format_time(seconds) long seconds; { - register int value; - register int digit; - register char *ptr; + int value; + int digit; + char *ptr; static char result[10]; /* sanity protection */ @@ -438,9 +438,9 @@ int amt; { static char retarray[NUM_STRINGS][16]; static int index = 0; - register char *p; - register char *ret; - register char tag = 'K'; + char *p; + char *ret; + char tag = 'K'; p = ret = retarray[index]; index = (index + 1) % NUM_STRINGS; @@ -470,9 +470,9 @@ unsigned long long amt; { static char retarray[NUM_STRINGS][16]; static int index = 0; - register char *p; - register char *ret; - register char tag = 'K'; + char *p; + char *ret; + char tag = 'K'; p = ret = retarray[index]; index = (index + 1) % NUM_STRINGS; From owner-svn-src-head@freebsd.org Sun May 20 02:14:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3B86EEDEEA; Sun, 20 May 2018 02:14:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76B7F69ADE; Sun, 20 May 2018 02:14:29 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58C4F7F66; Sun, 20 May 2018 02:14:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K2ETu1002250; Sun, 20 May 2018 02:14:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K2ESYM002245; Sun, 20 May 2018 02:14:28 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805200214.w4K2ESYM002245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 02:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333909 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 02:14:30 -0000 Author: eadler Date: Sun May 20 02:14:27 2018 New Revision: 333909 URL: https://svnweb.freebsd.org/changeset/base/333909 Log: top(1): Quiesce several warnings This is all warnings at level six (6) that are not char-subscripts, incompatible-pointer-types, sign-compare, switch, int-conversion, missing-variable-declarations, cast-qual, cast-align Some warnings that are fixed by this commit are: shadow, strict-prototypes, missing-prototypes, pointer-arith, unused-parameter, unused-const-variable, and several others Modified: head/usr.bin/top/commands.c head/usr.bin/top/machine.c head/usr.bin/top/top.c head/usr.bin/top/top.h head/usr.bin/top/utils.c head/usr.bin/top/utils.h Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Sun May 20 01:32:27 2018 (r333908) +++ head/usr.bin/top/commands.c Sun May 20 02:14:27 2018 (r333909) @@ -1,6 +1,5 @@ /* * Top users/processes display for Unix - * Version 3 * * This program may be freely redistributed, * but this entire comment MUST remain intact. @@ -36,15 +35,20 @@ #include "utils.h" #include "machine.h" -extern int errno; - extern char *copyright; /* imported from screen.c */ extern int overstrike; -int err_compar(); -char *err_string(); +static int err_compar(const void *p1, const void *p2); + +struct errs /* structure for a system-call error */ +{ + int errnum; /* value of errno (that is, the actual error) */ + char *arg; /* argument that caused the error */ +}; + +char *err_string(void); static int str_adderr(char *str, int len, int err); static int str_addarg(char *str, int len, char *arg, int first); @@ -114,10 +118,8 @@ z - toggle the displaying of the system idle pro * Utility routines that help with some of the commands. */ -char *next_field(str) - -char *str; - +static char * +next_field(char *str) { if ((str = strchr(str, ' ')) == NULL) { @@ -131,7 +133,7 @@ char *str; return(*str == '\0' ? NULL : str); } -int +static int scanint(str, intp) char *str; @@ -178,12 +180,6 @@ int *intp; #define ERRMAX 20 -struct errs /* structure for a system-call error */ -{ - int errnum; /* value of errno (that is, the actual error) */ - char *arg; /* argument that caused the error */ -}; - static struct errs errs[ERRMAX]; static int errcnt; static char *err_toomany = " too many errors occurred"; @@ -212,7 +208,6 @@ static char *err_listem = #define STRMAX 80 char *err_string() - { struct errs *errp; int cnt = 0; @@ -282,7 +277,7 @@ int err; char *msg; int msglen; - msg = err == 0 ? "Not a number" : errmsg(err); + msg = err == 0 ? "Not a number" : strerror(err); msglen = strlen(msg) + 2; if (len <= msglen) { @@ -332,17 +327,18 @@ int first; * for sorting errors. */ -int -err_compar(p1, p2) - -struct errs *p1, *p2; - +static int +err_compar(const void *p1, const void *p2) { int result; + struct errs * g1 = (struct errs *)p1; + struct errs * g2 = (struct errs *)p2; - if ((result = p1->errnum - p2->errnum) == 0) + + + if ((result = g1->errnum - g2->errnum) == 0) { - return(strcmp(p1->arg, p2->arg)); + return(strcmp(g1->arg, g2->arg)); } return(result); } @@ -373,7 +369,7 @@ show_errors() while (cnt++ < errcnt) { printf("%5s: %s\n", errp->arg, - errp->errnum == 0 ? "Not a number" : errmsg(errp->errnum)); + errp->errnum == 0 ? "Not a number" : strerror(errp->errnum)); errp++; } } @@ -383,10 +379,8 @@ show_errors() * command does; invoked in response to 'k'. */ -char *kill_procs(str) - -char *str; - +char * +kill_procs(char *str) { char *nptr; int signum = SIGTERM; /* default */ @@ -473,10 +467,8 @@ char *str; * "renice" command does; invoked in response to 'r'. */ -char *renice_procs(str) - -char *str; - +char * +renice_procs(char *str) { char negate; int prio; Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Sun May 20 01:32:27 2018 (r333908) +++ head/usr.bin/top/machine.c Sun May 20 02:14:27 2018 (r333909) @@ -1,20 +1,12 @@ /* * top - a top users display for Unix * - * SYNOPSIS: For FreeBSD-2.x and later - * * DESCRIPTION: * Originally written for BSD4.4 system by Christos Zoulas. * Ported to FreeBSD 2.x by Steven Wallace && Wolfram Schneider * Order support hacked in from top-3.5beta6/machine/m_aix41.c * by Monte Mitzelfelt (for latest top see http://www.groupsys.com/topinfo/) * - * This is the machine-dependent module for FreeBSD 2.2 - * Works for: - * FreeBSD 2.2.x, 3.x, 4.x, and probably FreeBSD 2.1.x - * - * LIBS: -lkvm - * * AUTHOR: Christos Zoulas * Steven Wallace * Wolfram Schneider @@ -580,7 +572,7 @@ get_system_info(struct system_info *si) arc_stats[3] = arc_stat >> 10; GETSYSCTL("kstat.zfs.misc.arcstats.hdr_size", arc_stat); GETSYSCTL("kstat.zfs.misc.arcstats.l2_hdr_size", arc_stat2); - arc_stats[4] = arc_stat + arc_stat2 >> 10; + arc_stats[4] = (arc_stat + arc_stat2) >> 10; GETSYSCTL("kstat.zfs.misc.arcstats.other_size", arc_stat); arc_stats[5] = arc_stat >> 10; si->arc = arc_stats; @@ -938,7 +930,7 @@ get_process_info(struct system_info *si, struct proces static char fmt[512]; /* static area where result is built */ char * -format_next_process(caddr_t handle, char *(*get_userid)(int), int flags) +format_next_process(caddr_t xhandle, char *(*get_userid)(int), int flags) { struct kinfo_proc *pp; const struct kinfo_proc *oldp; @@ -956,7 +948,7 @@ format_next_process(caddr_t handle, char *(*get_userid const int cmdlen = 128; /* find and remember the next proc structure */ - hp = (struct handle *)handle; + hp = (struct handle *)xhandle; pp = *(hp->next_proc++); hp->remaining--; @@ -1001,11 +993,8 @@ format_next_process(caddr_t handle, char *(*get_userid } /* fall through */ case SSLEEP: - if (pp->ki_wmesg != NULL) { - sprintf(status, "%.6s", pp->ki_wmesg); - break; - } - /* FALLTHROUGH */ + sprintf(status, "%.6s", pp->ki_wmesg); + break; default: if (state >= 0 && Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Sun May 20 01:32:27 2018 (r333908) +++ head/usr.bin/top/top.c Sun May 20 02:14:27 2018 (r333909) @@ -83,9 +83,7 @@ int pcpu_stats = No; /* signal handling routines */ sigret_t leave(); sigret_t tstop(); -#ifdef SIGWINCH sigret_t top_winch(int); -#endif volatile sig_atomic_t leaveflag; volatile sig_atomic_t tstopflag; @@ -105,9 +103,6 @@ jmp_buf jmp_int; /* routines that don't return int */ char *username(); -char *ctime(); -char *kill_procs(); -char *renice_procs(); extern int (*compares[])(); time_t time(); @@ -282,12 +277,6 @@ char *argv[]; struct timeval timeout; char *order_name = NULL; int order_index = 0; -#ifndef FD_SET - /* FD_SET and friends are not present: fake it */ - typedef int fd_set; -#define FD_ZERO(x) (*(x) = 0) -#define FD_SET(f, x) (*(x) = 1< #include -int atoiwi(str) - -char *str; - +int +atoiwi(char *str) { int len; @@ -148,11 +146,8 @@ int val; * to the END of the string "to". */ -char *strecpy(to, from) - -char *to; -char *from; - +char * +strecpy(char *to, char *from) { while ((*to++ = *from++) != '\0'); return(--to); @@ -327,33 +322,6 @@ long *diffs; return(total_change); } -/* - * errmsg(errnum) - return an error message string appropriate to the - * error number "errnum". This is a substitute for the System V - * function "strerror". There appears to be no reliable way to - * determine if "strerror" exists at compile time, so I make do - * by providing something of similar functionality. For those - * systems that have strerror and NOT errlist, define - * -DHAVE_STRERROR in the module file and this function will - * use strerror. - */ - -/* externs referenced by errmsg */ - - -char *errmsg(errnum) - -int errnum; - -{ - char *msg = strerror(errnum); - if (msg != NULL) - { - return msg; - } - return("No error"); -} - /* format_time(seconds) - format number of seconds into a suitable * display that will fit within 6 characters. Note that this * routine builds its string in a static area. If it needs @@ -375,9 +343,6 @@ char *format_time(seconds) long seconds; { - int value; - int digit; - char *ptr; static char result[10]; /* sanity protection */ Modified: head/usr.bin/top/utils.h ============================================================================== --- head/usr.bin/top/utils.h Sun May 20 01:32:27 2018 (r333908) +++ head/usr.bin/top/utils.h Sun May 20 02:14:27 2018 (r333909) @@ -1,6 +1,7 @@ /* + * $FreeBSD$ + * * Top users/processes display for Unix - * Version 3 * * This program may be freely redistributed, * but this entire comment MUST remain intact. @@ -9,18 +10,15 @@ * Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University */ -/* prototypes for functions found in utils.c */ - -int atoiwi(); -char *itoa(); -char *itoa7(); -int digits(); -char *strecpy(); -char **argparse(); -long percentages(); -char *errmsg(); -char *format_time(); -char *format_k(); +int atoiwi(char *); +char *itoa(int); +char *itoa7(int); +int digits(int); +char *strecpy(char *, char *); +char **argparse(char *, int *); +long percentages(int, int *, long *, long *, long *); +char *format_time(long); +char *format_k(int); char *format_k2(unsigned long long); int string_index(char *string, char **array); From owner-svn-src-head@freebsd.org Sun May 20 02:50:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BFDCEEF437 for ; Sun, 20 May 2018 02:50:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic310-22.consmr.mail.gq1.yahoo.com (sonic310-22.consmr.mail.gq1.yahoo.com [98.137.69.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAF856AFEE for ; Sun, 20 May 2018 02:50:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1526784640; bh=9o9B/MygntYuRHz6f3qg3PpOK+hGHTwWeYxu0VEKctI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=aeXmNft5+UuA5NGxGzF6N1hRTzPl6CNLvL6EAqUw7SnYKN/PLeyAwjFX+14WDUhxpoQkp2D77843hIZ5Rrkpjyr/9nQ3BmThZwdbpIUjXCh3dLOi8lBRb0Itp/Si6o6R9m2aTB3ZmIE8YHaVJea85VIkHgabgoYRiWx+VjRSQOaVp+FpM/+abQUcepZAPVvWwYLbpByNigeMTzRvmiJ2nBpR+mjY21ODf5xzXXNbfJwWO5raZ4HxMm7g1u730lOwsA41YO/GwzXXCvvfgRVrcN5YO5b7y72q02wxc5ElttoHi3k9srokFxt8cpRP4qV10qhO42Wpkf1bYUgWCkpktA== X-YMail-OSG: fcBLcAgVM1kqNVgTM2UtBa_JALHEOe5nDhGhpgYTl3ZK1i1DcU3zqIRRu_HOX7a 2Ed8u4T7U7djLZ5sARpBsUP8DRDGjc84G2sRfzNBor6MfVJTxBVjR84H8vF8RbvCPa8xp5hLmxeo 2Y.D74P26B_Y3rDo_DVkdj16IrW8ZXnO.hAliPbhqZsQuuscLmEUYjQARBD.WZad7wL6iOY_U2qM ObAXbGEE5E.Rfq9D1x8J5bFRtVd8.cH4xvG32AhmJcDiMRshs.beNsQuktp17gIW6NwyyTqKq6Ex zjcWdgniaFf053LY41knv4j6yisNhG38n1m3QgMNCSO1Wm4.SHm63HdJv2MCDOhkKoGJ7rbpiKSm itSLwgRQqfQPNm.bpLWeieBKHgmqv7p2V31of3e4JmV0KheB.JYOdMJfmFep9Uc72Emw1OnXFFR. XTpk2_izOK1pegxevOKg1NOkv1vhaQ0IGalwnqPCQWdwr.Q.ACCEOup.n0OgPJIkVtOstSBcF5Oi QGAQRK2RuFNRxQl9_WkgEfH7WboPU.fraMBRw5TCdXo5K0z_kF9VipK6.Od.sh8svF4lnOp_mrVr GFeLiSidAbBoumaNXCq3gvnWd1L9vHrUEkaFDTM7R4rrUps8JfEGIIiBTnEsmURmLSoY- Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Sun, 20 May 2018 02:50:40 +0000 Received: from 181.52.72.201 (EHLO [192.168.0.6]) ([181.52.72.201]) by smtp425.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f1782f46b069ff459d2a9e968630c60d; Sun, 20 May 2018 02:40:32 +0000 (UTC) Subject: Re: svn commit: r333880 - head/sys/kern To: Warner Losh , Poul-Henning Kamp Cc: "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805191729.w4JHTvOo032116@repo.freebsd.org> <201805191945.w4JJjMlk017155@pdx.rh.CN85.dnsmgr.net> <6814.1526761972@critter.freebsd.dk> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <637a69d0-fbc9-552b-49fd-9d029eb592f4@FreeBSD.org> Date: Sat, 19 May 2018 21:40:32 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 02:50:42 -0000 On 19/05/2018 16:02, Warner Losh wrote: > > > On Sat, May 19, 2018 at 2:32 PM, Poul-Henning Kamp > wrote: > > -------- > In message > > > , Warner Losh writes: > > >> > Log: > >> >   Restore the all rights reserved language. > > "All Rights Reserved" is boilerplate from the old "Buenos Aires" > copyright convention, (a purely N+S American affair) and it lost > all meaning and relevance for UCB when USA ratified the Berne > Convention 60 years ago. > > > The US ratified the Berne Convention in 1989, which falls in the > middle of the 4.x BSD releases... Relevant for 4.3, but not 4.4. > > The final Buenos Aires signatory joined Berne a couple of decades > ago, rendering the convention null and void, and therefore this > boilerplate has no meaning or relevance for anybody. > > > Right, I get that. However, someone removed it. Even though it's > useless at this point, I don't believe we can remove it. > For the record, and with the usual disclaimer that I am *not* a lawyer ... I attended a talk from a lawyer from Google that explained adding the "All Rights Reserved" line didn't mean what it intended to mean previously (or much at all) but that removing it was intended as having a meaning. In sum, and while I didn't completely grasp the issue is not clear all lawyers would agree on removing the line. For old code it is what is, but perhaps the effort should be done for new code, starting here: https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/pref-license.html Feel free to take it to core and a real lawyer :). Cheers, Pedro. From owner-svn-src-head@freebsd.org Sun May 20 02:44:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9384EEEF1D0 for ; Sun, 20 May 2018 02:44:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BC146ACE8 for ; Sun, 20 May 2018 02:44:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x243.google.com with SMTP id p124-v6so10625308iod.1 for ; Sat, 19 May 2018 19:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cg+t2999BGuB9k7ChEmYFTir8Pc/UbKNqFNPisC0F9o=; b=eJhU4slrc6VVPa67FwDQhHWndOEGsKIF0MUVF11yhkFCv35S49QFRjL5S5v9vICVdf A5aDLLZ1pHvQxz6GTSO1TyNmDUjZ6//7tPztWzAyUBKV1uiDff0NSQlZ3ZqQ+7pjsuX1 4syAVCnKscbJux3gUuSvyTx6j8A1F67YhB5iT+k4kroSIueAFlVSp2A+IWntGhIHJz07 BHWldpA066vMVHfE0x7rykXBom7YBlKOaHlzwAKOMKs0bL4TWlXXeJVJwausy8ATORa7 Ftz82UYxpipRv7q+AM2Dnti8UHn31StoEXTZbtOnh2vrLiWLPQtZ2QSXoNcBGXkimYXK hPmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cg+t2999BGuB9k7ChEmYFTir8Pc/UbKNqFNPisC0F9o=; b=Y0zGoNshZ+/t6IarUThYZMdU8Pp9zSsDOHPMGg6P23DxTEQtA/UB1iylCnfbUPs7CU /0E4sA5rBirDS8hGCTL1TgNoyPEHzeIaGKBLlUuXL7ujPx1HiJeQ/RqGO3yc8B6h3v91 MY+7oY5E80b4AO6yrvOX67YzBKjiB2qylObOtVsnXJ3waSG10aItkANjz2IvBmJ3C4VH SRf8CwXS7KeAsP9lCoaippcnaAHmpxwunagNyaWd05NnY2Gg77MYsEliIyInQcWOGIin wxC/zBhCwsoCUVSM00myCCt7taF3q9kHbS6GnFK+40WIwvktHFxB9xw6ggoFquVmjtL3 qTeA== X-Gm-Message-State: ALKqPwdKfp+9XCVzzR5JJ1I8/QJdaSUa6vQmCG7F10iAYcV9VmOxkTY+ peonMZKEIL4DD80Mo7mrZZ5z298WTBJOcHtpvjXPUA== X-Google-Smtp-Source: AB8JxZpg4TEajuWDbnETJNIQyU+wD2OL9tsnKv09nv5Shf37bPTQs+xw8Efr4EGBAFxztvXxYNW8hC8sAWOnKH/7b50= X-Received: by 2002:a6b:d404:: with SMTP id l4-v6mr16744372iog.37.1526784249367; Sat, 19 May 2018 19:44:09 -0700 (PDT) MIME-Version: 1.0 References: <201805191729.w4JHTvOo032116@repo.freebsd.org> <201805191945.w4JJjMlk017155@pdx.rh.CN85.dnsmgr.net> <6814.1526761972@critter.freebsd.dk> <637a69d0-fbc9-552b-49fd-9d029eb592f4@FreeBSD.org> In-Reply-To: <637a69d0-fbc9-552b-49fd-9d029eb592f4@FreeBSD.org> From: Warner Losh Date: Sat, 19 May 2018 20:43:57 -0600 Message-ID: Subject: Re: svn commit: r333880 - head/sys/kern To: Pedro Giffuni Cc: Poul-Henning Kamp , "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 02:44:10 -0000 On Sat, May 19, 2018, 8:40 PM Pedro Giffuni wrote: > > On 19/05/2018 16:02, Warner Losh wrote: > > > > On Sat, May 19, 2018 at 2:32 PM, Poul-Henning Kamp > wrote: > >> -------- >> In message > cD5+V5Br+evussw@mail.gmail.com> >> , Warner Losh writes: >> >> >> > Log: >> >> > Restore the all rights reserved language. >> >> "All Rights Reserved" is boilerplate from the old "Buenos Aires" >> copyright convention, (a purely N+S American affair) and it lost >> all meaning and relevance for UCB when USA ratified the Berne >> Convention 60 years ago. >> > > The US ratified the Berne Convention in 1989, which falls in the middle of > the 4.x BSD releases... Relevant for 4.3, but not 4.4. > > >> The final Buenos Aires signatory joined Berne a couple of decades >> ago, rendering the convention null and void, and therefore this >> boilerplate has no meaning or relevance for anybody. >> > > Right, I get that. However, someone removed it. Even though it's useless > at this point, I don't believe we can remove it. > > For the record, and with the usual disclaimer that I am *not* a lawyer ... > > I attended a talk from a lawyer from Google that explained adding the "All > Rights Reserved" line didn't mean what it intended to mean previously (or > much at all) but that removing it was intended as having a meaning. In sum, > and while I didn't completely grasp the issue is not clear all lawyers > would agree on removing the line. > > For old code it is what is, but perhaps the effort should be done for new > code, starting here: > > > https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/pref-license.html > Looks like i missed one. I'll fix it. > Feel free to take it to core and a real lawyer :). > Been there done that already. That's why we have rehashed this like 4 times now... Warner > From owner-svn-src-head@freebsd.org Sun May 20 03:05:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 662D3EEFAF6 for ; Sun, 20 May 2018 03:05:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 726A76B95D for ; Sun, 20 May 2018 03:05:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x241.google.com with SMTP id n64-v6so17565969itb.3 for ; Sat, 19 May 2018 20:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Bdjh5guC/eW7ymjRKWZt8CiH5ws5BEpFSb8ylYiq1gc=; b=kzl3MmYKWW6GPl4UV+yu9W/kaPWtyfPdDcY2PWeT7xRoq6/ZbjkBA4OgUCptznxCgZ lqtEqGYea8eyOMetrPmY+AEncmHr1i00PYLYqeElSsx/eKaljUvwK4uhSvFE6Je+yuBs mfzNsDar/Q6WbOkJowH8r/S1q/LJJjJREfjVQcg8hiEYaP3D5kWE/9816nRkd9E6T5gD bfhmjivnyXJBop1w+jW0xK+kiiOj43/Z2QKEKAxyyl+3JXvsaDOiRDKeKYCF5WA3QKKX zvaO7bZpD0LKrqSsgJ1EAmWSBMDwLFE2DUridKnyvZcEHwB9K8KvAfuBzq7LI+klbMy8 ALfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Bdjh5guC/eW7ymjRKWZt8CiH5ws5BEpFSb8ylYiq1gc=; b=I5lGp8YvaarRa/rUE+gE8mXYgR4DizNOqGE2ueaoB7bF7gh/rDkXPI4hD0XA5zKuWo vfa+WVFeus0dHxzG57w2sxRILRgWKl18iUHIIusrgT2bhscQn1rKh40hMC3SOGht7RPi SEOpuW/9C85jnVH5S0kgnN6IEOe/kWD01+GAUZSsiZ2Gwa7skk89AF5q/WBqUtacgFU/ yc97JpFNemDThaMsC2wlJv0RiunT4I/RGXh5Rcd6oi8DEzWyiDH0MGulpIU5Ry0Dk6qp O52wKu9Tff68z9PZfS+X7VQbN6+bsM65q/oHnAw10Sm+qgFBrOvB2RqBfRCZHSNX0Ewr G2LA== X-Gm-Message-State: ALKqPwc0LSwWpQGx75RVS3cbYxNbBvGPZ3Vsx7eCe3ldtiLGXPQNjnoZ OIphPp3B6o0+HiITs42Thd8D0KetAyvzccHsyz+HZw== X-Google-Smtp-Source: AB8JxZqdqhi5/Uld25CMmjtsu7JnpdgNQW5OwSZkwUpOzhILdCEmfmmLAHFYB4OX0v3CO/TEV8eYc4gzap8OJaQxt5s= X-Received: by 2002:a24:e983:: with SMTP id f125-v6mr12762357ith.36.1526785518698; Sat, 19 May 2018 20:05:18 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:a649:0:0:0:0:0 with HTTP; Sat, 19 May 2018 20:05:18 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201805191729.w4JHTvOo032116@repo.freebsd.org> <201805191945.w4JJjMlk017155@pdx.rh.CN85.dnsmgr.net> <6814.1526761972@critter.freebsd.dk> <637a69d0-fbc9-552b-49fd-9d029eb592f4@FreeBSD.org> From: Warner Losh Date: Sat, 19 May 2018 21:05:18 -0600 X-Google-Sender-Auth: cCse92xLkwdT23GGGNCJATxdrbw Message-ID: Subject: Re: svn commit: r333880 - head/sys/kern To: Pedro Giffuni Cc: Poul-Henning Kamp , "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 03:05:20 -0000 On Sat, May 19, 2018 at 8:54 PM, Pedro Giffuni wrote: > > > On 19/05/2018 21:43, Warner Losh wrote: > > > > On Sat, May 19, 2018, 8:40 PM Pedro Giffuni wrote: > >> >> On 19/05/2018 16:02, Warner Losh wrote: >> >> >> >> On Sat, May 19, 2018 at 2:32 PM, Poul-Henning Kamp >> wrote: >> >>> -------- >>> In message >> mail.gmail.com> >>> , Warner Losh writes: >>> >>> >> > Log: >>> >> > Restore the all rights reserved language. >>> >>> "All Rights Reserved" is boilerplate from the old "Buenos Aires" >>> copyright convention, (a purely N+S American affair) and it lost >>> all meaning and relevance for UCB when USA ratified the Berne >>> Convention 60 years ago. >>> >> >> The US ratified the Berne Convention in 1989, which falls in the middle >> of the 4.x BSD releases... Relevant for 4.3, but not 4.4. >> >> >>> The final Buenos Aires signatory joined Berne a couple of decades >>> ago, rendering the convention null and void, and therefore this >>> boilerplate has no meaning or relevance for anybody. >>> >> >> Right, I get that. However, someone removed it. Even though it's useless >> at this point, I don't believe we can remove it. >> >> For the record, and with the usual disclaimer that I am *not* a lawyer ... >> >> I attended a talk from a lawyer from Google that explained adding the >> "All Rights Reserved" line didn't mean what it intended to mean previously >> (or much at all) but that removing it was intended as having a meaning. In >> sum, and while I didn't completely grasp the issue is not clear all lawyers >> would agree on removing the line. >> >> For old code it is what is, but perhaps the effort should be done for new >> code, starting here: >> >> https://www.freebsd.org/doc/en_US.ISO8859-1/articles/ >> committers-guide/pref-license.html >> > > > Looks like i missed one. I'll fix it. > > While updating documentation, the SPDX guys also point to an outdated > version: > > https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html > Can you get this updated? > https://www.freebsd.org/copyright/freebsd-license.html > Not sure where this file comes from... With the additional mistake that they added the Documentation Project > disclaimer to the license: > > "The views and conclusions contained in the software and documentation > are those of the authors and should not be interpreted as representing > official policies, either expressed or implied, of the FreeBSD Project." > Can you get that fixed? Warner From owner-svn-src-head@freebsd.org Sun May 20 02:17:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D7DAEEE242; Sun, 20 May 2018 02:17:31 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23BA069E25; Sun, 20 May 2018 02:17:31 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFC817F79; Sun, 20 May 2018 02:17:30 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K2HU7F002401; Sun, 20 May 2018 02:17:30 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K2HUii002400; Sun, 20 May 2018 02:17:30 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200217.w4K2HUii002400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 02:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333910 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 333910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 02:17:31 -0000 Author: mmacy Date: Sun May 20 02:17:30 2018 New Revision: 333910 URL: https://svnweb.freebsd.org/changeset/base/333910 Log: in_pcb: add helper for deferring inpcb rele calls from list functions Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun May 20 02:14:27 2018 (r333909) +++ head/sys/netinet/in_pcb.c Sun May 20 02:17:30 2018 (r333910) @@ -1314,6 +1314,28 @@ in_pcbrele(struct inpcb *inp) return (in_pcbrele_wlocked(inp)); } +void +in_pcblist_rele_rlocked(epoch_context_t ctx) +{ + struct in_pcblist *il; + struct inpcb *inp; + struct inpcbinfo *pcbinfo; + int i, n; + + il = __containerof(ctx, struct in_pcblist, il_epoch_ctx); + pcbinfo = il->il_pcbinfo; + n = il->il_count; + INP_INFO_WLOCK(pcbinfo); + for (i = 0; i < n; i++) { + inp = il->il_inp_list[i]; + INP_RLOCK(inp); + if (!in_pcbrele_rlocked(inp)) + INP_RUNLOCK(inp); + } + INP_INFO_WUNLOCK(pcbinfo); + free(il, M_TEMP); +} + /* * Unconditionally schedule an inpcb to be freed by decrementing its * reference count, which should occur only after the inpcb has been detached Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Sun May 20 02:14:27 2018 (r333909) +++ head/sys/netinet/in_pcb.h Sun May 20 02:17:30 2018 (r333910) @@ -41,6 +41,7 @@ #define _NETINET_IN_PCB_H_ #include +#include #include #include #include @@ -407,6 +408,13 @@ struct inpcbport { u_short phd_port; }; +struct in_pcblist { + int il_count; + struct epoch_context il_epoch_ctx; + struct inpcbinfo *il_pcbinfo; + struct inpcb *il_inp_list[0]; +}; + /*- * Global data structure for each high-level protocol (UDP, TCP, ...) in both * IPv4 and IPv6. Holds inpcb lists and information for managing them. @@ -829,6 +837,7 @@ void in_pcbrehash_mbuf(struct inpcb *, struct mbuf *); int in_pcbrele(struct inpcb *); int in_pcbrele_rlocked(struct inpcb *); int in_pcbrele_wlocked(struct inpcb *); +void in_pcblist_rele_rlocked(epoch_context_t ctx); void in_losing(struct inpcb *); void in_pcbsetsolabel(struct socket *so); int in_getpeeraddr(struct socket *so, struct sockaddr **nam); From owner-svn-src-head@freebsd.org Sun May 20 02:27:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76BCEEEE803; Sun, 20 May 2018 02:27:59 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468C76A3A4; Sun, 20 May 2018 02:27:59 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27ABC10128; Sun, 20 May 2018 02:27:59 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K2RxEH007427; Sun, 20 May 2018 02:27:59 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K2Rwhh007423; Sun, 20 May 2018 02:27:58 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200227.w4K2Rwhh007423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 02:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333911 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 333911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 02:27:59 -0000 Author: mmacy Date: Sun May 20 02:27:58 2018 New Revision: 333911 URL: https://svnweb.freebsd.org/changeset/base/333911 Log: inpcb: consolidate possible deletion in pcblist functions in to epoch deferred context. Modified: head/sys/netinet/ip_divert.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_subr.c head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Sun May 20 02:17:30 2018 (r333910) +++ head/sys/netinet/ip_divert.c Sun May 20 02:27:58 2018 (r333911) @@ -550,6 +550,7 @@ div_detach(struct socket *so) KASSERT(inp != NULL, ("div_detach: inp == NULL")); INP_INFO_WLOCK(&V_divcbinfo); INP_WLOCK(inp); + /* XXX defer destruction to epoch_call */ in_pcbdetach(inp); in_pcbfree(inp); INP_INFO_WUNLOCK(&V_divcbinfo); @@ -629,6 +630,7 @@ static int div_pcblist(SYSCTL_HANDLER_ARGS) { int error, i, n; + struct in_pcblist *il; struct inpcb *inp, **inp_list; inp_gen_t gencnt; struct xinpgen xig; @@ -668,9 +670,8 @@ div_pcblist(SYSCTL_HANDLER_ARGS) if (error) return error; - inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK); - if (inp_list == NULL) - return ENOMEM; + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO); + inp_list = il->il_inp_list; INP_INFO_RLOCK(&V_divcbinfo); for (inp = LIST_FIRST(V_divcbinfo.ipi_listhead), i = 0; inp && i < n; @@ -699,14 +700,9 @@ div_pcblist(SYSCTL_HANDLER_ARGS) } else INP_RUNLOCK(inp); } - INP_INFO_WLOCK(&V_divcbinfo); - for (i = 0; i < n; i++) { - inp = inp_list[i]; - INP_RLOCK(inp); - if (!in_pcbrele_rlocked(inp)) - INP_RUNLOCK(inp); - } - INP_INFO_WUNLOCK(&V_divcbinfo); + il->il_count = n; + il->il_pcbinfo = &V_divcbinfo; + epoch_call(net_epoch_preempt, &il->il_epoch_ctx, in_pcblist_rele_rlocked); if (!error) { /* @@ -723,7 +719,6 @@ div_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RUNLOCK(&V_divcbinfo); error = SYSCTL_OUT(req, &xig, sizeof xig); } - free(inp_list, M_TEMP); return error; } @@ -803,6 +798,7 @@ div_modevent(module_t mod, int type, void *unused) break; } ip_divert_ptr = NULL; + /* XXX defer to epoch_call ? */ err = pf_proto_unregister(PF_INET, IPPROTO_DIVERT, SOCK_RAW); INP_INFO_WUNLOCK(&V_divcbinfo); #ifndef VIMAGE Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Sun May 20 02:17:30 2018 (r333910) +++ head/sys/netinet/raw_ip.c Sun May 20 02:27:58 2018 (r333911) @@ -851,6 +851,7 @@ rip_detach(struct socket *so) ip_rsvp_force_done(so); if (so == V_ip_rsvpd) ip_rsvp_done(); + /* XXX defer to epoch_call */ in_pcbdetach(inp); in_pcbfree(inp); INP_INFO_WUNLOCK(&V_ripcbinfo); @@ -1020,6 +1021,7 @@ static int rip_pcblist(SYSCTL_HANDLER_ARGS) { int error, i, n; + struct in_pcblist *il; struct inpcb *inp, **inp_list; inp_gen_t gencnt; struct xinpgen xig; @@ -1054,9 +1056,8 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) if (error) return (error); - inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK); - if (inp_list == NULL) - return (ENOMEM); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO); + inp_list = il->il_inp_list; INP_INFO_RLOCK(&V_ripcbinfo); for (inp = LIST_FIRST(V_ripcbinfo.ipi_listhead), i = 0; inp && i < n; @@ -1085,14 +1086,9 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) } else INP_RUNLOCK(inp); } - INP_INFO_WLOCK(&V_ripcbinfo); - for (i = 0; i < n; i++) { - inp = inp_list[i]; - INP_RLOCK(inp); - if (!in_pcbrele_rlocked(inp)) - INP_RUNLOCK(inp); - } - INP_INFO_WUNLOCK(&V_ripcbinfo); + il->il_count = n; + il->il_pcbinfo = &V_ripcbinfo; + epoch_call(net_epoch_preempt, &il->il_epoch_ctx, in_pcblist_rele_rlocked); if (!error) { /* @@ -1108,7 +1104,6 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RUNLOCK(&V_ripcbinfo); error = SYSCTL_OUT(req, &xig, sizeof xig); } - free(inp_list, M_TEMP); return (error); } Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sun May 20 02:17:30 2018 (r333910) +++ head/sys/netinet/tcp_subr.c Sun May 20 02:27:58 2018 (r333911) @@ -943,6 +943,7 @@ deregister_tcp_functions(struct tcp_function_block *bl rw_wunlock(&tcp_function_lock); VNET_LIST_RLOCK(); + /* XXX handle */ VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); INP_INFO_WLOCK(&V_tcbinfo); @@ -1732,6 +1733,7 @@ tcp_ccalgounload(struct cc_algo *unload_algo) tmpalgo = CC_ALGO(tp); /* NewReno does not require any init. */ CC_ALGO(tp) = &newreno_cc_algo; + /* XXX defer to epoch_call */ if (tmpalgo->cb_destroy != NULL) tmpalgo->cb_destroy(tp->ccv); } @@ -2102,6 +2104,7 @@ static int tcp_pcblist(SYSCTL_HANDLER_ARGS) { int error, i, m, n, pcb_count; + struct in_pcblist *il; struct inpcb *inp, **inp_list; inp_gen_t gencnt; struct xinpgen xig; @@ -2148,7 +2151,8 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (error) return (error); - inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO); + inp_list = il->il_inp_list; INP_INFO_WLOCK(&V_tcbinfo); for (inp = LIST_FIRST(V_tcbinfo.ipi_listhead), i = 0; @@ -2191,15 +2195,11 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) } else INP_RUNLOCK(inp); } - INP_INFO_RLOCK(&V_tcbinfo); - for (i = 0; i < n; i++) { - inp = inp_list[i]; - INP_RLOCK(inp); - if (!in_pcbrele_rlocked(inp)) - INP_RUNLOCK(inp); - } - INP_INFO_RUNLOCK(&V_tcbinfo); + il->il_count = n; + il->il_pcbinfo = &V_tcbinfo; + epoch_call(net_epoch_preempt, &il->il_epoch_ctx, in_pcblist_rele_rlocked); + if (!error) { /* * Give the user an updated idea of our state. @@ -2215,7 +2215,6 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) INP_LIST_RUNLOCK(&V_tcbinfo); error = SYSCTL_OUT(req, &xig, sizeof xig); } - free(inp_list, M_TEMP); return (error); } Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sun May 20 02:17:30 2018 (r333910) +++ head/sys/netinet/udp_usrreq.c Sun May 20 02:27:58 2018 (r333911) @@ -836,6 +836,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) { int error, i, n; struct inpcb *inp, **inp_list; + struct in_pcblist *il; inp_gen_t gencnt; struct xinpgen xig; @@ -873,11 +874,9 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) error = SYSCTL_OUT(req, &xig, sizeof xig); if (error) return (error); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO); + inp_list = il->il_inp_list; - inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK); - if (inp_list == NULL) - return (ENOMEM); - INP_INFO_RLOCK(&V_udbinfo); for (inp = LIST_FIRST(V_udbinfo.ipi_listhead), i = 0; inp && i < n; inp = LIST_NEXT(inp, inp_list)) { @@ -905,14 +904,9 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) } else INP_RUNLOCK(inp); } - INP_INFO_WLOCK(&V_udbinfo); - for (i = 0; i < n; i++) { - inp = inp_list[i]; - INP_RLOCK(inp); - if (!in_pcbrele_rlocked(inp)) - INP_RUNLOCK(inp); - } - INP_INFO_WUNLOCK(&V_udbinfo); + il->il_count = n; + il->il_pcbinfo = &V_udbinfo; + epoch_call(net_epoch_preempt, &il->il_epoch_ctx, in_pcblist_rele_rlocked); if (!error) { /* @@ -928,7 +922,6 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RUNLOCK(&V_udbinfo); error = SYSCTL_OUT(req, &xig, sizeof xig); } - free(inp_list, M_TEMP); return (error); } @@ -1717,6 +1710,7 @@ udp_detach(struct socket *so) INP_WLOCK(inp); up = intoudpcb(inp); KASSERT(up != NULL, ("%s: up == NULL", __func__)); + /* XXX defer to epoch_call */ inp->inp_ppcb = NULL; in_pcbdetach(inp); in_pcbfree(inp); From owner-svn-src-head@freebsd.org Sun May 20 02:54:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 901F9EEF664 for ; Sun, 20 May 2018 02:54:35 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic308-10.consmr.mail.gq1.yahoo.com (sonic308-10.consmr.mail.gq1.yahoo.com [98.137.68.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0840B6B268 for ; Sun, 20 May 2018 02:54:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1526784868; bh=KkcmVYbRCEW6jUyFc9I7NnxneLtdwFwKnjALtCB9ZBo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=pijrv/BKPSejqdEi8RFlEvGkQXQx0Y78l+J0+XAMrcvJNzF8ckGnreF2Qg4uTuJNkdZAnfFmp/av5rXRTlVNphXntC8EHDQ4+3pEYpclOg3bH5CpkI1Da7M9yd4YqO2YupYC/Oi6OY7C6+MXNhWgnwzQYrCCWR6qtD+EXkCYnxm3iXVgiXz0KlRgBGTYG6g8t5MNqipoP5CuWOA/uOI8NJCSvCPh8CeI6g6xL6Ub26TX3BDFITv4HQwcpVaWE/CXIopaWTXxWzvJL7WTyhG4XtjnEvYmeYg4xHx99RwQ58ahg4Tw/Hr4djPAh0YqyMx/1LVEuWtfslCVpoiWGn6lFQ== X-YMail-OSG: m4goB5cVM1kzm1DJf0bKWx_AjGst_Aod9mFwxynTVwrwIdR3B6bvfmWHdoL95HS bJj0O1n2qICdUdn.RH_OZSuPSRFf6Rm1upHd5u_KVHkB7L7DUY010FellsUWgmpeeBW.yATN4coW wXnaTuLSYEFcSUTSx9kejsf8MNTV5Fkj4A5AU1_grG6TdVKCi4dWppS7D_82qfMRtM9rfZsSWYgr 9Ry.yBfZJxTEm0eKy1aFi8s3CldBuxWW4hrMrvjlA6r2dol.r10c5cewQCIJZyw4RtygNarkZJfm EMFimlh3NidjAuLQiBcz7idT9RDrQx13VFTUI8YCv1020cTF6pulIRVMMcoxtiPHQKvHl5rFWKDr KlENHsMUoLHj58pBcvP12GvXhvv9X2h6TtO6KamHorB_ct1ZwjVYYSZHjPSHV3ZpsjA2EB21f7ry fffWel1t7HatI29ypzupIeG9yQcwp3.qtVAwQnM.Q7Mq35dZ13uAHnnhgoUfR4UddTJbgFaD72oC NCpGnZ7oW_6lT6ygf37ccenqFc9CQK8zboWhX73dg5fhkaWUgIP9A96I.bo2kcT7tTVsyD7tWljH Q30a4caNwgM37w2QiNO.oh5Xwxnzzu.yyMfCzMlLeX7TqXcbuInVAWE8UMFIjBSCxoZ4- Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Sun, 20 May 2018 02:54:28 +0000 Received: from 181.52.72.201 (EHLO [192.168.0.6]) ([181.52.72.201]) by smtp430.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f4c20a38dcb2a74de3be20b26735b771; Sun, 20 May 2018 02:54:25 +0000 (UTC) Subject: Re: svn commit: r333880 - head/sys/kern To: Warner Losh Cc: Poul-Henning Kamp , "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805191729.w4JHTvOo032116@repo.freebsd.org> <201805191945.w4JJjMlk017155@pdx.rh.CN85.dnsmgr.net> <6814.1526761972@critter.freebsd.dk> <637a69d0-fbc9-552b-49fd-9d029eb592f4@FreeBSD.org> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: Date: Sat, 19 May 2018 21:54:25 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 02:54:35 -0000 On 19/05/2018 21:43, Warner Losh wrote: > > > On Sat, May 19, 2018, 8:40 PM Pedro Giffuni > wrote: > > > On 19/05/2018 16:02, Warner Losh wrote: >> >> >> On Sat, May 19, 2018 at 2:32 PM, Poul-Henning Kamp >> > wrote: >> >> -------- >> In message >> > > >> , Warner Losh writes: >> >> >> > Log: >> >> >   Restore the all rights reserved language. >> >> "All Rights Reserved" is boilerplate from the old "Buenos Aires" >> copyright convention, (a purely N+S American affair) and it lost >> all meaning and relevance for UCB when USA ratified the Berne >> Convention 60 years ago. >> >> >> The US ratified the Berne Convention in 1989, which falls in the >> middle of the 4.x BSD releases... Relevant for 4.3, but not 4.4. >> >> The final Buenos Aires signatory joined Berne a couple of decades >> ago, rendering the convention null and void, and therefore this >> boilerplate has no meaning or relevance for anybody. >> >> >> Right, I get that. However, someone removed it. Even though it's >> useless at this point, I don't believe we can remove it. >> > For the record, and with the usual disclaimer that I am *not* a > lawyer ... > > I attended a talk from a lawyer from Google that explained adding > the "All Rights Reserved" line didn't mean what it intended to > mean previously (or much at all) but that removing it was intended > as having a meaning. In sum, and while I didn't completely grasp > the issue is not clear all lawyers would agree on removing the line. > > For old code it is what is, but perhaps the effort should be done > for new code, starting here: > > https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/pref-license.html > > > > Looks like i missed one. I'll fix it. > While updating documentation, the SPDX guys also point to an outdated version: https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html https://www.freebsd.org/copyright/freebsd-license.html  With the additional mistake that they added the Documentation Project disclaimer to the license:  "The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project." Cheers, Pedro. From owner-svn-src-head@freebsd.org Sun May 20 03:49:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6610EF1268 for ; Sun, 20 May 2018 03:49:14 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x236.google.com (mail-yb0-x236.google.com [IPv6:2607:f8b0:4002:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C45E6D018 for ; Sun, 20 May 2018 03:49:14 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x236.google.com with SMTP id o80-v6so4032945ybc.7 for ; Sat, 19 May 2018 20:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Hy919QA3Z2B1x1lgiRAbP5ReCeZ3iId/sRZyzeUGNEw=; b=CB+z5XRudGm4tDFElS8xQ4hQE9bTD2VeYawDG0g1sdkSgN8S4YakDmXuIUZJGWxhOh 69Z8UhhxnjbqvzniWjfNFM3pMuL13Q0k5pQxvS5vHszAklCTCEy/d4bxDg/F1LpUIzbN Hvf/81r99kt2X907wgEpsvxfHhhzB4Zvi3F8Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Hy919QA3Z2B1x1lgiRAbP5ReCeZ3iId/sRZyzeUGNEw=; b=O5C4c9WOyHqo2lqiqOF2zmhHJlV4mVxkevxbeHJmTy2B31XWqNgW0z8hZuV8Wh+w/o JUnZqKTYTjz2QwliWoVYNWy8N41iYcuo4fmyVjMvPp56haZChbCr5dcpFkDWIxCuHa7W N5y5znldgXoYsLwvZaEwT1kdD+pBafthzKu+5tGG3pUBmapGrMtZJlM/U5y2rGrr0bJ0 QwacC2i/ah5NNvSbMkwuTOvv0QANoERLIVmKPofgWJftp0VkP0eIqomqGJvXPST8xaPl CqgCwnpVEbYWxNVg/KcvCH0YklpLZnEMdiIIZ6niMfoi6MbkeDZKiicwj36EBSm+iUbJ v8PQ== X-Gm-Message-State: ALKqPwcj2DpzBi4obyGLGSWNFyqDjhuCsK0rhVpaultb99GMzbpnPgpY 74gkKKxZ0c1V6l6sLl5NIKy4mSOfWLsfyCGJTWUXEw== X-Google-Smtp-Source: AB8JxZq5/ya4/rNc2NPLG+1fG7r2cTmCFhzYi3JbUn37y2U/rzKLwre1n0QsTKlslYTFEv/tpZeXGvfz37JmvivHe50= X-Received: by 2002:a25:5644:: with SMTP id k65-v6mr8471175ybb.479.1526788153733; Sat, 19 May 2018 20:49:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Sat, 19 May 2018 20:48:43 -0700 (PDT) In-Reply-To: References: <201805191729.w4JHTvOo032116@repo.freebsd.org> <201805191945.w4JJjMlk017155@pdx.rh.CN85.dnsmgr.net> <6814.1526761972@critter.freebsd.dk> <637a69d0-fbc9-552b-49fd-9d029eb592f4@FreeBSD.org> From: Eitan Adler Date: Sat, 19 May 2018 20:48:43 -0700 Message-ID: Subject: Re: svn commit: r333880 - head/sys/kern To: Warner Losh Cc: Pedro Giffuni , Poul-Henning Kamp , "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 03:49:15 -0000 On 19 May 2018 at 20:05, Warner Losh wrote: > > > On Sat, May 19, 2018 at 8:54 PM, Pedro Giffuni wrote: >> >> >> >> On 19/05/2018 21:43, Warner Losh wrote: >> >> >> >> On Sat, May 19, 2018, 8:40 PM Pedro Giffuni wrote: >>> >>> >>> On 19/05/2018 16:02, Warner Losh wrote: >>> >>> >>> >>> On Sat, May 19, 2018 at 2:32 PM, Poul-Henning Kamp >>> wrote: >>>> >>>> -------- >>>> In message >>>> >>>> , Warner Losh writes: >>>> >>>> >> > Log: >>>> >> > Restore the all rights reserved language. >>>> >>>> "All Rights Reserved" is boilerplate from the old "Buenos Aires" >>>> copyright convention, (a purely N+S American affair) and it lost >>>> all meaning and relevance for UCB when USA ratified the Berne >>>> Convention 60 years ago. >>> >>> >>> The US ratified the Berne Convention in 1989, which falls in the middle >>> of the 4.x BSD releases... Relevant for 4.3, but not 4.4. >>> >>>> >>>> The final Buenos Aires signatory joined Berne a couple of decades >>>> ago, rendering the convention null and void, and therefore this >>>> boilerplate has no meaning or relevance for anybody. >>> >>> >>> Right, I get that. However, someone removed it. Even though it's useless >>> at this point, I don't believe we can remove it. >>> >>> For the record, and with the usual disclaimer that I am *not* a lawyer >>> ... >>> >>> I attended a talk from a lawyer from Google that explained adding the >>> "All Rights Reserved" line didn't mean what it intended to mean previously >>> (or much at all) but that removing it was intended as having a meaning. In >>> sum, and while I didn't completely grasp the issue is not clear all lawyers >>> would agree on removing the line. >>> >>> For old code it is what is, but perhaps the effort should be done for new >>> code, starting here: >>> >>> >>> https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/pref-license.html >> >> >> >> Looks like i missed one. I'll fix it. >> >> While updating documentation, the SPDX guys also point to an outdated >> version: >> >> https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html > > > Can you get this updated? > >> >> https://www.freebsd.org/copyright/freebsd-license.html > > > Not sure where this file comes from... Sending freebsd-license.xml Transmitting file data .done Committing transaction... Committed revision 51670. >> With the additional mistake that they added the Documentation Project >> disclaimer to the license: >> >> "The views and conclusions contained in the software and documentation >> are those of the authors and should not be interpreted as representing >> official policies, either expressed or implied, of the FreeBSD Project." > > > Can you get that fixed? You want me to remove the disclaimer as well? -- Eitan Adler From owner-svn-src-head@freebsd.org Sun May 20 03:52:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5D64EF1517 for ; Sun, 20 May 2018 03:52:36 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x230.google.com (mail-yb0-x230.google.com [IPv6:2607:f8b0:4002:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34BED6D4FC for ; Sun, 20 May 2018 03:52:36 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x230.google.com with SMTP id j143-v6so4035436ybg.2 for ; Sat, 19 May 2018 20:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SM1eyxYp6ycJ+OVZ69/9l06DHbtDNrrwIyQ8lgzoT9U=; b=MqrnO9uqyHwRkepld1Wsuct6apnUOTX7sSGJkMVIFdPebnpjZ5oSKRuwza2YA5DZbn aKfudWh0FHOGeDNRMxd+PMqLmoGrrekaLDsPxRw5lcKebog8Tb0sHtjH+kNvKt8EwF7W /L2uzfDMN9+k7v9I0EexBJE0TFNn1jBLswH9E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SM1eyxYp6ycJ+OVZ69/9l06DHbtDNrrwIyQ8lgzoT9U=; b=f/6UVPS0v8yiwFHSsNG61X30XHY3Y/kukPNMCL/ocoKdniEMmalK+DfPB4O6f3HerL 3BxNK+3jp42PeBxm6fhAXwCks6X7ZoMVK3th3PmCUpKZou40m6wJuXTKjw/FLVyV91be P1hsrhQxtJnjIDwyM45zDIDJapcHUoKiGM5Z5+E6hCqfKl2JMBwnFFwEjzkvWB4fTTrU yfejN+gt1+uz8OTrVykAUPHh78tTUKd1n2XWzV25qJ8Ad4SW3jDtSdQiXZpmwl/Dnk4j WoAofqgsMhTat6HswgdgsJE6MRye4ixgq3usGPiyYzw7zPWvUIkDu8ozjupu+9vnPC97 D6iQ== X-Gm-Message-State: ALKqPwfoaIJjXrL/xk3SdUrZODzOiU7WDTRU1HuIW0VBJF4chq88bzGj YtGyPuP8pTKDc1BZBloajOKL0Qg9UfDID1f0V3Uu3A== X-Google-Smtp-Source: AB8JxZqw6squiXOlHgopQTSeD8hZg46q9i9y43oVWIaI8ZR/YjnN/KJfdBmgmXrDgemWonsOF8x0sLbgtxmn76tAeI0= X-Received: by 2002:a25:bfc4:: with SMTP id q4-v6mr1427703ybm.460.1526788355702; Sat, 19 May 2018 20:52:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Sat, 19 May 2018 20:52:05 -0700 (PDT) In-Reply-To: References: <201805191729.w4JHTvOo032116@repo.freebsd.org> <201805191945.w4JJjMlk017155@pdx.rh.CN85.dnsmgr.net> <6814.1526761972@critter.freebsd.dk> <637a69d0-fbc9-552b-49fd-9d029eb592f4@FreeBSD.org> From: Eitan Adler Date: Sat, 19 May 2018 20:52:05 -0700 Message-ID: Subject: Re: svn commit: r333880 - head/sys/kern To: Warner Losh Cc: Pedro Giffuni , Poul-Henning Kamp , "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 03:52:36 -0000 On 19 May 2018 at 20:50, Warner Losh wrote: >> > >> > Can you get that fixed? >> >> You want me to remove the disclaimer as well? > > > Where's that found? doc/en_US.ISO8859-1/htdocs/copyright/freebsd-license.xml -- Eitan Adler From owner-svn-src-head@freebsd.org Sun May 20 03:50:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74F71EF137D for ; Sun, 20 May 2018 03:50:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED0B86D185 for ; Sun, 20 May 2018 03:50:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id y189-v6so17617869itb.2 for ; Sat, 19 May 2018 20:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=13yzScf2iSCGLbS06WMIq9sQKG7cDgIlVbvTAJFbOx0=; b=ttLxDFNzRBlraWdrrMBpvvtytK7+RtQ6kfMY7CuV8dABDZi6NZn7I7Cl+cUL92BER7 9rKWRarn5WXZzmuDtmW1MaGxm0SEQzGhks5rRqiJxWdSZEXpNgNECFFKeKhwfAJln8bR AmdLvrg800J1MeIrz6pbrfIJXUhl+PFDYOxFzQal5prX547FWdRi57A1BOGjmBCjgrog rJW9DRelAldH7k9YVGxo8NJtas8GFGmiAeWbQE3LBonr8CUdWOoQOVhSeZ9X69cJRBG8 Y75wvq20m/iWNwNuP+tiKM25gjsVo8++KPeYrIdBtNI537HosHinqfrGt/jM/c9dxNaD 1YVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=13yzScf2iSCGLbS06WMIq9sQKG7cDgIlVbvTAJFbOx0=; b=SMs+DPMxaSoGf2lpUHZs70YbYoz9KfaHxqbKZFk6RwlHbk4N7vEfifWeIVLC5U/mBj xsP/B0heLGYAjRq1Qkxk2VqWkf/iFwsednmoUg8L7aP85BlaRnA+TJhSus9GdxScDd+y hMwzUJiLOwu8N5hJjbi44KE0yh1C37Lcsp2OH6yBeIsGMOlmDfOl05/WGD6F/79GQ3mE M0DVDFdrsl6GoXtN7Psp7vdtDi1YgIVsyHELn8Li31ZxhonRpA/nnr59kOmBqr0ji/FA yBZGG72HWqJIfuzS7xkVc4/yLXXjUMAGIv0UPDPqy/mKBZjWMSKBNGCKJYTIEKG04tqy 7OqQ== X-Gm-Message-State: ALKqPwfXLFaHUap5RFKXkolWtYCgF0H3zjgCA3A6hzpQ9vzniKIHz0q7 hqUveb9ZKrMM1lzRuXDWFv0JtpL8tSf+zrvrnGGVhA== X-Google-Smtp-Source: AB8JxZq4z5VoXTpiexszEVOLn1y38gzQgK/Des/xiuFGDdEhxAlcFKL1pKV9boSHNhk8VcmnPI8r2wZZwTMCAWdj3ZU= X-Received: by 2002:a24:4c55:: with SMTP id a82-v6mr12567371itb.1.1526788243265; Sat, 19 May 2018 20:50:43 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:a649:0:0:0:0:0 with HTTP; Sat, 19 May 2018 20:50:42 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201805191729.w4JHTvOo032116@repo.freebsd.org> <201805191945.w4JJjMlk017155@pdx.rh.CN85.dnsmgr.net> <6814.1526761972@critter.freebsd.dk> <637a69d0-fbc9-552b-49fd-9d029eb592f4@FreeBSD.org> From: Warner Losh Date: Sat, 19 May 2018 21:50:42 -0600 X-Google-Sender-Auth: f1Cga7q7t_4mGSHfGq9eOBfqkJE Message-ID: Subject: Re: svn commit: r333880 - head/sys/kern To: Eitan Adler Cc: Pedro Giffuni , Poul-Henning Kamp , "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 03:50:44 -0000 On Sat, May 19, 2018 at 9:48 PM, Eitan Adler wrote: > On 19 May 2018 at 20:05, Warner Losh wrote: > > > > > > On Sat, May 19, 2018 at 8:54 PM, Pedro Giffuni wrote: > >> > >> > >> > >> On 19/05/2018 21:43, Warner Losh wrote: > >> > >> > >> > >> On Sat, May 19, 2018, 8:40 PM Pedro Giffuni wrote: > >>> > >>> > >>> On 19/05/2018 16:02, Warner Losh wrote: > >>> > >>> > >>> > >>> On Sat, May 19, 2018 at 2:32 PM, Poul-Henning Kamp > > >>> wrote: > >>>> > >>>> -------- > >>>> In message > >>>> > >>>> , Warner Losh writes: > >>>> > >>>> >> > Log: > >>>> >> > Restore the all rights reserved language. > >>>> > >>>> "All Rights Reserved" is boilerplate from the old "Buenos Aires" > >>>> copyright convention, (a purely N+S American affair) and it lost > >>>> all meaning and relevance for UCB when USA ratified the Berne > >>>> Convention 60 years ago. > >>> > >>> > >>> The US ratified the Berne Convention in 1989, which falls in the middle > >>> of the 4.x BSD releases... Relevant for 4.3, but not 4.4. > >>> > >>>> > >>>> The final Buenos Aires signatory joined Berne a couple of decades > >>>> ago, rendering the convention null and void, and therefore this > >>>> boilerplate has no meaning or relevance for anybody. > >>> > >>> > >>> Right, I get that. However, someone removed it. Even though it's > useless > >>> at this point, I don't believe we can remove it. > >>> > >>> For the record, and with the usual disclaimer that I am *not* a lawyer > >>> ... > >>> > >>> I attended a talk from a lawyer from Google that explained adding the > >>> "All Rights Reserved" line didn't mean what it intended to mean > previously > >>> (or much at all) but that removing it was intended as having a > meaning. In > >>> sum, and while I didn't completely grasp the issue is not clear all > lawyers > >>> would agree on removing the line. > >>> > >>> For old code it is what is, but perhaps the effort should be done for > new > >>> code, starting here: > >>> > >>> > >>> https://www.freebsd.org/doc/en_US.ISO8859-1/articles/ > committers-guide/pref-license.html > >> > >> > >> > >> Looks like i missed one. I'll fix it. > >> > >> While updating documentation, the SPDX guys also point to an outdated > >> version: > >> > >> https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html > > > > > > Can you get this updated? > > > >> > >> https://www.freebsd.org/copyright/freebsd-license.html > > > > > > Not sure where this file comes from... > > Sending freebsd-license.xml > Transmitting file data .done > Committing transaction... > Committed revision 51670. > > >> With the additional mistake that they added the Documentation Project > >> disclaimer to the license: > >> > >> "The views and conclusions contained in the software and documentation > >> are those of the authors and should not be interpreted as representing > >> official policies, either expressed or implied, of the FreeBSD Project." > > > > > > Can you get that fixed? > > You want me to remove the disclaimer as well? > Where's that found? Warner From owner-svn-src-head@freebsd.org Sun May 20 04:15:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 036B6EF2110; Sun, 20 May 2018 04:15:13 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A59E56DFA6; Sun, 20 May 2018 04:15:12 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84A011149E; Sun, 20 May 2018 04:15:12 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K4FC6D063252; Sun, 20 May 2018 04:15:12 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K4FC0N063251; Sun, 20 May 2018 04:15:12 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200415.w4K4FC0N063251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 04:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333913 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 333913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 04:15:13 -0000 Author: mmacy Date: Sun May 20 04:15:12 2018 New Revision: 333913 URL: https://svnweb.freebsd.org/changeset/base/333913 Log: epoch.h: hide proc.h->priority.h from user Modified: head/sys/sys/epoch.h Modified: head/sys/sys/epoch.h ============================================================================== --- head/sys/sys/epoch.h Sun May 20 03:23:17 2018 (r333912) +++ head/sys/sys/epoch.h Sun May 20 04:15:12 2018 (r333913) @@ -29,9 +29,12 @@ #ifndef _SYS_EPOCH_H_ #define _SYS_EPOCH_H_ +#ifdef _KERNEL #include #include +#endif +struct thread; struct epoch; typedef struct epoch *epoch_t; From owner-svn-src-head@freebsd.org Sun May 20 03:23:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D38E2EF06A2; Sun, 20 May 2018 03:23:19 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 762976C507; Sun, 20 May 2018 03:23:19 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51C5910BD8; Sun, 20 May 2018 03:23:19 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K3NJR9037988; Sun, 20 May 2018 03:23:19 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K3NH4T037981; Sun, 20 May 2018 03:23:17 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201805200323.w4K3NH4T037981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 20 May 2018 03:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333912 - in head/sys/powerpc: aim include powernv powerpc pseries X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: aim include powernv powerpc pseries X-SVN-Commit-Revision: 333912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 03:23:20 -0000 Author: jhibbits Date: Sun May 20 03:23:17 2018 New Revision: 333912 URL: https://svnweb.freebsd.org/changeset/base/333912 Log: Add support for the XIVE XICS emulation mode for POWER9 systems Summary: POWER9 systems use a new interrupt controller, XIVE, managed through OPAL firmware calls. The OPAL firmware includes support for emulating the previous generation XICS presentation layer in addition to a new "XIVE Exploitation" mode. As a stopgap until we have XIVE exploitation mode, enable XICS emulation mode so that we at least have an interrupt controller. Since the CPPR is local to the current CPU, it cannot be updated for APs when initializing on the BSP. This adds a new function, directly called by the powernv platform code, to initialize the CPPR on AP bringup. Reviewed by: nwhitehorn Differential Revision: https://reviews.freebsd.org/D15492 Modified: head/sys/powerpc/aim/mp_cpudep.c head/sys/powerpc/include/cpu.h head/sys/powerpc/include/spr.h head/sys/powerpc/powernv/opal.h head/sys/powerpc/powernv/platform_powernv.c head/sys/powerpc/powerpc/cpu.c head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/aim/mp_cpudep.c ============================================================================== --- head/sys/powerpc/aim/mp_cpudep.c Sun May 20 02:27:58 2018 (r333911) +++ head/sys/powerpc/aim/mp_cpudep.c Sun May 20 03:23:17 2018 (r333912) @@ -96,7 +96,7 @@ cpudep_ap_early_bootstrap(void) mtspr(SPR_LPID, 0); isync(); - mtspr(SPR_LPCR, LPCR_LPES); + mtspr(SPR_LPCR, lpcr); isync(); } #endif @@ -401,7 +401,7 @@ cpudep_ap_setup() case IBMPOWER9: #ifdef __powerpc64__ if (mfmsr() & PSL_HV) { - mtspr(SPR_LPCR, mfspr(SPR_LPCR) | LPCR_LPES | + mtspr(SPR_LPCR, mfspr(SPR_LPCR) | lpcr | LPCR_PECE_WAKESET); isync(); } Modified: head/sys/powerpc/include/cpu.h ============================================================================== --- head/sys/powerpc/include/cpu.h Sun May 20 02:27:58 2018 (r333911) +++ head/sys/powerpc/include/cpu.h Sun May 20 03:23:17 2018 (r333912) @@ -135,6 +135,7 @@ extern char etext[]; #ifdef __powerpc64__ extern void enter_idle_powerx(void); extern uint64_t can_wakeup; +extern register_t lpcr; #endif void cpu_halt(void); Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Sun May 20 02:27:58 2018 (r333911) +++ head/sys/powerpc/include/spr.h Sun May 20 03:23:17 2018 (r333912) @@ -215,14 +215,6 @@ #define FSL_E300C3 0x8085 #define FSL_E300C4 0x8086 -#define SPR_LPCR 0x13e /* Logical Partitioning Control */ -#define LPCR_LPES 0x008 /* Bit 60 */ -#define LPCR_PECE_DRBL (1ULL << 16) /* Directed Privileged Doorbell */ -#define LPCR_PECE_HDRBL (1ULL << 15) /* Directed Hypervisor Doorbell */ -#define LPCR_PECE_EXT (1ULL << 14) /* External exceptions */ -#define LPCR_PECE_DECR (1ULL << 13) /* Decrementer exceptions */ -#define LPCR_PECE_ME (1ULL << 12) /* Machine Check and Hypervisor */ - /* Maintenance exceptions */ #define LPCR_PECE_WAKESET (LPCR_PECE_EXT | LPCR_PECE_DECR | LPCR_PECE_ME) #define SPR_EPCR 0x133 @@ -242,7 +234,14 @@ #define SPR_HSRR0 0x13a #define SPR_HSRR1 0x13b #define SPR_LPCR 0x13e /* Logical Partitioning Control */ -#define LPCR_LPES 0x008 /* Bit 60 */ +#define LPCR_LPES 0x008 /* Bit 60 */ +#define LPCR_HVICE 0x002 /* Hypervisor Virtualization Interrupt (Arch 3.0) */ +#define LPCR_PECE_DRBL (1ULL << 16) /* Directed Privileged Doorbell */ +#define LPCR_PECE_HDRBL (1ULL << 15) /* Directed Hypervisor Doorbell */ +#define LPCR_PECE_EXT (1ULL << 14) /* External exceptions */ +#define LPCR_PECE_DECR (1ULL << 13) /* Decrementer exceptions */ +#define LPCR_PECE_ME (1ULL << 12) /* Machine Check and Hypervisor */ + /* Maintenance exceptions */ #define SPR_LPID 0x13f /* Logical Partitioning Control */ #define SPR_PTCR 0x1d0 /* Partition Table Control Register */ Modified: head/sys/powerpc/powernv/opal.h ============================================================================== --- head/sys/powerpc/powernv/opal.h Sun May 20 02:27:58 2018 (r333911) +++ head/sys/powerpc/powernv/opal.h Sun May 20 03:23:17 2018 (r333912) @@ -73,7 +73,12 @@ int opal_call(uint64_t token, ...); #define OPAL_REINIT_CPUS 70 #define OPAL_CHECK_ASYNC_COMPLETION 86 #define OPAL_I2C_REQUEST 109 +#define OPAL_INT_GET_XIRR 122 +#define OPAL_INT_SET_CPPR 123 +#define OPAL_INT_EOI 124 +#define OPAL_INT_SET_MFRR 125 #define OPAL_PCI_TCE_KILL 126 +#define OPAL_XIVE_RESET 128 /* For OPAL_PCI_SET_PE */ #define OPAL_UNMAP_PE 0 Modified: head/sys/powerpc/powernv/platform_powernv.c ============================================================================== --- head/sys/powerpc/powernv/platform_powernv.c Sun May 20 02:27:58 2018 (r333911) +++ head/sys/powerpc/powernv/platform_powernv.c Sun May 20 03:23:17 2018 (r333912) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); extern void *ap_pcpu; #endif +extern void xicp_smp_cpu_startup(void); static int powernv_probe(platform_t); static int powernv_attach(platform_t); void powernv_mem_regions(platform_t, struct mem_region *phys, int *physsz, @@ -152,14 +153,14 @@ powernv_attach(platform_t plat) mtspr(SPR_LPID, 0); isync(); - mtspr(SPR_LPCR, LPCR_LPES); + if (cpu_features2 & PPC_FEATURE2_ARCH_3_00) + lpcr |= LPCR_HVICE; + + mtspr(SPR_LPCR, lpcr); isync(); mtmsr(msr); - /* Init CPU bits */ - powernv_smp_ap_init(plat); - powernv_cpuref_init(); /* Set SLB count from device tree */ @@ -460,6 +461,8 @@ powernv_reset(platform_t platform) static void powernv_smp_ap_init(platform_t platform) { + + xicp_smp_cpu_startup(); } static void Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Sun May 20 02:27:58 2018 (r333911) +++ head/sys/powerpc/powerpc/cpu.c Sun May 20 03:23:17 2018 (r333912) @@ -240,6 +240,10 @@ SYSCTL_OPAQUE(_hw, OID_AUTO, cpu_features, CTLFLAG_RD, SYSCTL_OPAQUE(_hw, OID_AUTO, cpu_features2, CTLFLAG_RD, &cpu_features2, sizeof(cpu_features2), "LX", "PowerPC CPU features 2"); +#ifdef __powerpc64__ +register_t lpcr = LPCR_LPES; +#endif + /* Provide some user-friendly aliases for bits in cpu_features */ SYSCTL_PROC(_hw, OID_AUTO, floatingpoint, CTLTYPE_INT | CTLFLAG_RD, 0, PPC_FEATURE_HAS_FPU, cpu_feature_bit, "I", Modified: head/sys/powerpc/pseries/xics.c ============================================================================== --- head/sys/powerpc/pseries/xics.c Sun May 20 02:27:58 2018 (r333911) +++ head/sys/powerpc/pseries/xics.c Sun May 20 03:23:17 2018 (r333912) @@ -61,6 +61,9 @@ __FBSDID("$FreeBSD$"); #define XICP_IPI 2 #define MAX_XICP_IRQS (1<<24) /* 24-bit XIRR field */ +#define XIVE_XICS_MODE_EMU 0 +#define XIVE_XICS_MODE_EXP 1 + static int xicp_probe(device_t); static int xicp_attach(device_t); static int xics_probe(device_t); @@ -74,6 +77,10 @@ static void xicp_ipi(device_t, u_int); static void xicp_mask(device_t, u_int); static void xicp_unmask(device_t, u_int); +#ifdef POWERNV +void xicp_smp_cpu_startup(void); +#endif + static device_method_t xicp_methods[] = { /* Device interface */ DEVMETHOD(device_probe, xicp_probe), @@ -117,6 +124,7 @@ struct xicp_softc { int cpu; } intvecs[256]; int nintvecs; + bool xics_emu; }; static driver_t xicp_driver = { @@ -131,6 +139,8 @@ static driver_t xics_driver = { 0 }; +static uint32_t cpu_xirr[MAXCPU]; + static devclass_t xicp_devclass; static devclass_t xics_devclass; @@ -161,7 +171,8 @@ static int xicp_probe(device_t dev) { - if (!ofw_bus_is_compatible(dev, "ibm,ppc-xicp")) + if (!ofw_bus_is_compatible(dev, "ibm,ppc-xicp") && + !ofw_bus_is_compatible(dev, "ibm,opal-intc")) return (ENXIO); device_set_desc(dev, "External Interrupt Presentation Controller"); @@ -172,7 +183,8 @@ static int xics_probe(device_t dev) { - if (!ofw_bus_is_compatible(dev, "ibm,ppc-xics")) + if (!ofw_bus_is_compatible(dev, "ibm,ppc-xics") && + !ofw_bus_is_compatible(dev, "IBM,opal-xics")) return (ENXIO); device_set_desc(dev, "External Interrupt Source Controller"); @@ -205,6 +217,15 @@ xicp_attach(device_t dev) sc->cpu_range[1] += sc->cpu_range[0]; device_printf(dev, "Handling CPUs %d-%d\n", sc->cpu_range[0], sc->cpu_range[1]-1); +#ifdef POWERNV + } else if (ofw_bus_is_compatible(dev, "ibm,opal-intc")) { + /* + * For now run POWER9 XIVE interrupt controller in XICS + * compatibility mode. + */ + sc->xics_emu = true; + opal_call(OPAL_XIVE_RESET, XIVE_XICS_MODE_EMU); +#endif } else { sc->cpu_range[0] = 0; sc->cpu_range[1] = mp_ncpus; @@ -214,18 +235,26 @@ xicp_attach(device_t dev) if (mfmsr() & PSL_HV) { int i; - for (i = 0; i < sc->cpu_range[1] - sc->cpu_range[0]; i++) { - sc->mem[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &i, RF_ACTIVE); - if (sc->mem[i] == NULL) { - device_printf(dev, "Could not alloc mem " - "resource %d\n", i); - return (ENXIO); + if (sc->xics_emu) { + opal_call(OPAL_INT_SET_CPPR, 0xff); + for (i = 0; i < mp_ncpus; i++) { + opal_call(OPAL_INT_SET_MFRR, + pcpu_find(i)->pc_hwref, 0xff); } + } else { + for (i = 0; i < sc->cpu_range[1] - sc->cpu_range[0]; i++) { + sc->mem[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &i, RF_ACTIVE); + if (sc->mem[i] == NULL) { + device_printf(dev, "Could not alloc mem " + "resource %d\n", i); + return (ENXIO); + } - /* Unmask interrupts on all cores */ - bus_write_1(sc->mem[i], 4, 0xff); - bus_write_1(sc->mem[i], 12, 0xff); + /* Unmask interrupts on all cores */ + bus_write_1(sc->mem[i], 4, 0xff); + bus_write_1(sc->mem[i], 12, 0xff); + } } } #endif @@ -316,19 +345,25 @@ xicp_dispatch(device_t dev, struct trapframe *tf) uint64_t xirr, junk; int i; + sc = device_get_softc(dev); #ifdef POWERNV - if (mfmsr() & PSL_HV) { + if ((mfmsr() & PSL_HV) && !sc->xics_emu) { regs = xicp_mem_for_cpu(PCPU_GET(hwref)); KASSERT(regs != NULL, ("Can't find regs for CPU %ld", (uintptr_t)PCPU_GET(hwref))); } #endif - sc = device_get_softc(dev); for (;;) { /* Return value in R4, use the PFT call */ if (regs) { xirr = bus_read_4(regs, 4); +#ifdef POWERNV + } else if (sc->xics_emu) { + opal_call(OPAL_INT_GET_XIRR, &cpu_xirr[PCPU_GET(cpuid)], + false); + xirr = cpu_xirr[PCPU_GET(cpuid)]; +#endif } else { /* Return value in R4, use the PFT call */ phyp_pft_hcall(H_XIRR, 0, 0, 0, 0, &xirr, &junk, &junk); @@ -338,6 +373,10 @@ xicp_dispatch(device_t dev, struct trapframe *tf) if (xirr == 0) { /* No more pending interrupts? */ if (regs) bus_write_1(regs, 4, 0xff); +#ifdef POWERNV + else if (sc->xics_emu) + opal_call(OPAL_INT_SET_CPPR, 0xff); +#endif else phyp_hcall(H_CPPR, (uint64_t)0xff); break; @@ -348,6 +387,11 @@ xicp_dispatch(device_t dev, struct trapframe *tf) /* Clear IPI */ if (regs) bus_write_1(regs, 12, 0xff); +#ifdef POWERNV + else if (sc->xics_emu) + opal_call(OPAL_INT_SET_MFRR, + PCPU_GET(hwref), 0xff); +#endif else phyp_hcall(H_IPI, (uint64_t)(PCPU_GET(hwref)), 0xff); @@ -409,6 +453,9 @@ xicp_enable(device_t dev, u_int irq, u_int vector) static void xicp_eoi(device_t dev, u_int irq) { +#ifdef POWERNV + struct xicp_softc *sc; +#endif uint64_t xirr; if (irq == MAX_XICP_IRQS) /* Remap IPI interrupt to internal value */ @@ -416,9 +463,13 @@ xicp_eoi(device_t dev, u_int irq) xirr = irq | (XICP_PRIORITY << 24); #ifdef POWERNV - if (mfmsr() & PSL_HV) - bus_write_4(xicp_mem_for_cpu(PCPU_GET(hwref)), 4, xirr); - else + if (mfmsr() & PSL_HV) { + sc = device_get_softc(dev); + if (sc->xics_emu) + opal_call(OPAL_INT_EOI, xirr); + else + bus_write_4(xicp_mem_for_cpu(PCPU_GET(hwref)), 4, xirr); + } else #endif phyp_hcall(H_EOI, xirr); } @@ -428,11 +479,19 @@ xicp_ipi(device_t dev, u_int cpu) { #ifdef POWERNV + struct xicp_softc *sc; cpu = pcpu_find(cpu)->pc_hwref; - if (mfmsr() & PSL_HV) - bus_write_1(xicp_mem_for_cpu(cpu), 12, XICP_PRIORITY); - else + if (mfmsr() & PSL_HV) { + sc = device_get_softc(dev); + if (sc->xics_emu) { + int64_t rv; + rv = opal_call(OPAL_INT_SET_MFRR, cpu, XICP_PRIORITY); + if (rv != 0) + device_printf(dev, "IPI SET_MFRR result: %ld\n", rv); + } else + bus_write_1(xicp_mem_for_cpu(cpu), 12, XICP_PRIORITY); + } else #endif phyp_hcall(H_IPI, (uint64_t)cpu, XICP_PRIORITY); } @@ -490,3 +549,18 @@ xicp_unmask(device_t dev, u_int irq) } } +#ifdef POWERNV +/* This is only used on POWER9 systems with the XIVE's XICS emulation. */ +void +xicp_smp_cpu_startup(void) +{ + struct xicp_softc *sc; + + if (mfmsr() & PSL_HV) { + sc = device_get_softc(root_pic); + + if (sc->xics_emu) + opal_call(OPAL_INT_SET_CPPR, 0xff); + } +} +#endif From owner-svn-src-head@freebsd.org Sun May 20 05:06:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD151EF3F32; Sun, 20 May 2018 05:06:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EDFA6FE59; Sun, 20 May 2018 05:06:43 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5951711D13; Sun, 20 May 2018 05:06:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K56h2T088305; Sun, 20 May 2018 05:06:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K56gps088300; Sun, 20 May 2018 05:06:42 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805200506.w4K56gps088300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 05:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head/contrib/file: . doc magic magic/Magdir python src tests X-SVN-Commit-Revision: 333919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 05:06:44 -0000 Author: eadler Date: Sun May 20 05:06:42 2018 New Revision: 333919 URL: https://svnweb.freebsd.org/changeset/base/333919 Log: MFV: file 5.33 Merge the latest file(1) in. Relevent Changelog: - extend the support for ${x?:} expansions for magic descriptions - add support for ${x?:} in mime types to handle pie binaries. - add support for negative offsets (offsets from the end of file) - close the file on error when writing magic Relnotes: yes Added: head/contrib/file/magic/Magdir/beetle - copied unchanged from r333918, vendor/file/dist/magic/Magdir/beetle head/contrib/file/magic/Magdir/dbpf - copied unchanged from r333918, vendor/file/dist/magic/Magdir/dbpf head/contrib/file/magic/Magdir/measure - copied unchanged from r333918, vendor/file/dist/magic/Magdir/measure head/contrib/file/magic/Magdir/rpi - copied unchanged from r333918, vendor/file/dist/magic/Magdir/rpi head/contrib/file/magic/Magdir/tplink - copied unchanged from r333918, vendor/file/dist/magic/Magdir/tplink head/contrib/file/magic/Magdir/zip - copied unchanged from r333918, vendor/file/dist/magic/Magdir/zip head/contrib/file/src/buffer.c - copied unchanged from r333918, vendor/file/dist/src/buffer.c head/contrib/file/src/seccomp.c - copied unchanged from r333918, vendor/file/dist/src/seccomp.c Modified: head/contrib/file/ChangeLog head/contrib/file/Makefile.in head/contrib/file/README head/contrib/file/TODO head/contrib/file/aclocal.m4 head/contrib/file/compile head/contrib/file/config.guess head/contrib/file/config.h.in head/contrib/file/config.sub head/contrib/file/configure head/contrib/file/configure.ac head/contrib/file/depcomp head/contrib/file/doc/Makefile.in head/contrib/file/doc/file.man head/contrib/file/doc/magic.man head/contrib/file/install-sh head/contrib/file/ltmain.sh head/contrib/file/magic/Magdir/acorn head/contrib/file/magic/Magdir/animation head/contrib/file/magic/Magdir/apple head/contrib/file/magic/Magdir/archive head/contrib/file/magic/Magdir/audio head/contrib/file/magic/Magdir/c64 head/contrib/file/magic/Magdir/compress head/contrib/file/magic/Magdir/console head/contrib/file/magic/Magdir/elf head/contrib/file/magic/Magdir/filesystems head/contrib/file/magic/Magdir/fonts head/contrib/file/magic/Magdir/games head/contrib/file/magic/Magdir/geo head/contrib/file/magic/Magdir/gnu head/contrib/file/magic/Magdir/images head/contrib/file/magic/Magdir/intel head/contrib/file/magic/Magdir/macintosh head/contrib/file/magic/Magdir/mozilla head/contrib/file/magic/Magdir/msdos head/contrib/file/magic/Magdir/msooxml head/contrib/file/magic/Magdir/netbsd head/contrib/file/magic/Magdir/ole2compounddocs head/contrib/file/magic/Magdir/pgp head/contrib/file/magic/Magdir/revision head/contrib/file/magic/Magdir/riff head/contrib/file/magic/Magdir/sgml head/contrib/file/magic/Magdir/spectrum head/contrib/file/magic/Magdir/ssl head/contrib/file/magic/Magdir/terminfo head/contrib/file/magic/Magdir/vorbis head/contrib/file/magic/Magdir/windows head/contrib/file/magic/Makefile.am head/contrib/file/magic/Makefile.in head/contrib/file/missing head/contrib/file/python/Makefile.in head/contrib/file/src/Makefile.am head/contrib/file/src/Makefile.in head/contrib/file/src/apprentice.c head/contrib/file/src/ascmagic.c head/contrib/file/src/cdf.c head/contrib/file/src/compress.c head/contrib/file/src/encoding.c head/contrib/file/src/file.c head/contrib/file/src/file.h head/contrib/file/src/file_opts.h head/contrib/file/src/funcs.c head/contrib/file/src/is_tar.c head/contrib/file/src/readcdf.c head/contrib/file/src/readelf.c head/contrib/file/src/softmagic.c head/contrib/file/tests/Makefile.in Directory Properties: head/contrib/file/ (props changed) Modified: head/contrib/file/ChangeLog ============================================================================== --- head/contrib/file/ChangeLog Sun May 20 04:57:58 2018 (r333918) +++ head/contrib/file/ChangeLog Sun May 20 05:06:42 2018 (r333919) @@ -1,3 +1,28 @@ +2018-04-15 14:52 Christos Zoulas + + * release 5.33 + +2018-02-24 14:50 Christos Zoulas + + * extend the support for ${x?:} expansions for magic descriptions + +2018-02-21 16:25 Christos Zoulas + + * add support for ${x?:} in mime types to handle + pie binaries. + +2017-11-03 9:23 Christos Zoulas + + * add support for negative offsets (offsets from the end of file) + +2017-09-26 8:22 Christos Zoulas + + * close the file on error when writing magic (Steve Grubb) + +2017-09-24 12:02 Christos Zoulas + + * seccomp support (Paul Moore) + 2017-09-02 11:53 Christos Zoulas * release 5.32 Modified: head/contrib/file/Makefile.in ============================================================================== --- head/contrib/file/Makefile.in Sun May 20 04:57:58 2018 (r333918) +++ head/contrib/file/Makefile.in Sun May 20 05:06:42 2018 (r333919) @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.13.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,61 +14,23 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ +am__make_dryrun = \ + { \ + am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) + test $$am__dry = yes; \ + } pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ @@ -87,6 +49,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in AUTHORS COPYING ChangeLog INSTALL NEWS \ + README TODO compile config.guess config.sub depcomp install-sh \ + missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -94,8 +61,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -159,9 +124,6 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ - COPYING ChangeLog INSTALL NEWS README TODO compile \ - config.guess config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -216,7 +178,6 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -232,7 +193,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -346,6 +306,7 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__c echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -366,8 +327,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -396,12 +357,13 @@ distclean-libtool: # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -576,16 +538,10 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -620,17 +576,16 @@ distcheck: dist esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build/sub \ - && ../../configure \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -806,8 +761,6 @@ uninstall-am: maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am - -.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. Modified: head/contrib/file/README ============================================================================== --- head/contrib/file/README Sun May 20 04:57:58 2018 (r333918) +++ head/contrib/file/README Sun May 20 05:06:42 2018 (r333919) @@ -1,14 +1,13 @@ ## README for file(1) Command ## - @(#) $File: README,v 1.50 2016/04/16 22:40:54 christos Exp $ + @(#) $File: README,v 1.53 2018/03/11 13:06:47 glen Exp $ -Mailing List: file@mx.gw.com -Mailing List archives: http://mx.gw.com/pipermail/file/ -Bug tracker: http://bugs.gw.com/ +Mailing List: file@mx.gw.com [currently down] +Mailing List archives: http://mx.gw.com/pipermail/file/ [currently down] +Bug tracker: http://bugs.gw.com/ [currently down] E-mail: christos@astron.com +Build Status: https://travis-ci.org/file/file -[![Build Status](https://travis-ci.org/file/file.png?branch=master)](https://travis-ci.org/file/file) - Phone: Do not even think of telephoning me about this program. Send cash first! This is Release 5.x of Ian Darwin's (copyright but distributable) @@ -67,28 +66,6 @@ in magic(5) format please, to the maintainer, Christos COPYING - read this first. README - read this second (you are currently reading this file). INSTALL - read on how to install -src/localtime_r.c -src/magic.c -src/magic.h -src/mygetopt.h -src/newtest2.c -src/newtest3.c -src/pread.c -src/print.c -src/readcdf.c -src/readelf.c -src/readelf.h -src/regex.c -src/regex2.c -src/softmagic.c -src/strcasestr.c -src/strlcat.c -src/strlcpy.c -src/strndup.c -src/tar.h -src/teststrchr.c -src/vasprintf.c -src/x.c src/apprentice.c - parses /etc/magic to learn magic src/apptype.c - used for OS/2 specific application type magic src/ascmagic.c - third & last set of tests, based on hardwired assumptions. @@ -96,6 +73,7 @@ src/asctime_r.c - replacement for OS's that don't have src/asprintf.c - replacement for OS's that don't have it. src/asctime_r.c - replacement for OS's that don't have it. src/asprintf.c - replacement for OS's that don't have it. +src/buffer.c - buffer handling functions. src/cdf.[ch] - parser for Microsoft Compound Document Files src/cdf_time.c - time converter for CDF. src/compress.c - handles decompressing files to look inside. @@ -128,6 +106,7 @@ src/mygetopt.h - replacement for OS's that don't have src/strcasestr.c - replacement for OS's that don't have it. src/strlcat.c - replacement for OS's that don't have it. src/strlcpy.c - replacement for OS's that don't have it. +src/strndup.c - replacement for OS's that don't have it. src/tar.h - tar file definitions src/vasprintf.c - for systems that don't have it. doc/file.man - man page for the command @@ -155,6 +134,19 @@ guidelines: * Further reference, such as documentation of format ------------------------------------------------------------------------------ + +gpg for dummies: + +$ gpg --verify file-X.YY.tar.gz.asc file-X.YY.tar.gz +gpg: assuming signed data in `file-X.YY.tar.gz' +gpg: Signature made WWW MMM DD HH:MM:SS YYYY ZZZ using DSA key ID KKKKKKKK + +To download the key: + +$ gpg --keyserver hkp://keys.gnupg.net --recv-keys KKKKKKKK + +------------------------------------------------------------------------------ + Parts of this software were developed at SoftQuad Inc., developers of SGML/HTML/XML publishing software, in Toronto, Canada. Modified: head/contrib/file/TODO ============================================================================== --- head/contrib/file/TODO Sun May 20 04:57:58 2018 (r333918) +++ head/contrib/file/TODO Sun May 20 05:06:42 2018 (r333919) @@ -31,6 +31,19 @@ could require structural changes to the matching code # rule 2 >0 .... ... +--- +- Merge the stat code dance in one place and keep it in one place + (perhaps struct buffer). +- Enable seeking around if offset > nbytes if possible (the fd + is seekable). +- We could use file_pipe2file more (for EOF offsets, CDF documents), + but that is expensive; perhaps we should provide a way to disable it +- The implementation of struct buffer needs re-thinking and more work. + For example we don't always pass the fd in the child. This is not + important yet as we don't have yet cases where use/indirect magic + needs negative offsets. +- Really the whole thing just needs here's an (offset, buffer, size) + you have (filebuffer, filebuffersize &&|| fd), fill the buffer with + data from offset. The buffer API should be changed to just do that. christos - Modified: head/contrib/file/aclocal.m4 ============================================================================== --- head/contrib/file/aclocal.m4 Sun May 20 04:57:58 2018 (r333918) +++ head/contrib/file/aclocal.m4 Sun May 20 05:06:42 2018 (r333919) @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.13.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,85 +20,7 @@ You have another version of autoconf. It may work, bu If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Tests whether the compiler supports the command-line option -dnl -fvisibility=hidden and the function and variable attributes -dnl __attribute__((__visibility__("hidden"))) and -dnl __attribute__((__visibility__("default"))). -dnl Does *not* test for __visibility__("protected") - which has tricky -dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on -dnl Mac OS X. -dnl Does *not* test for __visibility__("internal") - which has processor -dnl dependent semantics. -dnl Does *not* test for #pragma GCC visibility push(hidden) - which is -dnl "really only recommended for legacy code". -dnl Set the variable CFLAG_VISIBILITY. -dnl Defines and sets the variable HAVE_VISIBILITY. - -AC_DEFUN([gl_VISIBILITY], -[ - AC_REQUIRE([AC_PROG_CC]) - CFLAG_VISIBILITY= - HAVE_VISIBILITY=0 - if test -n "$GCC"; then - dnl First, check whether -Werror can be added to the command line, or - dnl whether it leads to an error because of some other option that the - dnl user has put into $CC $CFLAGS $CPPFLAGS. - AC_MSG_CHECKING([whether the -Werror option is usable]) - AC_CACHE_VAL([gl_cv_cc_vis_werror], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_vis_werror=yes], - [gl_cv_cc_vis_werror=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_vis_werror]) - dnl Now check whether visibility declarations are supported. - AC_MSG_CHECKING([for simple visibility declarations]) - AC_CACHE_VAL([gl_cv_cc_visibility], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - dnl We use the option -Werror and a function dummyfunc, because on some - dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning - dnl "visibility attribute not supported in this configuration; ignored" - dnl at the first function definition in every compilation unit, and we - dnl don't want to use the option in this case. - if test $gl_cv_cc_vis_werror = yes; then - CFLAGS="$CFLAGS -Werror" - fi - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void); - void dummyfunc (void) {} - ]], - [[]])], - [gl_cv_cc_visibility=yes], - [gl_cv_cc_visibility=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_visibility]) - if test $gl_cv_cc_visibility = yes; then - CFLAG_VISIBILITY="-fvisibility=hidden" - HAVE_VISIBILITY=1 - fi - fi - AC_SUBST([CFLAG_VISIBILITY]) - AC_SUBST([HAVE_VISIBILITY]) - AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], - [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) -]) - -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,10 +32,10 @@ AC_DEFUN([gl_VISIBILITY], # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.13.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -129,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.13.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -181,14 +103,15 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -219,7 +142,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -410,7 +333,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -450,7 +373,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue + test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the @@ -486,7 +409,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -495,12 +418,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -576,8 +493,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -609,51 +526,6 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, se AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -662,6 +534,7 @@ dnl mangled by Autoconf and run in a shell conditional m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -683,7 +556,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -694,7 +567,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg" # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then +if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -704,7 +577,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -725,7 +598,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -773,9 +646,41 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_CC_C_O +# -------------- +# Like AC_PROG_CC_C_O, but changed for automake. +AC_DEFUN([AM_PROG_CC_C_O], +[AC_REQUIRE([AC_PROG_CC_C_O])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +dnl Make sure AC_PROG_CC is never called again, or it will override our +dnl setting of CC. +m4_define([AC_PROG_CC], + [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) +]) + # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -814,7 +719,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -843,73 +748,9 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2014 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -990,7 +831,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1050,7 +891,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1078,7 +919,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1097,7 +938,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1116,114 +957,76 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar -# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of '-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done + # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun May 20 04:45:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E84E3EF35E8; Sun, 20 May 2018 04:45:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D0646F20F; Sun, 20 May 2018 04:45:06 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68814119B0; Sun, 20 May 2018 04:45:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K4j6Ie078041; Sun, 20 May 2018 04:45:06 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K4j66n078040; Sun, 20 May 2018 04:45:06 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201805200445.w4K4j66n078040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 20 May 2018 04:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333916 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 333916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 04:45:07 -0000 Author: mjg Date: Sun May 20 04:45:05 2018 New Revision: 333916 URL: https://svnweb.freebsd.org/changeset/base/333916 Log: vfs: simplify vop_stdlock/unlock The interlock pointer is non-NULL by definition and the compiler see through that and eliminates the NULL checks. Just remove them from the code as they play no role. No difference in generated assembly. Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Sun May 20 04:38:04 2018 (r333915) +++ head/sys/kern/vfs_default.c Sun May 20 04:45:05 2018 (r333916) @@ -505,7 +505,7 @@ vop_stdlock(ap) ilk = VI_MTX(vp); return (lockmgr_lock_fast_path(vp->v_vnlock, ap->a_flags, - (ilk != NULL) ? &ilk->lock_object : NULL, ap->a_file, ap->a_line)); + &ilk->lock_object, ap->a_file, ap->a_line)); } /* See above. */ @@ -521,7 +521,7 @@ vop_stdunlock(ap) ilk = VI_MTX(vp); return (lockmgr_unlock_fast_path(vp->v_vnlock, ap->a_flags, - (ilk != NULL) ? &ilk->lock_object : NULL)); + &ilk->lock_object)); } /* See above. */ From owner-svn-src-head@freebsd.org Sun May 20 05:59:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFF86EF6091; Sun, 20 May 2018 05:59:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 820FC71CF4; Sun, 20 May 2018 05:59:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58A7112567; Sun, 20 May 2018 05:59:36 +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 w4K5xaEe013318; Sun, 20 May 2018 05:59:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K5xaBS013317; Sun, 20 May 2018 05:59:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201805200559.w4K5xaBS013317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 20 May 2018 05:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333922 - head/lib/libmagic X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/lib/libmagic X-SVN-Commit-Revision: 333922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 05:59:37 -0000 Author: cy Date: Sun May 20 05:59:35 2018 New Revision: 333922 URL: https://svnweb.freebsd.org/changeset/base/333922 Log: Fix build post r333919. This commit results in an aesthetically unpleasing long line which will be fixed next commit. Modified: head/lib/libmagic/Makefile Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Sun May 20 05:50:53 2018 (r333921) +++ head/lib/libmagic/Makefile Sun May 20 05:59:35 2018 (r333922) @@ -13,9 +13,9 @@ LIBADD= z .endif MAN= libmagic.3 magic.5 -SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \ +SRCS= apprentice.c apptype.c ascmagic.c buffer.c cdf.c cdf_time.c compress.c \ der.c encoding.c fsmagic.c funcs.c \ - is_tar.c magic.c print.c readcdf.c readelf.c softmagic.c + is_tar.c magic.c print.c readcdf.c readelf.c seccomp.c softmagic.c INCS= magic.h MAGICPATH?= /usr/share/misc From owner-svn-src-head@freebsd.org Sun May 20 04:38:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 404BEEF320E; Sun, 20 May 2018 04:38:05 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E61F06EDA9; Sun, 20 May 2018 04:38:04 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C748A1180E; Sun, 20 May 2018 04:38:04 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K4c4st073122; Sun, 20 May 2018 04:38:04 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K4c4BQ073120; Sun, 20 May 2018 04:38:04 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200438.w4K4c4BQ073120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 04:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333915 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 333915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 04:38:05 -0000 Author: mmacy Date: Sun May 20 04:38:04 2018 New Revision: 333915 URL: https://svnweb.freebsd.org/changeset/base/333915 Log: inpcb: defer destruction of inpcb until after a grace period has elapsed in_pcbfree will remove the incpb from the list and release the rtentry while the vnet is set, but the actual destruction will be deferred until any threads in a (not yet used) epoch section, no longer potentially have references. Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun May 20 04:32:48 2018 (r333914) +++ head/sys/netinet/in_pcb.c Sun May 20 04:38:04 2018 (r333915) @@ -1336,44 +1336,22 @@ in_pcblist_rele_rlocked(epoch_context_t ctx) free(il, M_TEMP); } -/* - * Unconditionally schedule an inpcb to be freed by decrementing its - * reference count, which should occur only after the inpcb has been detached - * from its socket. If another thread holds a temporary reference (acquired - * using in_pcbref()) then the free is deferred until that reference is - * released using in_pcbrele(), but the inpcb is still unlocked. Almost all - * work, including removal from global lists, is done in this context, where - * the pcbinfo lock is held. - */ -void -in_pcbfree(struct inpcb *inp) +static void +in_pcbfree_deferred(epoch_context_t ctx) { - struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; - + struct inpcb *inp; + struct inpcbinfo *pcbinfo; #ifdef INET6 struct ip6_moptions *im6o = NULL; #endif #ifdef INET struct ip_moptions *imo = NULL; #endif - KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); - KASSERT((inp->inp_flags2 & INP_FREED) == 0, - ("%s: called twice for pcb %p", __func__, inp)); - if (inp->inp_flags2 & INP_FREED) { - INP_WUNLOCK(inp); - return; - } + inp = __containerof(ctx, struct inpcb, inp_epoch_ctx); + pcbinfo = inp->inp_pcbinfo; -#ifdef INVARIANTS - if (pcbinfo == &V_tcbinfo) { - INP_INFO_LOCK_ASSERT(pcbinfo); - } else { - INP_INFO_WLOCK_ASSERT(pcbinfo); - } -#endif - INP_WLOCK_ASSERT(inp); - + INP_WLOCK(inp); #ifdef INET imo = inp->inp_moptions; inp->inp_moptions = NULL; @@ -1383,10 +1361,6 @@ in_pcbfree(struct inpcb *inp) if (inp->inp_sp != NULL) ipsec_delete_pcbpolicy(inp); #endif - INP_LIST_WLOCK(pcbinfo); - inp->inp_gencnt = ++pcbinfo->ipi_gencnt; - in_pcbremlists(inp); - INP_LIST_WUNLOCK(pcbinfo); #ifdef INET6 if (inp->inp_vflag & INP_IPV6PROTO) { ip6_freepcbopts(inp->in6p_outputopts); @@ -1396,7 +1370,6 @@ in_pcbfree(struct inpcb *inp) #endif if (inp->inp_options) (void)m_free(inp->inp_options); - RO_INVALIDATE_CACHE(&inp->inp_route); inp->inp_vflag = 0; inp->inp_flags2 |= INP_FREED; @@ -1404,14 +1377,54 @@ in_pcbfree(struct inpcb *inp) #ifdef MAC mac_inpcb_destroy(inp); #endif + if (!in_pcbrele_wlocked(inp)) + INP_WUNLOCK(inp); #ifdef INET6 ip6_freemoptions(im6o); #endif #ifdef INET inp_freemoptions(imo); #endif - if (!in_pcbrele_wlocked(inp)) +} + +/* + * Unconditionally schedule an inpcb to be freed by decrementing its + * reference count, which should occur only after the inpcb has been detached + * from its socket. If another thread holds a temporary reference (acquired + * using in_pcbref()) then the free is deferred until that reference is + * released using in_pcbrele(), but the inpcb is still unlocked. Almost all + * work, including removal from global lists, is done in this context, where + * the pcbinfo lock is held. + */ +void +in_pcbfree(struct inpcb *inp) +{ + struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; + + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); + KASSERT((inp->inp_flags2 & INP_FREED) == 0, + ("%s: called twice for pcb %p", __func__, inp)); + if (inp->inp_flags2 & INP_FREED) { INP_WUNLOCK(inp); + return; + } + +#ifdef INVARIANTS + if (pcbinfo == &V_tcbinfo) { + INP_INFO_LOCK_ASSERT(pcbinfo); + } else { + INP_INFO_WLOCK_ASSERT(pcbinfo); + } +#endif + INP_WLOCK_ASSERT(inp); + /* Remove first from list */ + INP_LIST_WLOCK(pcbinfo); + inp->inp_gencnt = ++pcbinfo->ipi_gencnt; + in_pcbremlists(inp); + INP_LIST_WUNLOCK(pcbinfo); + RO_INVALIDATE_CACHE(&inp->inp_route); + INP_WUNLOCK(inp); + epoch_call(net_epoch_preempt, &inp->inp_epoch_ctx, in_pcbfree_deferred); } /* Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Sun May 20 04:32:48 2018 (r333914) +++ head/sys/netinet/in_pcb.h Sun May 20 04:38:04 2018 (r333915) @@ -328,6 +328,7 @@ struct inpcb { LIST_ENTRY(inpcb) inp_list; /* (p/l) list for all PCBs for proto */ /* (p[w]) for list iteration */ /* (p[r]/l) for addition/removal */ + struct epoch_context inp_epoch_ctx; }; #endif /* _KERNEL */ From owner-svn-src-head@freebsd.org Sun May 20 04:32:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D17F5EF2DC4; Sun, 20 May 2018 04:32:48 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 874066E9E1; Sun, 20 May 2018 04:32:48 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 695D711802; Sun, 20 May 2018 04:32:48 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K4Wm75072852; Sun, 20 May 2018 04:32:48 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K4WmfM072851; Sun, 20 May 2018 04:32:48 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200432.w4K4WmfM072851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 04:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333914 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 333914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 04:32:49 -0000 Author: mmacy Date: Sun May 20 04:32:48 2018 New Revision: 333914 URL: https://svnweb.freebsd.org/changeset/base/333914 Log: AF_UNIX: make unpcb lock name line up with what's in witness Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Sun May 20 04:15:12 2018 (r333913) +++ head/sys/kern/uipc_usrreq.c Sun May 20 04:32:48 2018 (r333914) @@ -282,7 +282,7 @@ static struct mtx unp_defers_lock; #define UNP_REF_LIST_UNLOCK() UNP_DEFERRED_UNLOCK(); #define UNP_PCB_LOCK_INIT(unp) mtx_init(&(unp)->unp_mtx, \ - "unp_mtx", "unp_mtx", \ + "unp", "unp", \ MTX_DUPOK|MTX_DEF) #define UNP_PCB_LOCK_DESTROY(unp) mtx_destroy(&(unp)->unp_mtx) #define UNP_PCB_LOCK(unp) mtx_lock(&(unp)->unp_mtx) From owner-svn-src-head@freebsd.org Sun May 20 05:13:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DBB5EF43B5; Sun, 20 May 2018 05:13:14 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E72A6703F3; Sun, 20 May 2018 05:13:13 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C863B11EB2; Sun, 20 May 2018 05:13:13 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K5DDX4093196; Sun, 20 May 2018 05:13:13 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K5DDHt093193; Sun, 20 May 2018 05:13:13 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200513.w4K5DDHt093193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 05:13:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333920 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 333920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 05:13:14 -0000 Author: mmacy Date: Sun May 20 05:13:12 2018 New Revision: 333920 URL: https://svnweb.freebsd.org/changeset/base/333920 Log: Add additional preinitialized cap_rights Modified: head/sys/kern/subr_capability.c head/sys/kern/vfs_syscalls.c head/sys/sys/capsicum.h Modified: head/sys/kern/subr_capability.c ============================================================================== --- head/sys/kern/subr_capability.c Sun May 20 05:06:42 2018 (r333919) +++ head/sys/kern/subr_capability.c Sun May 20 05:13:12 2018 (r333920) @@ -55,31 +55,47 @@ __FBSDID("$FreeBSD$"); #define assert(exp) KASSERT((exp), ("%s:%u", __func__, __LINE__)) __read_mostly cap_rights_t cap_accept_rights; __read_mostly cap_rights_t cap_bind_rights; +__read_mostly cap_rights_t cap_chflags_rights; __read_mostly cap_rights_t cap_connect_rights; __read_mostly cap_rights_t cap_event_rights; __read_mostly cap_rights_t cap_fchdir_rights; +__read_mostly cap_rights_t cap_fchflags_rights; +__read_mostly cap_rights_t cap_fchmod_rights; +__read_mostly cap_rights_t cap_fchown_rights; __read_mostly cap_rights_t cap_fcntl_rights; __read_mostly cap_rights_t cap_fexecve_rights; __read_mostly cap_rights_t cap_flock_rights; __read_mostly cap_rights_t cap_fpathconf_rights; __read_mostly cap_rights_t cap_fstat_rights; +__read_mostly cap_rights_t cap_fstatfs_rights; +__read_mostly cap_rights_t cap_fsync_rights; __read_mostly cap_rights_t cap_ftruncate_rights; +__read_mostly cap_rights_t cap_futimes_rights; __read_mostly cap_rights_t cap_getpeername_rights; __read_mostly cap_rights_t cap_getsockopt_rights; __read_mostly cap_rights_t cap_getsockname_rights; __read_mostly cap_rights_t cap_ioctl_rights; __read_mostly cap_rights_t cap_listen_rights; +__read_mostly cap_rights_t cap_linkat_source_rights; +__read_mostly cap_rights_t cap_linkat_target_rights; __read_mostly cap_rights_t cap_mmap_rights; -__read_mostly cap_rights_t cap_fsync_rights; +__read_mostly cap_rights_t cap_mkdirat_rights; +__read_mostly cap_rights_t cap_mkfifoat_rights; +__read_mostly cap_rights_t cap_mknodat_rights; __read_mostly cap_rights_t cap_pdgetpid_rights; __read_mostly cap_rights_t cap_pdkill_rights; __read_mostly cap_rights_t cap_pread_rights; __read_mostly cap_rights_t cap_pwrite_rights; __read_mostly cap_rights_t cap_read_rights; __read_mostly cap_rights_t cap_recv_rights; +__read_mostly cap_rights_t cap_renameat_source_rights; +__read_mostly cap_rights_t cap_renameat_target_rights; +__read_mostly cap_rights_t cap_seek_rights; __read_mostly cap_rights_t cap_send_rights; __read_mostly cap_rights_t cap_setsockopt_rights; __read_mostly cap_rights_t cap_shutdown_rights; +__read_mostly cap_rights_t cap_symlinkat_rights; +__read_mostly cap_rights_t cap_unlinkat_rights; __read_mostly cap_rights_t cap_write_rights; __read_mostly cap_rights_t cap_no_rights; @@ -91,18 +107,28 @@ __cap_rights_sysinit1(void *arg) cap_rights_init(&cap_connect_rights, CAP_CONNECT); cap_rights_init(&cap_event_rights, CAP_EVENT); cap_rights_init(&cap_fchdir_rights, CAP_FCHDIR); + cap_rights_init(&cap_fchflags_rights, CAP_FCHFLAGS); + cap_rights_init(&cap_fchmod_rights, CAP_FCHMOD); + cap_rights_init(&cap_fchown_rights, CAP_FCHOWN); cap_rights_init(&cap_fcntl_rights, CAP_FCNTL); cap_rights_init(&cap_fexecve_rights, CAP_FEXECVE); cap_rights_init(&cap_flock_rights, CAP_FLOCK); cap_rights_init(&cap_fpathconf_rights, CAP_FPATHCONF); cap_rights_init(&cap_fstat_rights, CAP_FSTAT); + cap_rights_init(&cap_fstatfs_rights, CAP_FSTATFS); cap_rights_init(&cap_fsync_rights, CAP_FSYNC); cap_rights_init(&cap_ftruncate_rights, CAP_FTRUNCATE); + cap_rights_init(&cap_futimes_rights, CAP_FUTIMES); cap_rights_init(&cap_getpeername_rights, CAP_GETPEERNAME); cap_rights_init(&cap_getsockname_rights, CAP_GETSOCKNAME); cap_rights_init(&cap_getsockopt_rights, CAP_GETSOCKOPT); cap_rights_init(&cap_ioctl_rights, CAP_IOCTL); + cap_rights_init(&cap_linkat_source_rights, CAP_LINKAT_SOURCE); + cap_rights_init(&cap_linkat_target_rights, CAP_LINKAT_TARGET); cap_rights_init(&cap_listen_rights, CAP_LISTEN); + cap_rights_init(&cap_mkdirat_rights, CAP_MKDIRAT); + cap_rights_init(&cap_mkfifoat_rights, CAP_MKFIFOAT); + cap_rights_init(&cap_mknodat_rights, CAP_MKNODAT); cap_rights_init(&cap_mmap_rights, CAP_MMAP); cap_rights_init(&cap_pdgetpid_rights, CAP_PDGETPID); cap_rights_init(&cap_pdkill_rights, CAP_PDKILL); @@ -110,9 +136,14 @@ __cap_rights_sysinit1(void *arg) cap_rights_init(&cap_pwrite_rights, CAP_PWRITE); cap_rights_init(&cap_read_rights, CAP_READ); cap_rights_init(&cap_recv_rights, CAP_RECV); + cap_rights_init(&cap_renameat_source_rights, CAP_RENAMEAT_SOURCE); + cap_rights_init(&cap_renameat_target_rights, CAP_RENAMEAT_TARGET); + cap_rights_init(&cap_seek_rights, CAP_SEEK); cap_rights_init(&cap_send_rights, CAP_SEND); cap_rights_init(&cap_setsockopt_rights, CAP_SETSOCKOPT); cap_rights_init(&cap_shutdown_rights, CAP_SHUTDOWN); + cap_rights_init(&cap_symlinkat_rights, CAP_SYMLINKAT); + cap_rights_init(&cap_unlinkat_rights, CAP_UNLINKAT); cap_rights_init(&cap_write_rights, CAP_WRITE); cap_rights_init(&cap_no_rights); } Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sun May 20 05:06:42 2018 (r333919) +++ head/sys/kern/vfs_syscalls.c Sun May 20 05:13:12 2018 (r333920) @@ -345,11 +345,10 @@ kern_fstatfs(struct thread *td, int fd, struct statfs struct file *fp; struct mount *mp; struct vnode *vp; - cap_rights_t rights; int error; AUDIT_ARG_FD(fd); - error = getvnode(td, fd, cap_rights_init(&rights, CAP_FSTATFS), &fp); + error = getvnode(td, fd, &cap_fstatfs_rights, &fp); if (error != 0) return (error); vp = fp->f_vnode; @@ -1236,7 +1235,6 @@ kern_mknodat(struct thread *td, int fd, char *path, en struct mount *mp; struct vattr vattr; struct nameidata nd; - cap_rights_t rights; int error, whiteout = 0; AUDIT_ARG_MODE(mode); @@ -1264,7 +1262,7 @@ kern_mknodat(struct thread *td, int fd, char *path, en restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE1 | - NOCACHE, pathseg, path, fd, cap_rights_init(&rights, CAP_MKNODAT), + NOCACHE, pathseg, path, fd, &cap_mknodat_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -1365,14 +1363,13 @@ kern_mkfifoat(struct thread *td, int fd, char *path, e struct mount *mp; struct vattr vattr; struct nameidata nd; - cap_rights_t rights; int error; AUDIT_ARG_MODE(mode); restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE1 | - NOCACHE, pathseg, path, fd, cap_rights_init(&rights, CAP_MKFIFOAT), + NOCACHE, pathseg, path, fd, &cap_mkfifoat_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -1498,13 +1495,12 @@ kern_linkat(struct thread *td, int fd1, int fd2, char struct vnode *vp; struct mount *mp; struct nameidata nd; - cap_rights_t rights; int error; again: bwillwrite(); NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, segflg, path1, fd1, - cap_rights_init(&rights, CAP_LINKAT_SOURCE), td); + &cap_linkat_source_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -1516,7 +1512,7 @@ again: } NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE2 | NOCACHE, segflg, path2, fd2, - cap_rights_init(&rights, CAP_LINKAT_TARGET), td); + &cap_linkat_target_rights, td); if ((error = namei(&nd)) == 0) { if (nd.ni_vp != NULL) { NDFREE(&nd, NDF_ONLY_PNBUF); @@ -1618,7 +1614,6 @@ kern_symlinkat(struct thread *td, char *path1, int fd, char *syspath; struct nameidata nd; int error; - cap_rights_t rights; if (segflg == UIO_SYSSPACE) { syspath = path1; @@ -1631,7 +1626,7 @@ kern_symlinkat(struct thread *td, char *path1, int fd, restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE1 | - NOCACHE, segflg, path2, fd, cap_rights_init(&rights, CAP_SYMLINKAT), + NOCACHE, segflg, path2, fd, &cap_symlinkat_rights, td); if ((error = namei(&nd)) != 0) goto out; @@ -1769,13 +1764,12 @@ kern_unlinkat(struct thread *td, int fd, char *path, e struct vnode *vp; struct nameidata nd; struct stat sb; - cap_rights_t rights; int error; restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, DELETE, LOCKPARENT | LOCKLEAF | AUDITVNODE1, - pathseg, path, fd, cap_rights_init(&rights, CAP_UNLINKAT), td); + pathseg, path, fd, &cap_unlinkat_rights, td); if ((error = namei(&nd)) != 0) return (error == EINVAL ? EPERM : error); vp = nd.ni_vp; @@ -1851,11 +1845,10 @@ int kern_lseek(struct thread *td, int fd, off_t offset, int whence) { struct file *fp; - cap_rights_t rights; int error; AUDIT_ARG_FD(fd); - error = fget(td, fd, cap_rights_init(&rights, CAP_SEEK), &fp); + error = fget(td, fd, &cap_seek_rights, &fp); if (error != 0) return (error); error = (fp->f_ops->fo_flags & DFLAG_SEEKABLE) != 0 ? @@ -1964,7 +1957,6 @@ kern_accessat(struct thread *td, int fd, char *path, e struct ucred *cred, *usecred; struct vnode *vp; struct nameidata nd; - cap_rights_t rights; int error; if (flag & ~AT_EACCESS) @@ -1988,7 +1980,7 @@ kern_accessat(struct thread *td, int fd, char *path, e usecred = cred; AUDIT_ARG_VALUE(amode); NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | - AUDITVNODE1, pathseg, path, fd, cap_rights_init(&rights, CAP_FSTAT), + AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights, td); if ((error = namei(&nd)) != 0) goto out; @@ -2609,13 +2601,12 @@ kern_chflagsat(struct thread *td, int fd, const char * enum uio_seg pathseg, u_long flags, int atflag) { struct nameidata nd; - cap_rights_t rights; int error, follow; AUDIT_ARG_FFLAGS(flags); follow = (atflag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : FOLLOW; NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, pathseg, path, fd, - cap_rights_init(&rights, CAP_FCHFLAGS), td); + &cap_fchflags_rights, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -2637,12 +2628,11 @@ int sys_fchflags(struct thread *td, struct fchflags_args *uap) { struct file *fp; - cap_rights_t rights; int error; AUDIT_ARG_FD(uap->fd); AUDIT_ARG_FFLAGS(uap->flags); - error = getvnode(td, uap->fd, cap_rights_init(&rights, CAP_FCHFLAGS), + error = getvnode(td, uap->fd, &cap_fchflags_rights, &fp); if (error != 0) return (error); @@ -2742,13 +2732,12 @@ kern_fchmodat(struct thread *td, int fd, char *path, e mode_t mode, int flag) { struct nameidata nd; - cap_rights_t rights; int error, follow; AUDIT_ARG_MODE(mode); follow = (flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : FOLLOW; NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, pathseg, path, fd, - cap_rights_init(&rights, CAP_FCHMOD), td); + &cap_fchmod_rights, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -2770,13 +2759,12 @@ int sys_fchmod(struct thread *td, struct fchmod_args *uap) { struct file *fp; - cap_rights_t rights; int error; AUDIT_ARG_FD(uap->fd); AUDIT_ARG_MODE(uap->mode); - error = fget(td, uap->fd, cap_rights_init(&rights, CAP_FCHMOD), &fp); + error = fget(td, uap->fd, &cap_fchmod_rights, &fp); if (error != 0) return (error); error = fo_chmod(fp, uap->mode, td->td_ucred, td); @@ -2857,13 +2845,12 @@ kern_fchownat(struct thread *td, int fd, char *path, e int uid, int gid, int flag) { struct nameidata nd; - cap_rights_t rights; int error, follow; AUDIT_ARG_OWNER(uid, gid); follow = (flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : FOLLOW; NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, pathseg, path, fd, - cap_rights_init(&rights, CAP_FCHOWN), td); + &cap_fchown_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -2905,12 +2892,11 @@ int sys_fchown(struct thread *td, struct fchown_args *uap) { struct file *fp; - cap_rights_t rights; int error; AUDIT_ARG_FD(uap->fd); AUDIT_ARG_OWNER(uap->uid, uap->gid); - error = fget(td, uap->fd, cap_rights_init(&rights, CAP_FCHOWN), &fp); + error = fget(td, uap->fd, &cap_fchown_rights, &fp); if (error != 0) return (error); error = fo_chown(fp, uap->uid, uap->gid, td->td_ucred, td); @@ -3072,13 +3058,12 @@ kern_utimesat(struct thread *td, int fd, char *path, e { struct nameidata nd; struct timespec ts[2]; - cap_rights_t rights; int error; if ((error = getutimes(tptr, tptrseg, ts)) != 0) return (error); NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | AUDITVNODE1, pathseg, path, fd, - cap_rights_init(&rights, CAP_FUTIMES), td); + &cap_futimes_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -3146,14 +3131,13 @@ kern_futimes(struct thread *td, int fd, struct timeval { struct timespec ts[2]; struct file *fp; - cap_rights_t rights; int error; AUDIT_ARG_FD(fd); error = getutimes(tptr, tptrseg, ts); if (error != 0) return (error); - error = getvnode(td, fd, cap_rights_init(&rights, CAP_FUTIMES), &fp); + error = getvnode(td, fd, &cap_futimes_rights, &fp); if (error != 0) return (error); #ifdef AUDIT @@ -3179,7 +3163,6 @@ kern_futimens(struct thread *td, int fd, struct timesp { struct timespec ts[2]; struct file *fp; - cap_rights_t rights; int error, flags; AUDIT_ARG_FD(fd); @@ -3188,7 +3171,7 @@ kern_futimens(struct thread *td, int fd, struct timesp return (error); if (flags & UTIMENS_EXIT) return (0); - error = getvnode(td, fd, cap_rights_init(&rights, CAP_FUTIMES), &fp); + error = getvnode(td, fd, &cap_futimes_rights, &fp); if (error != 0) return (error); #ifdef AUDIT @@ -3215,7 +3198,6 @@ kern_utimensat(struct thread *td, int fd, char *path, { struct nameidata nd; struct timespec ts[2]; - cap_rights_t rights; int error, flags; if (flag & ~AT_SYMLINK_NOFOLLOW) @@ -3225,7 +3207,7 @@ kern_utimensat(struct thread *td, int fd, char *path, return (error); NDINIT_ATRIGHTS(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : FOLLOW) | AUDITVNODE1, pathseg, path, fd, - cap_rights_init(&rights, CAP_FUTIMES), td); + &cap_futimes_rights, td); if ((error = namei(&nd)) != 0) return (error); /* @@ -3342,11 +3324,10 @@ kern_fsync(struct thread *td, int fd, bool fullsync) struct vnode *vp; struct mount *mp; struct file *fp; - cap_rights_t rights; int error, lock_flags; AUDIT_ARG_FD(fd); - error = getvnode(td, fd, cap_rights_init(&rights, CAP_FSYNC), &fp); + error = getvnode(td, fd, &cap_fsync_rights, &fp); if (error != 0) return (error); vp = fp->f_vnode; @@ -3441,7 +3422,6 @@ kern_renameat(struct thread *td, int oldfd, char *old, struct mount *mp = NULL; struct vnode *tvp, *fvp, *tdvp; struct nameidata fromnd, tond; - cap_rights_t rights; int error; again: @@ -3449,11 +3429,11 @@ again: #ifdef MAC NDINIT_ATRIGHTS(&fromnd, DELETE, LOCKPARENT | LOCKLEAF | SAVESTART | AUDITVNODE1, pathseg, old, oldfd, - cap_rights_init(&rights, CAP_RENAMEAT_SOURCE), td); + &cap_renameat_source_rights, td); #else NDINIT_ATRIGHTS(&fromnd, DELETE, WANTPARENT | SAVESTART | AUDITVNODE1, pathseg, old, oldfd, - cap_rights_init(&rights, CAP_RENAMEAT_SOURCE), td); + &cap_renameat_source_rights, td); #endif if ((error = namei(&fromnd)) != 0) @@ -3468,7 +3448,7 @@ again: fvp = fromnd.ni_vp; NDINIT_ATRIGHTS(&tond, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART | AUDITVNODE2, pathseg, new, newfd, - cap_rights_init(&rights, CAP_RENAMEAT_TARGET), td); + &cap_renameat_target_rights, td); if (fromnd.ni_vp->v_type == VDIR) tond.ni_cnd.cn_flags |= WILLBEDIR; if ((error = namei(&tond)) != 0) { @@ -3517,7 +3497,7 @@ again: * from 'newfd'. */ error = cap_check(&tond.ni_filecaps.fc_rights, - cap_rights_init(&rights, CAP_UNLINKAT)); + &cap_unlinkat_rights); if (error != 0) goto out; } @@ -3605,14 +3585,13 @@ kern_mkdirat(struct thread *td, int fd, char *path, en struct vnode *vp; struct vattr vattr; struct nameidata nd; - cap_rights_t rights; int error; AUDIT_ARG_MODE(mode); restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE1 | - NOCACHE, segflg, path, fd, cap_rights_init(&rights, CAP_MKDIRAT), + NOCACHE, segflg, path, fd, &cap_mkdirat_rights, td); nd.ni_cnd.cn_flags |= WILLBEDIR; if ((error = namei(&nd)) != 0) @@ -3681,13 +3660,12 @@ kern_rmdirat(struct thread *td, int fd, char *path, en struct mount *mp; struct vnode *vp; struct nameidata nd; - cap_rights_t rights; int error; restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, DELETE, LOCKPARENT | LOCKLEAF | AUDITVNODE1, - pathseg, path, fd, cap_rights_init(&rights, CAP_UNLINKAT), td); + pathseg, path, fd, &cap_unlinkat_rights, td); if ((error = namei(&nd)) != 0) return (error); vp = nd.ni_vp; Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Sun May 20 05:06:42 2018 (r333919) +++ head/sys/sys/capsicum.h Sun May 20 05:13:12 2018 (r333920) @@ -407,29 +407,44 @@ extern cap_rights_t cap_bind_rights; extern cap_rights_t cap_connect_rights; extern cap_rights_t cap_event_rights; extern cap_rights_t cap_fchdir_rights; +extern cap_rights_t cap_fchflags_rights; +extern cap_rights_t cap_fchmod_rights; +extern cap_rights_t cap_fchown_rights; extern cap_rights_t cap_fcntl_rights; extern cap_rights_t cap_fexecve_rights; extern cap_rights_t cap_flock_rights; extern cap_rights_t cap_fpathconf_rights; extern cap_rights_t cap_fstat_rights; +extern cap_rights_t cap_fstatfs_rights; +extern cap_rights_t cap_fsync_rights; extern cap_rights_t cap_ftruncate_rights; +extern cap_rights_t cap_futimes_rights; extern cap_rights_t cap_getpeername_rights; extern cap_rights_t cap_getsockopt_rights; extern cap_rights_t cap_getsockname_rights; extern cap_rights_t cap_ioctl_rights; +extern cap_rights_t cap_linkat_source_rights; +extern cap_rights_t cap_linkat_target_rights; extern cap_rights_t cap_listen_rights; +extern cap_rights_t cap_mkdirat_rights; +extern cap_rights_t cap_mkfifoat_rights; +extern cap_rights_t cap_mknodat_rights; extern cap_rights_t cap_mmap_rights; extern cap_rights_t cap_no_rights; -extern cap_rights_t cap_fsync_rights; extern cap_rights_t cap_pdgetpid_rights; extern cap_rights_t cap_pdkill_rights; extern cap_rights_t cap_pread_rights; extern cap_rights_t cap_pwrite_rights; extern cap_rights_t cap_read_rights; extern cap_rights_t cap_recv_rights; +extern cap_rights_t cap_renameat_source_rights; +extern cap_rights_t cap_renameat_target_rights; +extern cap_rights_t cap_seek_rights; extern cap_rights_t cap_send_rights; extern cap_rights_t cap_setsockopt_rights; extern cap_rights_t cap_shutdown_rights; +extern cap_rights_t cap_symlinkat_rights; +extern cap_rights_t cap_unlinkat_rights; extern cap_rights_t cap_write_rights; #define IN_CAPABILITY_MODE(td) (((td)->td_ucred->cr_flags & CRED_FLAG_CAPMODE) != 0) From owner-svn-src-head@freebsd.org Sun May 20 05:59:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC48BEF609F; Sun, 20 May 2018 05:59:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80F2071DB6; Sun, 20 May 2018 05:59:43 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 158A712568; Sun, 20 May 2018 05:59:43 +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 w4K5xgj8013366; Sun, 20 May 2018 05:59:42 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K5xgaL013365; Sun, 20 May 2018 05:59:42 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201805200559.w4K5xgaL013365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 20 May 2018 05:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333923 - head/lib/libmagic X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/lib/libmagic X-SVN-Commit-Revision: 333923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 05:59:44 -0000 Author: cy Date: Sun May 20 05:59:42 2018 New Revision: 333923 URL: https://svnweb.freebsd.org/changeset/base/333923 Log: Style fixup: A non-functional commit to make adjustment to an aesthetically unpleasing long line. Modified: head/lib/libmagic/Makefile Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Sun May 20 05:59:35 2018 (r333922) +++ head/lib/libmagic/Makefile Sun May 20 05:59:42 2018 (r333923) @@ -13,8 +13,8 @@ LIBADD= z .endif MAN= libmagic.3 magic.5 -SRCS= apprentice.c apptype.c ascmagic.c buffer.c cdf.c cdf_time.c compress.c \ - der.c encoding.c fsmagic.c funcs.c \ +SRCS= apprentice.c apptype.c ascmagic.c buffer.c cdf.c cdf_time.c \ + compress.c der.c encoding.c fsmagic.c funcs.c \ is_tar.c magic.c print.c readcdf.c readelf.c seccomp.c softmagic.c INCS= magic.h From owner-svn-src-head@freebsd.org Sun May 20 06:14:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49A83EF6896; Sun, 20 May 2018 06:14:13 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3FFC72688; Sun, 20 May 2018 06:14:12 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1F58128BF; Sun, 20 May 2018 06:14:12 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K6ECH9023254; Sun, 20 May 2018 06:14:12 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K6EC0L023252; Sun, 20 May 2018 06:14:12 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200614.w4K6EC0L023252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 06:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333924 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 333924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 06:14:13 -0000 Author: mmacy Date: Sun May 20 06:14:12 2018 New Revision: 333924 URL: https://svnweb.freebsd.org/changeset/base/333924 Log: nfsclient: warnings cleanups Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 (r333923) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 (r333924) @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu char *uiocp; struct mbuf *mp, *mp2, *firstmp; int xfer, left, mlen; - int uiosiz, clflg, rem; + int uiosiz, clflg; char *tcp; KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu clflg = 1; else clflg = 0; - rem = NFSM_RNDUP(siz) - siz; if (clflg != 0) NFSMCLGET(mp, M_WAITOK); else Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 05:59:42 2018 (r333923) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 06:14:12 2018 (r333924) @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 KASSERT(uiop->uio_iovcnt == 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, ("nfs readdirrpc bad uio")); - + ncookie.lval[0] = ncookie.lval[1] = 0; /* * There is no point in reading a lot more than uio_resid, however * adding one additional DIRBLKSIZ makes sense. Since uio_resid @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsui KASSERT(uiop->uio_iovcnt == 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, ("nfs readdirplusrpc bad uio")); + ncookie.lval[0] = ncookie.lval[1] = 0; timespecclear(&dctime); *attrflagp = 0; if (eofp != NULL) @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, ui NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); len = fxdr_unsigned(uint32_t, *tl); + str = NULL; if (len > NFSV4_OPAQUELIMIT) { error = NFSERR_BADXDR; goto nfsmout; @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel struct nfsclsession *tsep; nfsattrbit_t attrbits; nfsv4stateid_t stateid; - uint32_t rflags; struct nfsmount *nmp; nmp = VFSTONFS(dvp->v_mount); @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namel stateid.other[0] = *tl++; stateid.other[1] = *tl++; stateid.other[2] = *tl; - rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); nfsrv_getattrbits(nd, &attrbits, NULL, NULL); NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); deleg = fxdr_unsigned(int, *tl); From owner-svn-src-head@freebsd.org Sun May 20 05:50:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F517EF5C84; Sun, 20 May 2018 05:50:54 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C960B71838; Sun, 20 May 2018 05:50:53 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAB29123F0; Sun, 20 May 2018 05:50:53 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4K5ora6009869; Sun, 20 May 2018 05:50:53 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4K5orvO009868; Sun, 20 May 2018 05:50:53 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805200550.w4K5orvO009868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 05:50:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333921 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 333921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 05:50:54 -0000 Author: mmacy Date: Sun May 20 05:50:53 2018 New Revision: 333921 URL: https://svnweb.freebsd.org/changeset/base/333921 Log: AF_UNIX: fix LOR introduced by the locking rewrite Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Sun May 20 05:13:12 2018 (r333920) +++ head/sys/kern/uipc_usrreq.c Sun May 20 05:50:53 2018 (r333921) @@ -1559,7 +1559,6 @@ unp_connectat(int fd, struct socket *so, struct sockad error = EPROTOTYPE; goto bad2; } - unp_pcb_lock2(unp, unp2); if (so->so_proto->pr_flags & PR_CONNREQUIRED) { if (so2->so_options & SO_ACCEPTCONN) { CURVNET_SET(so2->so_vnet); @@ -1572,9 +1571,7 @@ unp_connectat(int fd, struct socket *so, struct sockad goto bad3; } unp3 = sotounpcb(so2); - UNP_PCB_UNLOCK(unp); - unp_pcb_owned_lock2(unp2, unp3, freed); - MPASS(!freed); + unp_pcb_lock2(unp2, unp3); if (unp2->unp_addr != NULL) { bcopy(unp2->unp_addr, sa, unp2->unp_addr->sun_len); unp3->unp_addr = (struct sockaddr_un *) sa; @@ -1602,12 +1599,17 @@ unp_connectat(int fd, struct socket *so, struct sockad UNP_PCB_UNLOCK(unp2); unp2 = unp3; unp_pcb_owned_lock2(unp2, unp, freed); - MPASS(!freed); + if (__predict_false(freed)) { + UNP_PCB_UNLOCK(unp2); + error = ECONNREFUSED; + goto bad2; + } #ifdef MAC mac_socketpeer_set_from_socket(so, so2); mac_socketpeer_set_from_socket(so2, so); #endif - } + } else + unp_pcb_lock2(unp, unp2); KASSERT(unp2 != NULL && so2 != NULL && unp2->unp_socket == so2 && sotounpcb(so2) == unp2, From owner-svn-src-head@freebsd.org Sun May 20 10:59:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54307EB1735; Sun, 20 May 2018 10:59:21 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3FB47AEA6; Sun, 20 May 2018 10:59:20 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id E1CA6173AD; Sun, 20 May 2018 10:59:20 +0000 (UTC) Date: Sun, 20 May 2018 10:59:20 +0000 From: Alexey Dokuchaev To: Mark Johnston Cc: Matthew Macy , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste Subject: Re: svn commit: r333872 - head/cddl/contrib/opensolaris/tools/ctf/cvt Message-ID: <20180520105920.GA30998@FreeBSD.org> References: <201805190631.w4J6VHhr094225@repo.freebsd.org> <20180519194437.GA21485@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180519194437.GA21485@raichu> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 10:59:21 -0000 On Sat, May 19, 2018 at 03:44:37PM -0400, Mark Johnston wrote: > ... > I don't really think it's important. The main consideration is the > toolchain. We use illumos as an upstream, which is pretty inactive at > this point. Joyent's illumos fork has put a lot of work into the CTF > toolchain, and OpenBSD has made some progress towards an ISC-licensed > ctfconvert utility. I'd like to import the latter, since the permissive > license means that we can use it in DDB. It requires more work because > of some missing functionality, though. > > At some point I think we'd like to pursue one of these two upstreams, Quick reality check question: why aren't *we* (FreeBSD) upstream, since Sun was killed by Oracle and we're more alive than illumos and OpenBSD? ./danfe From owner-svn-src-head@freebsd.org Sun May 20 14:21:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67122EE2499; Sun, 20 May 2018 14:21:21 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 176EF80EEC; Sun, 20 May 2018 14:21:21 +0000 (UTC) (envelope-from dumbbell@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECB32177E4; Sun, 20 May 2018 14:21:20 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KELKbg067887; Sun, 20 May 2018 14:21:20 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KELKmY067883; Sun, 20 May 2018 14:21:20 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201805201421.w4KELKmY067883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Date: Sun, 20 May 2018 14:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333925 - head/sys/teken X-SVN-Group: head X-SVN-Commit-Author: dumbbell X-SVN-Commit-Paths: head/sys/teken X-SVN-Commit-Revision: 333925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 14:21:21 -0000 Author: dumbbell Date: Sun May 20 14:21:20 2018 New Revision: 333925 URL: https://svnweb.freebsd.org/changeset/base/333925 Log: teken, vt(4): Parse the "Cursor style" escape sequence The escape sequence (e.g. `^[[2 q`) was unsupported before and the letter `q` was displayed as a typed character. The sequence is used by Neovim for instance. Now, it is properly parsed. However, it is ignored, so it won't change the cursor style. Because the escape sequence contains a space character, the `gensequences` script had to be modified to support that. In the `sequences` file, a space is represented as the string `SP`. Modified: head/sys/teken/gensequences head/sys/teken/sequences head/sys/teken/teken_subr.h Modified: head/sys/teken/gensequences ============================================================================== --- head/sys/teken/gensequences Sun May 20 06:14:12 2018 (r333924) +++ head/sys/teken/gensequences Sun May 20 14:21:20 2018 (r333925) @@ -35,10 +35,19 @@ function die(msg) { function cchar(str) { if (str == "^[") return "\\x1B"; + if (str == "SP") + return " "; return str; } +function csequence(str) { + if (str == "SP") + return " "; + + return str; +} + BEGIN { FS = "\t+" @@ -57,7 +66,7 @@ while (getline > 0) { prefix = ""; l_prefix_name[""] = "teken_state_init"; for (i = 1; i < nsequences; i++) { - n = prefix sequence[i]; + n = prefix csequence(sequence[i]); l_prefix_parent[n] = prefix; l_prefix_suffix[n] = sequence[i]; if (!l_prefix_name[n]) Modified: head/sys/teken/sequences ============================================================================== --- head/sys/teken/sequences Sun May 20 06:14:12 2018 (r333924) +++ head/sys/teken/sequences Sun May 20 14:21:20 2018 (r333925) @@ -48,6 +48,7 @@ CUF Cursor Forward ^[ [ a n CUP Cursor Position ^[ [ H n n CUP Cursor Position ^[ [ f n n CUU Cursor Up ^[ [ A n +CS Cursor style ^[ [ SP q r DA1 Primary Device Attributes ^[ [ c r DA2 Secondary Device Attributes ^[ [ > c r DC Delete character ^[ [ P n Modified: head/sys/teken/teken_subr.h ============================================================================== --- head/sys/teken/teken_subr.h Sun May 20 06:14:12 2018 (r333924) +++ head/sys/teken/teken_subr.h Sun May 20 14:21:20 2018 (r333925) @@ -372,6 +372,25 @@ teken_subr_cursor_up(teken_t *t, unsigned int nrows) } static void +teken_subr_cursor_style(teken_t *t, unsigned int style) +{ + + /* TODO */ + + /* + * CSI Ps SP q + * Set cursor style (DECSCUSR), VT520. + * Ps = 0 -> blinking block. + * Ps = 1 -> blinking block (default). + * Ps = 2 -> steady block. + * Ps = 3 -> blinking underline. + * Ps = 4 -> steady underline. + * Ps = 5 -> blinking bar (xterm). + * Ps = 6 -> steady bar (xterm). + */ +} + +static void teken_subr_delete_character(const teken_t *t, unsigned int ncols) { teken_rect_t tr; From owner-svn-src-head@freebsd.org Sun May 20 14:24:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA5DCEE2770 for ; Sun, 20 May 2018 14:24:21 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x234.google.com (mail-yw0-x234.google.com [IPv6:2607:f8b0:4002:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AED5811EC for ; Sun, 20 May 2018 14:24:21 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x234.google.com with SMTP id q7-v6so3784826ywd.9 for ; Sun, 20 May 2018 07:24:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=U89ilH66OeThvS4uD5XE0+rrwAZGUHLz021pJAcvt98=; b=Ijmic80AnLmcAVkBXFLoNE1I3GnOEVWCMOggl+ZRSl2PNPo9ueGx1tSL9y00/eziv9 ZvLjnglflv67T26Nzdk5SI3eW9NwqOL0YcK/KuRgu2WwaFs6BXIoIlNfiKNXxsOmi9eG wLk3tcVmQF24JbOsgdvYRWhp6Pz5NiC+KSHYo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=U89ilH66OeThvS4uD5XE0+rrwAZGUHLz021pJAcvt98=; b=rSgAGHBIZalI4xcilszwrKi1jG1gw2LAtirqbLKoqcAlQlK8Y1D3UHDuZdtbRebOI0 wiPaL1y8Aic2zq1hWpC3SrCA/ZKkyyXEMGwZyZzr132RNAel0uXm4DI9Ag6Z8gLtk6Fw B0xPAUEPQBZLaDoAKBgfMJtI341y5ACkW+NSGD0stLqareOIF7ZCQ0Hc0dxw6KtQwTeA 1VcLm8fXZGdQiSEezjI8XpVPJrbKUwm7ZLH1J7/25Vq608H7k3GhIqJx9KmAcoE0A31p 71driHGgK+9zeQNje1yFMZapQmYmCwqbTidsUSiXJGupE8cZ3UOdPHXcmy7lWC3juoEJ TDxQ== X-Gm-Message-State: ALKqPwdHhqguT9M9U0WIOCwZLER269ZZVX8M9Dv1WONV1ztMaF/idsUH VPSsODamPcS27yk3KuaujWZOLFOsmrOggc0bPK4TXA== X-Google-Smtp-Source: AB8JxZrgb5NSD2Z5yzyAx6KYjgQ/SeGfDKhksnq827zFGTrKppjRegtkJyRAFZJbN7x3nXnFCRchhybZn+Xosu4wXfc= X-Received: by 2002:a81:a68a:: with SMTP id d132-v6mr8379571ywh.387.1526826260864; Sun, 20 May 2018 07:24:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Sun, 20 May 2018 07:23:50 -0700 (PDT) In-Reply-To: <201805200559.w4K5xaBS013317@repo.freebsd.org> References: <201805200559.w4K5xaBS013317@repo.freebsd.org> From: Eitan Adler Date: Sun, 20 May 2018 07:23:50 -0700 Message-ID: Subject: Re: svn commit: r333922 - head/lib/libmagic To: Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 14:24:22 -0000 On 19 May 2018 at 22:59, Cy Schubert wrote: > Author: cy > Date: Sun May 20 05:59:35 2018 > New Revision: 333922 > URL: https://svnweb.freebsd.org/changeset/base/333922 > > Log: > Fix build post r333919. Thanks! I had tested the build of file(1) but not libmagic as i had separately installed it. Sorry the breakage. -- Eitan Adler From owner-svn-src-head@freebsd.org Sun May 20 14:33:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10B95EE2B45; Sun, 20 May 2018 14:33:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 53E6E816F3; Sun, 20 May 2018 14:33:07 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id KPLwfmguHuYopKPLyfa6ww; Sun, 20 May 2018 08:30:31 -0600 X-Authority-Analysis: v=2.3 cv=GopsBH9C c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=xfDLHkLGAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=rQbKd6Pc9alCI02DDZkA:9 a=CjuIK1q_8ugA:10 a=vRcdKC0ogzYA:10 a=IfaqVvZgccqrtc8gcwf2:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 8EE04D62; Sun, 20 May 2018 07:30:28 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4KEUSOW057001; Sun, 20 May 2018 07:30:28 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4KEUSWN056998; Sun, 20 May 2018 07:30:28 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805201430.w4KEUSWN056998@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Eitan Adler cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333922 - head/lib/libmagic In-Reply-To: Message from Eitan Adler of "Sun, 20 May 2018 07:23:50 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 20 May 2018 07:30:28 -0700 X-CMAE-Envelope: MS4wfL1Tz6RobfkXVyeOJmgwkF/orSDahvGt7OQiJmTX51Q6RO7sg1YdbFYCW+Lg8kSS+OFrHX/ZkbX7y4gywlXnVMVUryrAKZFv5ArW5f4bhoE/UQzAxpql WAy8AvVj96jtpfKsn38HUs17I0eLmCt8nFgUz/doDuBWoJe/n42uNk3s5AwGcdhnq7INhJsK9+7R07JT9auW3KqUjlVE1Xths1P/5ln1b9Tp4cYrixTHoGM0 aclOTRM/evZPMIo5yvpYdoHAN/3IHmzvhudVA/N59VGZ67t8EY0W2G3b+zj3RVhtc+v2ibmQdGW/EIMEhxxGipyD/dPWAWosXDfGI9zuz58= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 14:33:09 -0000 In message , Eitan Adler writes: > On 19 May 2018 at 22:59, Cy Schubert wrote: > > Author: cy > > Date: Sun May 20 05:59:35 2018 > > New Revision: 333922 > > URL: https://svnweb.freebsd.org/changeset/base/333922 > > > > Log: > > Fix build post r333919. > > Thanks! I had tested the build of file(1) but not libmagic as i had > separately installed it. Sorry the breakage. No problem. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sun May 20 16:29:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A981BEE5F27; Sun, 20 May 2018 16:29:48 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pl0-x242.google.com (mail-pl0-x242.google.com [IPv6:2607:f8b0:400e:c01::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 24FCD85231; Sun, 20 May 2018 16:29:48 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pl0-x242.google.com with SMTP id bi12-v6so7331924plb.12; Sun, 20 May 2018 09:29:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=61hqXGGBlwW+cFtPKuyxnjbGwnbJgzAswSXFT52xbN8=; b=lH+FtHAmqHjnr1xxfendkgZiyyNObRAFjWzsFc20flW9maF0pAUcZy3TOFTclxm9rl sJFJCTUNt6GVRueAh/BtNwStfEpUMDs3QvipiwuRW7NsPJgwkIuhyvsETZ3BhiXT2/kV 7NIH2kzYb8f7CH03X/ac5JQitKT3VGOn9xNjP3VuoTooSvToiYM6Dc7eHezbEcrcUnMp PVbLPf2/1ibHgoTpc39/DIg+fN/JA27pCf2Rhfz2FfrH+S20XIGK/4eGR8315OlMG/NE rN0mSPhiki7gY6iKe86Si4IzGRocMBcHy5HEy4Y+ZVd5nEHIl+SvHDHe+L0rQ8Psu2CN KTzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=61hqXGGBlwW+cFtPKuyxnjbGwnbJgzAswSXFT52xbN8=; b=G/9trOwxTcNqCSfB6RxkcGvbanOMoLV/s+fLt5kJ6TYq15sK37VwdnxUE1xjey6GA/ d9CiPUHmFOdfvYiU20qiYbQaB5OAzOg59F1dAI57JIQtIL4GFfgw05CjyT+wgVJ6ccNN 2v76YItg5peGzs5kXSOz2O4ReBO5b9TBnGRUtVfNN9Jlfu2rvszJKLedBPJXRIRydvhT aofk0Sn2DO0sGsNBtOLxfH64OJviRVty/BfXKnEB8Dklz9ek4N3xJvCHNKVtJ9FVWK4M JqwecVsFtFbiX/6MkYdU62E2LpVlSvKh5K9/nPGh4kG/r+S4UhDttpKrv7e2SHLy3J8b nstw== X-Gm-Message-State: ALKqPwdHf2J+AQ2oc5db6bjMFAqeDTq7NCQ6keZ78okpOXM4uUI47ctr +wxyJrmkVn4hMBxTLFQCXBmgxozK X-Google-Smtp-Source: AB8JxZqkjmvY1CGQH9uvBmF9yzBGP+/LVjrPXMhA9XlP7Qzk2i8wu5fqfyy9AuTeXen04uznk/KnZQ== X-Received: by 2002:a17:902:6e08:: with SMTP id u8-v6mr17149848plk.96.1526833786944; Sun, 20 May 2018 09:29:46 -0700 (PDT) Received: from raichu (toroon0560w-lp140-02-70-49-169-156.dsl.bell.ca. [70.49.169.156]) by smtp.gmail.com with ESMTPSA id 23-v6sm25782277pfs.147.2018.05.20.09.29.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 May 2018 09:29:46 -0700 (PDT) Sender: Mark Johnston Date: Sun, 20 May 2018 12:29:40 -0400 From: Mark Johnston To: Alexey Dokuchaev Cc: Matthew Macy , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Ed Maste Subject: Re: svn commit: r333872 - head/cddl/contrib/opensolaris/tools/ctf/cvt Message-ID: <20180520162940.GA2277@raichu> References: <201805190631.w4J6VHhr094225@repo.freebsd.org> <20180519194437.GA21485@raichu> <20180520105920.GA30998@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180520105920.GA30998@FreeBSD.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 16:29:48 -0000 On Sun, May 20, 2018 at 10:59:20AM +0000, Alexey Dokuchaev wrote: > On Sat, May 19, 2018 at 03:44:37PM -0400, Mark Johnston wrote: > > ... > > I don't really think it's important. The main consideration is the > > toolchain. We use illumos as an upstream, which is pretty inactive at > > this point. Joyent's illumos fork has put a lot of work into the CTF > > toolchain, and OpenBSD has made some progress towards an ISC-licensed > > ctfconvert utility. I'd like to import the latter, since the permissive > > license means that we can use it in DDB. It requires more work because > > of some missing functionality, though. > > > > At some point I think we'd like to pursue one of these two upstreams, > > Quick reality check question: why aren't *we* (FreeBSD) upstream, since > Sun was killed by Oracle and we're more alive than illumos and OpenBSD? Most of the non-trivial commits to the CTF toolchain in the past several years were done by me, and they were just bug fixes. AFAIK no one is actively working on improving the CTF toolchain in FreeBSD. The Joyent fork has lots of improvements and cleanups that make the code easier to maintain and more useful (for instance, librarifying ctfmerge(1)), and OpenBSD's ctfconv(1) replaces both ctfconvert(1) and ctfmerge(1), and is simpler. My point was merely that anyone seeking to overhaul the CTF toolchain in FreeBSD should consider rebasing on one of these two potential upstreams. From owner-svn-src-head@freebsd.org Sun May 20 17:25:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6558EE7945; Sun, 20 May 2018 17:25:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 871A78702E; Sun, 20 May 2018 17:25:53 +0000 (UTC) (envelope-from jilles@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 685FF19579; Sun, 20 May 2018 17:25:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KHPrIQ059292; Sun, 20 May 2018 17:25:53 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KHPqje059288; Sun, 20 May 2018 17:25:52 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201805201725.w4KHPqje059288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 20 May 2018 17:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333927 - in head/bin/sh: . tests/expansion X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in head/bin/sh: . tests/expansion X-SVN-Commit-Revision: 333927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 17:25:54 -0000 Author: jilles Date: Sun May 20 17:25:52 2018 New Revision: 333927 URL: https://svnweb.freebsd.org/changeset/base/333927 Log: sh: Allow unquoted newlines in word in ${param+word} etc. POSIX requires accepting unquoted newlines in word in parameter expansions like ${param+word}, ${param#word}, although the Bourne shell did not support it, it is not commonly used and might make it harder to find a missing closing brace. It was also strange that something like foo="${bar# }" was rejected. Reported by: Martijn Dekker via Robert Elz Added: head/bin/sh/tests/expansion/plus-minus9.0 (contents, props changed) head/bin/sh/tests/expansion/trim10.0 (contents, props changed) head/bin/sh/tests/expansion/trim11.0 (contents, props changed) Modified: head/bin/sh/parser.c head/bin/sh/tests/expansion/Makefile Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sun May 20 16:03:21 2018 (r333926) +++ head/bin/sh/parser.c Sun May 20 17:25:52 2018 (r333927) @@ -1434,7 +1434,8 @@ readtoken1(int firstc, char const *initialsyntax, cons switch(synentry) { case CNL: /* '\n' */ - if (state[level].syntax == BASESYNTAX) + if (level == 0 && + state[level].syntax == BASESYNTAX) goto endword; /* exit outer loop */ USTPUTC(c, out); plinno++; Modified: head/bin/sh/tests/expansion/Makefile ============================================================================== --- head/bin/sh/tests/expansion/Makefile Sun May 20 16:03:21 2018 (r333926) +++ head/bin/sh/tests/expansion/Makefile Sun May 20 17:25:52 2018 (r333927) @@ -84,6 +84,7 @@ ${PACKAGE}FILES+= plus-minus5.0 ${PACKAGE}FILES+= plus-minus6.0 ${PACKAGE}FILES+= plus-minus7.0 ${PACKAGE}FILES+= plus-minus8.0 +${PACKAGE}FILES+= plus-minus9.0 ${PACKAGE}FILES+= question1.0 ${PACKAGE}FILES+= readonly1.0 ${PACKAGE}FILES+= redir1.0 @@ -101,5 +102,7 @@ ${PACKAGE}FILES+= trim6.0 ${PACKAGE}FILES+= trim7.0 ${PACKAGE}FILES+= trim8.0 ${PACKAGE}FILES+= trim9.0 +${PACKAGE}FILES+= trim10.0 +${PACKAGE}FILES+= trim11.0 .include Added: head/bin/sh/tests/expansion/plus-minus9.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/plus-minus9.0 Sun May 20 17:25:52 2018 (r333927) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +a=1 +b=${a+ +} +n=' +' +[ "$b" = "$n" ] Added: head/bin/sh/tests/expansion/trim10.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/trim10.0 Sun May 20 17:25:52 2018 (r333927) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +a='z +' +b=${a% +} +[ "$b" = z ] Added: head/bin/sh/tests/expansion/trim11.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/trim11.0 Sun May 20 17:25:52 2018 (r333927) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +a='z +' +b="${a% +}" +[ "$b" = z ] From owner-svn-src-head@freebsd.org Sun May 20 17:58:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F37DEE8A69; Sun, 20 May 2018 17:58:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 212F9682F9; Sun, 20 May 2018 17:58:23 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01DE219A45; Sun, 20 May 2018 17:58:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KHwMnE074381; Sun, 20 May 2018 17:58:22 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KHwMxY074380; Sun, 20 May 2018 17:58:22 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805201758.w4KHwMxY074380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 17:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333928 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 17:58:23 -0000 Author: eadler Date: Sun May 20 17:58:22 2018 New Revision: 333928 URL: https://svnweb.freebsd.org/changeset/base/333928 Log: top(1): remove 'xs' and 'xh' source files Now that we're our own upstream these files buy us nothing. Deleted: head/usr.bin/top/top.local.hs head/usr.bin/top/top.xs Modified: head/usr.bin/top/Makefile Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Sun May 20 17:25:52 2018 (r333927) +++ head/usr.bin/top/Makefile Sun May 20 17:58:22 2018 (r333928) @@ -16,15 +16,4 @@ SIGNAL_H= ${SRCTOP}/sys/sys/signal.h sigdesc.h: sigconv.awk ${SIGNAL_H} awk -f ${SRCTOP}/usr.bin/top/sigconv.awk < ${SIGNAL_H} > ${.TARGET} -.SUFFIXES: .xs .x .hs .h -.xs.x .hs.h: - @${ECHO} Making ${.TARGET} from ${.IMPSRC} - @sed -e's,%LoadMax%,5.0,g' \ - -e's,%TableSize%,20011,g' \ - -e's,%NominalTopn%,18,g' \ - -e's,%topn%,-1,g' \ - -e's,%delay%,2,g' \ - -e's,%random%,1,g' \ - ${.IMPSRC} > ${.TARGET} - .include From owner-svn-src-head@freebsd.org Sun May 20 18:00:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19A62EE8B6C; Sun, 20 May 2018 18:00:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3A106849B; Sun, 20 May 2018 17:59:59 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5D0519A47; Sun, 20 May 2018 17:59:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KHxxmg074471; Sun, 20 May 2018 17:59:59 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KHxxWS074470; Sun, 20 May 2018 17:59:59 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805201759.w4KHxxWS074470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 17:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333929 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 18:00:00 -0000 Author: eadler Date: Sun May 20 17:59:59 2018 New Revision: 333929 URL: https://svnweb.freebsd.org/changeset/base/333929 Log: top(1): Make lack of "percent" information explicit When count is 1, no delta information can be produced. Make this explicit. PR: 195717 Submitted by: fernape Modified: head/usr.bin/top/top.1 Modified: head/usr.bin/top/top.1 ============================================================================== --- head/usr.bin/top/top.1 Sun May 20 17:58:22 2018 (r333928) +++ head/usr.bin/top/top.1 Sun May 20 17:59:59 2018 (r333929) @@ -162,7 +162,10 @@ screen. This option allows the user to select the num wants to see before .I top automatically exits. For intelligent terminals, no upper limit -is set. The default is 1 for dumb terminals. +is set. The default is 1 for dumb terminals. Please, note that for +.I count += 1 +no information is available about the percentage of time spent by the CPU in every state. .TP .BI \-s time Set the delay between screen updates to From owner-svn-src-head@freebsd.org Sun May 20 18:02:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 264E4EE8FBD; Sun, 20 May 2018 18:02:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D013468A9C; Sun, 20 May 2018 18:02:41 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2B3A19BD6; Sun, 20 May 2018 18:02:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KI2f4o079046; Sun, 20 May 2018 18:02:41 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KI2fOH079043; Sun, 20 May 2018 18:02:41 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805201802.w4KI2fOH079043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 18:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333930 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 18:02:42 -0000 Author: eadler Date: Sun May 20 18:02:40 2018 New Revision: 333930 URL: https://svnweb.freebsd.org/changeset/base/333930 Log: revert r333928 I had missed a file when testing this, and it does not build. Will try again. Added: head/usr.bin/top/top.local.hs - copied unchanged from r333927, head/usr.bin/top/top.local.hs head/usr.bin/top/top.xs - copied unchanged from r333927, head/usr.bin/top/top.xs Modified: head/usr.bin/top/Makefile head/usr.bin/top/screen.c Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Sun May 20 17:59:59 2018 (r333929) +++ head/usr.bin/top/Makefile Sun May 20 18:02:40 2018 (r333930) @@ -16,4 +16,15 @@ SIGNAL_H= ${SRCTOP}/sys/sys/signal.h sigdesc.h: sigconv.awk ${SIGNAL_H} awk -f ${SRCTOP}/usr.bin/top/sigconv.awk < ${SIGNAL_H} > ${.TARGET} +.SUFFIXES: .xs .x .hs .h +.xs.x .hs.h: + @${ECHO} Making ${.TARGET} from ${.IMPSRC} + @sed -e's,%LoadMax%,5.0,g' \ + -e's,%TableSize%,20011,g' \ + -e's,%NominalTopn%,18,g' \ + -e's,%topn%,-1,g' \ + -e's,%delay%,2,g' \ + -e's,%random%,1,g' \ + ${.IMPSRC} > ${.TARGET} + .include Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Sun May 20 17:59:59 2018 (r333929) +++ head/usr.bin/top/screen.c Sun May 20 18:02:40 2018 (r333930) @@ -36,7 +36,6 @@ # include # endif #endif -#if defined(TERMIO) || defined(TERMIOS) # ifndef TAB3 # ifdef OXTABS # define TAB3 OXTABS @@ -44,7 +43,6 @@ # define TAB3 0 # endif # endif -#endif #include #include #include "screen.h" @@ -75,18 +73,12 @@ char *end_standout; char *terminal_init; char *terminal_end; -#ifdef SGTTY static struct sgttyb old_settings; static struct sgttyb new_settings; -#endif -#ifdef TERMIO static struct termio old_settings; static struct termio new_settings; -#endif -#ifdef TERMIOS static struct termios old_settings; static struct termios new_settings; -#endif static char is_a_terminal = No; #ifdef TOStop static int old_lword; @@ -217,24 +209,18 @@ int interactive; get_screensize(); /* if stdout is not a terminal, pretend we are a dumb terminal */ -#ifdef SGTTY if (ioctl(STDOUT, TIOCGETP, &old_settings) == -1) { smart_terminal = No; } -#endif -#ifdef TERMIO if (ioctl(STDOUT, TCGETA, &old_settings) == -1) { smart_terminal = No; } -#endif -#ifdef TERMIOS if (tcgetattr(STDOUT, &old_settings) == -1) { smart_terminal = No; } -#endif } void @@ -242,7 +228,6 @@ init_screen() { /* get the old settings for safe keeping */ -#ifdef SGTTY if (ioctl(STDOUT, TIOCGETP, &old_settings) != -1) { /* copy the settings so we can modify them */ @@ -271,8 +256,6 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } -#endif -#ifdef TERMIO if (ioctl(STDOUT, TCGETA, &old_settings) != -1) { /* copy the settings so we can modify them */ @@ -295,8 +278,6 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } -#endif -#ifdef TERMIOS if (tcgetattr(STDOUT, &old_settings) != -1) { /* copy the settings so we can modify them */ @@ -319,7 +300,6 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } -#endif if (!is_a_terminal) { @@ -344,18 +324,12 @@ end_screen() /* if we have settings to reset, then do so */ if (is_a_terminal) { -#ifdef SGTTY (void) ioctl(STDOUT, TIOCSETP, &old_settings); #ifdef TOStop (void) ioctl(STDOUT, TIOCLSET, &old_lword); #endif -#endif -#ifdef TERMIO (void) ioctl(STDOUT, TCSETA, &old_settings); -#endif -#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, &old_settings); -#endif } } @@ -366,18 +340,12 @@ reinit_screen() /* install our settings if it is a terminal */ if (is_a_terminal) { -#ifdef SGTTY (void) ioctl(STDOUT, TIOCSETP, &new_settings); #ifdef TOStop (void) ioctl(STDOUT, TIOCLSET, &new_lword); #endif -#endif -#ifdef TERMIO (void) ioctl(STDOUT, TCSETA, &new_settings); -#endif -#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, &new_settings); -#endif } /* send init string */ @@ -392,7 +360,6 @@ get_screensize() { -#ifdef TIOCGWINSZ struct winsize ws; @@ -408,25 +375,6 @@ get_screensize() } } -#else -#ifdef TIOCGSIZE - - struct ttysize ts; - - if (ioctl (1, TIOCGSIZE, &ts) != -1) - { - if (ts.ts_lines != 0) - { - screen_length = ts.ts_lines; - } - if (ts.ts_cols != 0) - { - screen_width = ts.ts_cols - 1; - } - } - -#endif /* TIOCGSIZE */ -#endif /* TIOCGWINSZ */ (void) strncpy(lower_left, tgoto(cursor_motion, 0, screen_length - 1), sizeof(lower_left) - 1); Copied: head/usr.bin/top/top.local.hs (from r333927, head/usr.bin/top/top.local.hs) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/top/top.local.hs Sun May 20 18:02:40 2018 (r333930, copy of r333927, head/usr.bin/top/top.local.hs) @@ -0,0 +1,68 @@ +/* + * Top - a top users display for Berkeley Unix + * + * Definitions for things that might vary between installations. + */ + +/* + * The space command forces an immediate update. Sometimes, on loaded + * systems, this update will take a significant period of time (because all + * the output is buffered). So, if the short-term load average is above + * "LoadMax", then top will put the cursor home immediately after the space + * is pressed before the next update is attempted. This serves as a visual + * acknowledgement of the command. On Suns, "LoadMax" will get multiplied by + * "FSCALE" before being compared to avenrun[0]. Therefore, "LoadMax" + * should always be specified as a floating point number. + */ +#ifndef LoadMax +#define LoadMax %LoadMax% +#endif + +/* + * "Table_size" defines the size of the hash tables used to map uid to + * username. The number of users in /etc/passwd CANNOT be greater than + * this number. If the error message "table overflow: too many users" + * is printed by top, then "Table_size" needs to be increased. Things will + * work best if the number is a prime number that is about twice the number + * of lines in /etc/passwd. + */ +#ifndef Table_size +#define Table_size %TableSize% +#endif + +/* + * "Nominal_TOPN" is used as the default TOPN when Default_TOPN is Infinity + * and the output is a dumb terminal. If we didn't do this, then + * installations who use a default TOPN of Infinity will get every + * process in the system when running top on a dumb terminal (or redirected + * to a file). Note that Nominal_TOPN is a default: it can still be + * overridden on the command line, even with the value "infinity". + */ +#ifndef Nominal_TOPN +#define Nominal_TOPN %NominalTopn% +#endif + +#ifndef Default_TOPN +#define Default_TOPN %topn% +#endif + +#ifndef Default_DELAY +#define Default_DELAY %delay% +#endif + +/* + * If the local system's getpwnam interface uses random access to retrieve + * a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining + * RANDOM_PW will take advantage of that fact. If RANDOM_PW is defined, + * then getpwnam is used and the result is cached. If not, then getpwent + * is used to read and cache the password entries sequentially until the + * desired one is found. + * + * We initially set RANDOM_PW to something which is controllable by the + * Configure script. Then if its value is 0, we undef it. + */ + +#define RANDOM_PW %random% +#if RANDOM_PW == 0 +#undef RANDOM_PW +#endif Copied: head/usr.bin/top/top.xs (from r333927, head/usr.bin/top/top.xs) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/top/top.xs Sun May 20 18:02:40 2018 (r333930, copy of r333927, head/usr.bin/top/top.xs) @@ -0,0 +1,459 @@ +.\" NOTE: changes to the manual page for "top" should be made in the +.\" file "top.X" and NOT in the file "top.1". +.\" $FreeBSD$ +.nr N %topn% +.nr D %delay% +.TH TOP 1 Local +.UC 4 +.SH NAME +top \- display and update information about the top cpu processes +.SH SYNOPSIS +.B top +[ +.B \-abCHIijnPqStuvwz +] [ +.BI \-d count +] [ +.BI \-m io | cpu +] [ +.BI \-o field +] [ +.BI \-s time +] [ +.BI \-J jail +] [ +.BI \-U username +] [ +.I number +] +.SH DESCRIPTION +.\" This defines appropriate quote strings for nroff and troff +.ds lq \&" +.ds rq \&" +.if t .ds lq `` +.if t .ds rq '' +.\" Just in case these number registers aren't set yet... +.if \nN==0 .nr N 10 +.if \nD==0 .nr D 2 +.I Top +displays the top +.if !\nN==-1 \nN +processes on the system and periodically updates this information. +.if \nN==-1 \ +\{\ +If standard output is an intelligent terminal (see below) then +as many processes as will fit on the terminal screen are displayed +by default. Otherwise, a good number of them are shown (around 20). +.\} +Raw cpu percentage is used to rank the processes. If +.I number +is given, then the top +.I number +processes will be displayed instead of the default. +.PP +.I Top +makes a distinction between terminals that support advanced capabilities +and those that do not. This +distinction affects the choice of defaults for certain options. In the +remainder of this document, an \*(lqintelligent\*(rq terminal is one that +supports cursor addressing, clear screen, and clear to end of line. +Conversely, a \*(lqdumb\*(rq terminal is one that does not support such +features. If the output of +.I top +is redirected to a file, it acts as if it were being run on a dumb +terminal. +.SH OPTIONS +.TP +.B \-C +Toggle CPU display mode. +By default top displays the weighted CPU percentage in the WCPU column +(this is the same value that +.IR ps (1) +displays as CPU). +Each time +.B \-C +flag is passed it toggles between \*(lqraw cpu\*(rq mode +and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or +the \*(lqWCPU\*(rq column respectively. +.TP +.B \-S +Show system processes in the display. Normally, system processes such as +the pager and the swapper are not shown. This option makes them visible. +.TP +.B \-a +Display command names derived from the argv[] vector, rather than real +executable name. It's useful when you want to watch applications, that +puts their status information there. If the real name differs from argv[0], +it will be displayed in parenthesis. +.TP +.B \-b +Use \*(lqbatch\*(rq mode. In this mode, all input from the terminal is +ignored. Interrupt characters (such as ^C and ^\e) still have an effect. +This is the default on a dumb terminal, or when the output is not a terminal. +.TP +.B \-H +Display each thread for a multithreaded process individually. +By default a single summary line is displayed for each process. +.TP +.B \-i +Use \*(lqinteractive\*(rq mode. In this mode, any input is immediately +read for processing. See the section on \*(lqInteractive Mode\*(rq +for an explanation of +which keys perform what functions. After the command is processed, the +screen will immediately be updated, even if the command was not +understood. This mode is the default when standard output is an +intelligent terminal. +.TP +.B \-I +Do not display idle processes. +By default, top displays both active and idle processes. +.TP +.B \-j +Display the +.IR jail (8) +ID. +.TP +.B \-t +Do not display the +.I top +process. +.TP +.BI \-m display +Display either 'cpu' or 'io' statistics. Default is 'cpu'. +.TP +.B \-n +Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq +mode. +.TP +.B \-P +Display per-cpu CPU usage statistics. +.TP +.B \-q +Renice +.I top +to -20 so that it will run faster. This can be used when the system is +being very sluggish to improve the possibility of discovering the problem. +This option can only be used by root. +.TP +.B \-u +Do not take the time to map uid numbers to usernames. Normally, +.I top +will read as much of the file \*(lq/etc/passwd\*(rq as is necessary to map +all the user id numbers it encounters into login names. This option +disables all that, while possibly decreasing execution time. The uid +numbers are displayed instead of the names. +.TP +.B \-v +Write version number information to stderr then exit immediately. +No other processing takes place when this option is used. To see current +revision information while top is running, use the help command \*(lq?\*(rq. +.TP +.B \-w +Display approximate swap usage for each process. +.TP +.B \-z +Do not display the system idle process. +.TP +.BI \-d count +Show only +.I count +displays, then exit. A display is considered to be one update of the +screen. This option allows the user to select the number of displays he +wants to see before +.I top +automatically exits. For intelligent terminals, no upper limit +is set. The default is 1 for dumb terminals. +.TP +.BI \-s time +Set the delay between screen updates to +.I time +seconds. The default delay between updates is \nD seconds. +.TP +.BI \-o field +Sort the process display area on the specified field. The field name +is the name of the column as seen in the output, but in lower case: +\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, +\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, +\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, +\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. +.TP +.BI \-J jail +Show only those processes owned by +.IR jail . +This may be either the +.B jid +or +.B name +of the jail. +Use +.B 0 +to limit to host processes. +Using this option implies the +.B \-j +flag. +.PP +.BI \-U username +Show only those processes owned by +.IR username . +This option currently only accepts usernames and will not understand +uid numbers. +.PP +Both +.I count +and +.I number +fields can be specified as \*(lqinfinite\*(rq, indicating that they can +stretch as far as possible. This is accomplished by using any proper +prefix of the keywords +\*(lqinfinity\*(rq, +\*(lqmaximum\*(rq, +or +\*(lqall\*(rq. +The default for +.I count +on an intelligent terminal is, in fact, +.BI infinity . +.PP +The environment variable +.B TOP +is examined for options before the command line is scanned. This enables +a user to set his or her own defaults. The number of processes to display +can also be specified in the environment variable +.BR TOP . +The options +.BR \-a , +.BR \-C , +.BR \-H , +.BR \-I , +.BR \-j , +.BR \-P , +.BR \-S , +.BR \-t , +.BR \-u , +.BR \-w , +and +.B \-z +are actually toggles. A second specification of any of these options +will negate the first. Thus a user who has the environment variable +.B TOP +set to \*(lq\-I\*(rq may use the command \*(lqtop \-I\*(rq to see idle processes. +.SH "INTERACTIVE MODE" +When +.I top +is running in \*(lqinteractive mode\*(rq, it reads commands from the +terminal and acts upon them accordingly. In this mode, the terminal is +put in \*(lqCBREAK\*(rq, so that a character will be +processed as soon as it is typed. Almost always, a key will be +pressed when +.I top +is between displays; that is, while it is waiting for +.I time +seconds to elapse. If this is the case, the command will be +processed and the display will be updated immediately thereafter +(reflecting any changes that the command may have specified). This +happens even if the command was incorrect. If a key is pressed while +.I top +is in the middle of updating the display, it will finish the update and +then process the command. Some commands require additional information, +and the user will be prompted accordingly. While typing this information +in, the user's erase and kill keys (as set up by the command +.IR stty ) +are recognized, and a newline terminates the input. +.PP +These commands are currently recognized (^L refers to control-L): +.TP +.B ^L +Redraw the screen. +.IP "\fBh\fP\ or\ \fB?\fP" +Display a summary of the commands (help screen). Version information +is included in this display. +.TP +.B q +Quit +.IR top. +.TP +.B d +Change the number of displays to show (prompt for new number). +Remember that the next display counts as one, so typing +.B d1 +will make +.I top +show one final display and then immediately exit. +.TP +.B m +Toggle the display between 'cpu' and 'io' modes. +.TP +.B n or # +Change the number of processes to display (prompt for new number). +.TP +.B s +Change the number of seconds to delay between displays +(prompt for new number). +.TP +.B S +Toggle the display of system processes. +.TP +.B a +Toggle the display of process titles. +.TP +.B k +Send a signal (\*(lqkill\*(rq by default) to a list of processes. This +acts similarly to the command +.IR kill (1)). +.TP +.B r +Change the priority (the \*(lqnice\*(rq) of a list of processes. +This acts similarly to the command +.IR renice (8)). +.TP +.B u +Display only processes owned by a specific set of usernames (prompt for +username). If the username specified is simply \*(lq+\*(rq or \*(lq-\*(rq, +then processes belonging to all users will be displayed. Usernames can be added +to and removed from the set by prepending them with \*(lq+\*(rq and +\*(lq-\*(rq, respectively. +.TP +.B o +Change the order in which the display is sorted. This command is not +available on all systems. The sort key names vary from system to system +but usually include: \*(lqcpu\*(rq, \*(lqres\*(rq, \*(lqsize\*(rq, +\*(lqtime\*(rq. The default is cpu. +.TP +.B e +Display a list of system errors (if any) generated by the last +.BR k ill +or +.BR r enice +command. +.TP +.B H +Toggle the display of threads. +.TP +.B i +(or +.BR I ) +Toggle the display of idle processes. +.TP +.B j +Toggle the display of +.IR jail (8) +ID. +.TP +.B J +Display only processes owned by a specific jail (prompt for jail). +If the jail specified is simply \*(lq+\*(rq, then processes belonging +to all jails and the host will be displayed. +This will also enable the display of JID. +.TP +.B P +Toggle the display of per-CPU statistics. +.TP +.B t +Toggle the display of the +.I top +process. +.TP +.B w +Toggle the display of swap usage. +.TP +.B z +Toggle the display of the system idle process. +.SH "THE DISPLAY" +The actual display varies depending on the specific variant of Unix +that the machine is running. This description may not exactly match +what is seen by top running on this particular machine. Differences +are listed at the end of this manual entry. +.PP +The top few lines of the display show general information +about the state of the system, including +the last process id assigned to a process (on most systems), +the three load averages, +the current time, +the number of existing processes, +the number of processes in each state +(sleeping, running, starting, zombies, and stopped), +and a percentage of time spent in each of the processor states +(user, nice, system, and idle). +It also includes information about physical and virtual memory allocation. +.PP +The remainder of the screen displays information about individual +processes. This display is similar in spirit to +.IR ps (1) +but it is not exactly the same. PID is the process id, +JID, when displayed, is the +.IR jail (8) +ID corresponding to the process, +USERNAME is the name of the process's owner (if +.B \-u +is specified, a UID column will be substituted for USERNAME), +PRI is the current priority of the process, +NICE is the nice amount (in the range \-20 to 20), +SIZE is the total size of the process (text, data, and stack), +RES is the current amount of resident memory, +SWAP is the approximate amount of swap, if enabled +(SIZE, RES and SWAP are given in kilobytes), +STATE is the current state (one of \*(lqSTART\*(rq, \*(lqRUN\*(rq +(shown as \*(lqCPUn\*(rq on SMP systems), \*(lqSLEEP\*(rq, \*(lqSTOP\*(rq, +\*(lqZOMB\*(rq, \*(lqWAIT\*(rq, \*(lqLOCK\*(rq or the event on which the +process waits), +C is the processor number on which the process is executing +(visible only on SMP systems), +TIME is the number of system and user cpu seconds that the process has used, +WCPU, when displayed, is the weighted cpu percentage (this is the same +value that +.IR ps (1) +displays as CPU), +CPU is the raw percentage and is the field that is sorted to determine +the order of the processes, and +COMMAND is the name of the command that the process is currently running +(if the process is swapped out, this column is marked \*(lq\*(rq). +.SH NOTES +If a process is in the \*(lqSLEEP\*(rq or \*(lqLOCK\*(rq state, +the state column will report the name of the event or lock on which the +process is waiting. +Lock names are prefixed with an asterisk \*(lq*\*(rq while sleep events +are not. +.SH AUTHOR +William LeFebvre, EECS Department, Northwestern University +.SH ENVIRONMENT +.DT +TOP user-configurable defaults for options. +.SH FILES +.DT +/dev/kmem kernel memory +.br +/dev/mem physical memory +.br +/etc/passwd used to map uid numbers to user names +.br +/boot/kernel/kernel system image +.SH BUGS +Don't shoot me, but the default for +.B \-I +has changed once again. So many people were confused by the fact that +.I top +wasn't showing them all the processes that I have decided to make the +default behavior show idle processes, just like it did in version 2. +But to appease folks who can't stand that behavior, I have added the +ability to set \*(lqdefault\*(rq options in the environment variable +.B TOP +(see the OPTIONS section). Those who want the behavior that version +3.0 had need only set the environment variable +.B TOP +to \*(lq\-I\*(rq. +.PP +The command name for swapped processes should be tracked down, but this +would make the program run slower. +.PP +As with +.IR ps (1), +things can change while +.I top +is collecting information for an update. The picture it gives is only a +close approximation to reality. +.SH "SEE ALSO" +kill(1), +ps(1), +stty(1), +mem(4), +renice(8) From owner-svn-src-head@freebsd.org Sun May 20 18:03:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95AB5EEA07A; Sun, 20 May 2018 18:03:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4591968C05; Sun, 20 May 2018 18:03:41 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 271EA19BD8; Sun, 20 May 2018 18:03:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KI3fbs079147; Sun, 20 May 2018 18:03:41 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KI3eeR079143; Sun, 20 May 2018 18:03:40 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805201803.w4KI3eeR079143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 18:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333931 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 18:03:42 -0000 Author: eadler Date: Sun May 20 18:03:40 2018 New Revision: 333931 URL: https://svnweb.freebsd.org/changeset/base/333931 Log: Retry revert I had a local modification before my revert. Try reverting one more time. Replaced: head/usr.bin/top/top.local.hs - copied unchanged from r333927, head/usr.bin/top/top.local.hs head/usr.bin/top/top.xs - copied unchanged from r333927, head/usr.bin/top/top.xs Modified: head/usr.bin/top/screen.c Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Sun May 20 18:02:40 2018 (r333930) +++ head/usr.bin/top/screen.c Sun May 20 18:03:40 2018 (r333931) @@ -36,6 +36,7 @@ # include # endif #endif +#if defined(TERMIO) || defined(TERMIOS) # ifndef TAB3 # ifdef OXTABS # define TAB3 OXTABS @@ -43,6 +44,7 @@ # define TAB3 0 # endif # endif +#endif #include #include #include "screen.h" @@ -73,12 +75,18 @@ char *end_standout; char *terminal_init; char *terminal_end; +#ifdef SGTTY static struct sgttyb old_settings; static struct sgttyb new_settings; +#endif +#ifdef TERMIO static struct termio old_settings; static struct termio new_settings; +#endif +#ifdef TERMIOS static struct termios old_settings; static struct termios new_settings; +#endif static char is_a_terminal = No; #ifdef TOStop static int old_lword; @@ -209,18 +217,24 @@ int interactive; get_screensize(); /* if stdout is not a terminal, pretend we are a dumb terminal */ +#ifdef SGTTY if (ioctl(STDOUT, TIOCGETP, &old_settings) == -1) { smart_terminal = No; } +#endif +#ifdef TERMIO if (ioctl(STDOUT, TCGETA, &old_settings) == -1) { smart_terminal = No; } +#endif +#ifdef TERMIOS if (tcgetattr(STDOUT, &old_settings) == -1) { smart_terminal = No; } +#endif } void @@ -228,6 +242,7 @@ init_screen() { /* get the old settings for safe keeping */ +#ifdef SGTTY if (ioctl(STDOUT, TIOCGETP, &old_settings) != -1) { /* copy the settings so we can modify them */ @@ -256,6 +271,8 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } +#endif +#ifdef TERMIO if (ioctl(STDOUT, TCGETA, &old_settings) != -1) { /* copy the settings so we can modify them */ @@ -278,6 +295,8 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } +#endif +#ifdef TERMIOS if (tcgetattr(STDOUT, &old_settings) != -1) { /* copy the settings so we can modify them */ @@ -300,6 +319,7 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } +#endif if (!is_a_terminal) { @@ -324,12 +344,18 @@ end_screen() /* if we have settings to reset, then do so */ if (is_a_terminal) { +#ifdef SGTTY (void) ioctl(STDOUT, TIOCSETP, &old_settings); #ifdef TOStop (void) ioctl(STDOUT, TIOCLSET, &old_lword); #endif +#endif +#ifdef TERMIO (void) ioctl(STDOUT, TCSETA, &old_settings); +#endif +#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, &old_settings); +#endif } } @@ -340,12 +366,18 @@ reinit_screen() /* install our settings if it is a terminal */ if (is_a_terminal) { +#ifdef SGTTY (void) ioctl(STDOUT, TIOCSETP, &new_settings); #ifdef TOStop (void) ioctl(STDOUT, TIOCLSET, &new_lword); #endif +#endif +#ifdef TERMIO (void) ioctl(STDOUT, TCSETA, &new_settings); +#endif +#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, &new_settings); +#endif } /* send init string */ @@ -360,6 +392,7 @@ get_screensize() { +#ifdef TIOCGWINSZ struct winsize ws; @@ -375,6 +408,25 @@ get_screensize() } } +#else +#ifdef TIOCGSIZE + + struct ttysize ts; + + if (ioctl (1, TIOCGSIZE, &ts) != -1) + { + if (ts.ts_lines != 0) + { + screen_length = ts.ts_lines; + } + if (ts.ts_cols != 0) + { + screen_width = ts.ts_cols - 1; + } + } + +#endif /* TIOCGSIZE */ +#endif /* TIOCGWINSZ */ (void) strncpy(lower_left, tgoto(cursor_motion, 0, screen_length - 1), sizeof(lower_left) - 1); Copied: head/usr.bin/top/top.local.hs (from r333927, head/usr.bin/top/top.local.hs) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/top/top.local.hs Sun May 20 18:03:40 2018 (r333931, copy of r333927, head/usr.bin/top/top.local.hs) @@ -0,0 +1,68 @@ +/* + * Top - a top users display for Berkeley Unix + * + * Definitions for things that might vary between installations. + */ + +/* + * The space command forces an immediate update. Sometimes, on loaded + * systems, this update will take a significant period of time (because all + * the output is buffered). So, if the short-term load average is above + * "LoadMax", then top will put the cursor home immediately after the space + * is pressed before the next update is attempted. This serves as a visual + * acknowledgement of the command. On Suns, "LoadMax" will get multiplied by + * "FSCALE" before being compared to avenrun[0]. Therefore, "LoadMax" + * should always be specified as a floating point number. + */ +#ifndef LoadMax +#define LoadMax %LoadMax% +#endif + +/* + * "Table_size" defines the size of the hash tables used to map uid to + * username. The number of users in /etc/passwd CANNOT be greater than + * this number. If the error message "table overflow: too many users" + * is printed by top, then "Table_size" needs to be increased. Things will + * work best if the number is a prime number that is about twice the number + * of lines in /etc/passwd. + */ +#ifndef Table_size +#define Table_size %TableSize% +#endif + +/* + * "Nominal_TOPN" is used as the default TOPN when Default_TOPN is Infinity + * and the output is a dumb terminal. If we didn't do this, then + * installations who use a default TOPN of Infinity will get every + * process in the system when running top on a dumb terminal (or redirected + * to a file). Note that Nominal_TOPN is a default: it can still be + * overridden on the command line, even with the value "infinity". + */ +#ifndef Nominal_TOPN +#define Nominal_TOPN %NominalTopn% +#endif + +#ifndef Default_TOPN +#define Default_TOPN %topn% +#endif + +#ifndef Default_DELAY +#define Default_DELAY %delay% +#endif + +/* + * If the local system's getpwnam interface uses random access to retrieve + * a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining + * RANDOM_PW will take advantage of that fact. If RANDOM_PW is defined, + * then getpwnam is used and the result is cached. If not, then getpwent + * is used to read and cache the password entries sequentially until the + * desired one is found. + * + * We initially set RANDOM_PW to something which is controllable by the + * Configure script. Then if its value is 0, we undef it. + */ + +#define RANDOM_PW %random% +#if RANDOM_PW == 0 +#undef RANDOM_PW +#endif Copied: head/usr.bin/top/top.xs (from r333927, head/usr.bin/top/top.xs) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/top/top.xs Sun May 20 18:03:40 2018 (r333931, copy of r333927, head/usr.bin/top/top.xs) @@ -0,0 +1,459 @@ +.\" NOTE: changes to the manual page for "top" should be made in the +.\" file "top.X" and NOT in the file "top.1". +.\" $FreeBSD$ +.nr N %topn% +.nr D %delay% +.TH TOP 1 Local +.UC 4 +.SH NAME +top \- display and update information about the top cpu processes +.SH SYNOPSIS +.B top +[ +.B \-abCHIijnPqStuvwz +] [ +.BI \-d count +] [ +.BI \-m io | cpu +] [ +.BI \-o field +] [ +.BI \-s time +] [ +.BI \-J jail +] [ +.BI \-U username +] [ +.I number +] +.SH DESCRIPTION +.\" This defines appropriate quote strings for nroff and troff +.ds lq \&" +.ds rq \&" +.if t .ds lq `` +.if t .ds rq '' +.\" Just in case these number registers aren't set yet... +.if \nN==0 .nr N 10 +.if \nD==0 .nr D 2 +.I Top +displays the top +.if !\nN==-1 \nN +processes on the system and periodically updates this information. +.if \nN==-1 \ +\{\ +If standard output is an intelligent terminal (see below) then +as many processes as will fit on the terminal screen are displayed +by default. Otherwise, a good number of them are shown (around 20). +.\} +Raw cpu percentage is used to rank the processes. If +.I number +is given, then the top +.I number +processes will be displayed instead of the default. +.PP +.I Top +makes a distinction between terminals that support advanced capabilities +and those that do not. This +distinction affects the choice of defaults for certain options. In the +remainder of this document, an \*(lqintelligent\*(rq terminal is one that +supports cursor addressing, clear screen, and clear to end of line. +Conversely, a \*(lqdumb\*(rq terminal is one that does not support such +features. If the output of +.I top +is redirected to a file, it acts as if it were being run on a dumb +terminal. +.SH OPTIONS +.TP +.B \-C +Toggle CPU display mode. +By default top displays the weighted CPU percentage in the WCPU column +(this is the same value that +.IR ps (1) +displays as CPU). +Each time +.B \-C +flag is passed it toggles between \*(lqraw cpu\*(rq mode +and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or +the \*(lqWCPU\*(rq column respectively. +.TP +.B \-S +Show system processes in the display. Normally, system processes such as +the pager and the swapper are not shown. This option makes them visible. +.TP +.B \-a +Display command names derived from the argv[] vector, rather than real +executable name. It's useful when you want to watch applications, that +puts their status information there. If the real name differs from argv[0], +it will be displayed in parenthesis. +.TP +.B \-b +Use \*(lqbatch\*(rq mode. In this mode, all input from the terminal is +ignored. Interrupt characters (such as ^C and ^\e) still have an effect. +This is the default on a dumb terminal, or when the output is not a terminal. +.TP +.B \-H +Display each thread for a multithreaded process individually. +By default a single summary line is displayed for each process. +.TP +.B \-i +Use \*(lqinteractive\*(rq mode. In this mode, any input is immediately +read for processing. See the section on \*(lqInteractive Mode\*(rq +for an explanation of +which keys perform what functions. After the command is processed, the +screen will immediately be updated, even if the command was not +understood. This mode is the default when standard output is an +intelligent terminal. +.TP +.B \-I +Do not display idle processes. +By default, top displays both active and idle processes. +.TP +.B \-j +Display the +.IR jail (8) +ID. +.TP +.B \-t +Do not display the +.I top +process. +.TP +.BI \-m display +Display either 'cpu' or 'io' statistics. Default is 'cpu'. +.TP +.B \-n +Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq +mode. +.TP +.B \-P +Display per-cpu CPU usage statistics. +.TP +.B \-q +Renice +.I top +to -20 so that it will run faster. This can be used when the system is +being very sluggish to improve the possibility of discovering the problem. +This option can only be used by root. +.TP +.B \-u +Do not take the time to map uid numbers to usernames. Normally, +.I top +will read as much of the file \*(lq/etc/passwd\*(rq as is necessary to map +all the user id numbers it encounters into login names. This option +disables all that, while possibly decreasing execution time. The uid +numbers are displayed instead of the names. +.TP +.B \-v +Write version number information to stderr then exit immediately. +No other processing takes place when this option is used. To see current +revision information while top is running, use the help command \*(lq?\*(rq. +.TP +.B \-w +Display approximate swap usage for each process. +.TP +.B \-z +Do not display the system idle process. +.TP +.BI \-d count +Show only +.I count +displays, then exit. A display is considered to be one update of the +screen. This option allows the user to select the number of displays he +wants to see before +.I top +automatically exits. For intelligent terminals, no upper limit +is set. The default is 1 for dumb terminals. +.TP +.BI \-s time +Set the delay between screen updates to +.I time +seconds. The default delay between updates is \nD seconds. +.TP +.BI \-o field +Sort the process display area on the specified field. The field name +is the name of the column as seen in the output, but in lower case: +\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, +\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, +\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, +\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. +.TP +.BI \-J jail +Show only those processes owned by +.IR jail . +This may be either the +.B jid +or +.B name +of the jail. +Use +.B 0 +to limit to host processes. +Using this option implies the +.B \-j +flag. +.PP +.BI \-U username +Show only those processes owned by +.IR username . +This option currently only accepts usernames and will not understand +uid numbers. +.PP +Both +.I count +and +.I number +fields can be specified as \*(lqinfinite\*(rq, indicating that they can +stretch as far as possible. This is accomplished by using any proper +prefix of the keywords +\*(lqinfinity\*(rq, +\*(lqmaximum\*(rq, +or +\*(lqall\*(rq. +The default for +.I count +on an intelligent terminal is, in fact, +.BI infinity . +.PP +The environment variable +.B TOP +is examined for options before the command line is scanned. This enables +a user to set his or her own defaults. The number of processes to display +can also be specified in the environment variable +.BR TOP . +The options +.BR \-a , +.BR \-C , +.BR \-H , +.BR \-I , +.BR \-j , +.BR \-P , +.BR \-S , +.BR \-t , +.BR \-u , +.BR \-w , +and +.B \-z +are actually toggles. A second specification of any of these options +will negate the first. Thus a user who has the environment variable +.B TOP +set to \*(lq\-I\*(rq may use the command \*(lqtop \-I\*(rq to see idle processes. +.SH "INTERACTIVE MODE" +When +.I top +is running in \*(lqinteractive mode\*(rq, it reads commands from the +terminal and acts upon them accordingly. In this mode, the terminal is +put in \*(lqCBREAK\*(rq, so that a character will be +processed as soon as it is typed. Almost always, a key will be +pressed when +.I top +is between displays; that is, while it is waiting for +.I time +seconds to elapse. If this is the case, the command will be +processed and the display will be updated immediately thereafter +(reflecting any changes that the command may have specified). This +happens even if the command was incorrect. If a key is pressed while +.I top +is in the middle of updating the display, it will finish the update and +then process the command. Some commands require additional information, +and the user will be prompted accordingly. While typing this information +in, the user's erase and kill keys (as set up by the command +.IR stty ) +are recognized, and a newline terminates the input. +.PP +These commands are currently recognized (^L refers to control-L): +.TP +.B ^L +Redraw the screen. +.IP "\fBh\fP\ or\ \fB?\fP" +Display a summary of the commands (help screen). Version information +is included in this display. +.TP +.B q +Quit +.IR top. +.TP +.B d +Change the number of displays to show (prompt for new number). +Remember that the next display counts as one, so typing +.B d1 +will make +.I top +show one final display and then immediately exit. +.TP +.B m +Toggle the display between 'cpu' and 'io' modes. +.TP +.B n or # +Change the number of processes to display (prompt for new number). +.TP +.B s +Change the number of seconds to delay between displays +(prompt for new number). +.TP +.B S +Toggle the display of system processes. +.TP +.B a +Toggle the display of process titles. +.TP +.B k +Send a signal (\*(lqkill\*(rq by default) to a list of processes. This +acts similarly to the command +.IR kill (1)). +.TP +.B r +Change the priority (the \*(lqnice\*(rq) of a list of processes. +This acts similarly to the command +.IR renice (8)). +.TP +.B u +Display only processes owned by a specific set of usernames (prompt for +username). If the username specified is simply \*(lq+\*(rq or \*(lq-\*(rq, +then processes belonging to all users will be displayed. Usernames can be added +to and removed from the set by prepending them with \*(lq+\*(rq and +\*(lq-\*(rq, respectively. +.TP +.B o +Change the order in which the display is sorted. This command is not +available on all systems. The sort key names vary from system to system +but usually include: \*(lqcpu\*(rq, \*(lqres\*(rq, \*(lqsize\*(rq, +\*(lqtime\*(rq. The default is cpu. +.TP +.B e +Display a list of system errors (if any) generated by the last +.BR k ill +or +.BR r enice +command. +.TP +.B H +Toggle the display of threads. +.TP +.B i +(or +.BR I ) +Toggle the display of idle processes. +.TP +.B j +Toggle the display of +.IR jail (8) +ID. +.TP +.B J +Display only processes owned by a specific jail (prompt for jail). +If the jail specified is simply \*(lq+\*(rq, then processes belonging +to all jails and the host will be displayed. +This will also enable the display of JID. +.TP +.B P +Toggle the display of per-CPU statistics. +.TP +.B t +Toggle the display of the +.I top +process. +.TP +.B w +Toggle the display of swap usage. +.TP +.B z +Toggle the display of the system idle process. +.SH "THE DISPLAY" +The actual display varies depending on the specific variant of Unix +that the machine is running. This description may not exactly match +what is seen by top running on this particular machine. Differences +are listed at the end of this manual entry. +.PP +The top few lines of the display show general information +about the state of the system, including +the last process id assigned to a process (on most systems), +the three load averages, +the current time, +the number of existing processes, +the number of processes in each state +(sleeping, running, starting, zombies, and stopped), +and a percentage of time spent in each of the processor states +(user, nice, system, and idle). +It also includes information about physical and virtual memory allocation. +.PP +The remainder of the screen displays information about individual +processes. This display is similar in spirit to +.IR ps (1) +but it is not exactly the same. PID is the process id, +JID, when displayed, is the +.IR jail (8) +ID corresponding to the process, +USERNAME is the name of the process's owner (if +.B \-u +is specified, a UID column will be substituted for USERNAME), +PRI is the current priority of the process, +NICE is the nice amount (in the range \-20 to 20), +SIZE is the total size of the process (text, data, and stack), +RES is the current amount of resident memory, +SWAP is the approximate amount of swap, if enabled +(SIZE, RES and SWAP are given in kilobytes), +STATE is the current state (one of \*(lqSTART\*(rq, \*(lqRUN\*(rq +(shown as \*(lqCPUn\*(rq on SMP systems), \*(lqSLEEP\*(rq, \*(lqSTOP\*(rq, +\*(lqZOMB\*(rq, \*(lqWAIT\*(rq, \*(lqLOCK\*(rq or the event on which the +process waits), +C is the processor number on which the process is executing +(visible only on SMP systems), +TIME is the number of system and user cpu seconds that the process has used, +WCPU, when displayed, is the weighted cpu percentage (this is the same +value that +.IR ps (1) +displays as CPU), +CPU is the raw percentage and is the field that is sorted to determine +the order of the processes, and +COMMAND is the name of the command that the process is currently running +(if the process is swapped out, this column is marked \*(lq\*(rq). +.SH NOTES +If a process is in the \*(lqSLEEP\*(rq or \*(lqLOCK\*(rq state, +the state column will report the name of the event or lock on which the +process is waiting. +Lock names are prefixed with an asterisk \*(lq*\*(rq while sleep events +are not. +.SH AUTHOR +William LeFebvre, EECS Department, Northwestern University +.SH ENVIRONMENT +.DT +TOP user-configurable defaults for options. +.SH FILES +.DT +/dev/kmem kernel memory +.br +/dev/mem physical memory +.br +/etc/passwd used to map uid numbers to user names +.br +/boot/kernel/kernel system image +.SH BUGS +Don't shoot me, but the default for +.B \-I +has changed once again. So many people were confused by the fact that +.I top +wasn't showing them all the processes that I have decided to make the +default behavior show idle processes, just like it did in version 2. +But to appease folks who can't stand that behavior, I have added the +ability to set \*(lqdefault\*(rq options in the environment variable +.B TOP +(see the OPTIONS section). Those who want the behavior that version +3.0 had need only set the environment variable +.B TOP +to \*(lq\-I\*(rq. +.PP +The command name for swapped processes should be tracked down, but this +would make the program run slower. +.PP +As with +.IR ps (1), +things can change while +.I top +is collecting information for an update. The picture it gives is only a +close approximation to reality. +.SH "SEE ALSO" +kill(1), +ps(1), +stty(1), +mem(4), +renice(8) From owner-svn-src-head@freebsd.org Sun May 20 18:11:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C840EEA5C0; Sun, 20 May 2018 18:11:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22678693AF; Sun, 20 May 2018 18:11:59 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0398A19D6A; Sun, 20 May 2018 18:11:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KIBw9h082076; Sun, 20 May 2018 18:11:58 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KIBwrr082075; Sun, 20 May 2018 18:11:58 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805201811.w4KIBwrr082075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 18:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333932 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 18:11:59 -0000 Author: eadler Date: Sun May 20 18:11:58 2018 New Revision: 333932 URL: https://svnweb.freebsd.org/changeset/base/333932 Log: top(1): unconditionally assume we are on FreeBSD (more unifdef) Now that we're our own upstream, remove useless ifdefs. Modified: head/usr.bin/top/screen.c Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Sun May 20 18:03:40 2018 (r333931) +++ head/usr.bin/top/screen.c Sun May 20 18:11:58 2018 (r333932) @@ -24,27 +24,8 @@ #include #include -#ifdef CBREAK -# include -# define SGTTY -#else -# ifdef TCGETA -# define TERMIO -# include -# else # define TERMIOS # include -# endif -#endif -#if defined(TERMIO) || defined(TERMIOS) -# ifndef TAB3 -# ifdef OXTABS -# define TAB3 OXTABS -# else -# define TAB3 0 -# endif -# endif -#endif #include #include #include "screen.h" @@ -75,23 +56,11 @@ char *end_standout; char *terminal_init; char *terminal_end; -#ifdef SGTTY -static struct sgttyb old_settings; -static struct sgttyb new_settings; -#endif -#ifdef TERMIO -static struct termio old_settings; -static struct termio new_settings; -#endif -#ifdef TERMIOS static struct termios old_settings; static struct termios new_settings; -#endif static char is_a_terminal = No; -#ifdef TOStop static int old_lword; static int new_lword; -#endif #define STDIN 0 #define STDOUT 1 @@ -217,24 +186,10 @@ int interactive; get_screensize(); /* if stdout is not a terminal, pretend we are a dumb terminal */ -#ifdef SGTTY - if (ioctl(STDOUT, TIOCGETP, &old_settings) == -1) - { - smart_terminal = No; - } -#endif -#ifdef TERMIO - if (ioctl(STDOUT, TCGETA, &old_settings) == -1) - { - smart_terminal = No; - } -#endif -#ifdef TERMIOS if (tcgetattr(STDOUT, &old_settings) == -1) { smart_terminal = No; } -#endif } void @@ -242,61 +197,6 @@ init_screen() { /* get the old settings for safe keeping */ -#ifdef SGTTY - if (ioctl(STDOUT, TIOCGETP, &old_settings) != -1) - { - /* copy the settings so we can modify them */ - new_settings = old_settings; - - /* turn on CBREAK and turn off character echo and tab expansion */ - new_settings.sg_flags |= CBREAK; - new_settings.sg_flags &= ~(ECHO|XTABS); - (void) ioctl(STDOUT, TIOCSETP, &new_settings); - - /* remember the erase and kill characters */ - ch_erase = old_settings.sg_erase; - ch_kill = old_settings.sg_kill; - -#ifdef TOStop - /* get the local mode word */ - (void) ioctl(STDOUT, TIOCLGET, &old_lword); - - /* modify it */ - new_lword = old_lword | LTOSTOP; - (void) ioctl(STDOUT, TIOCLSET, &new_lword); -#endif - /* remember that it really is a terminal */ - is_a_terminal = Yes; - - /* send the termcap initialization string */ - putcap(terminal_init); - } -#endif -#ifdef TERMIO - if (ioctl(STDOUT, TCGETA, &old_settings) != -1) - { - /* copy the settings so we can modify them */ - new_settings = old_settings; - - /* turn off ICANON, character echo and tab expansion */ - new_settings.c_lflag &= ~(ICANON|ECHO); - new_settings.c_oflag &= ~(TAB3); - new_settings.c_cc[VMIN] = 1; - new_settings.c_cc[VTIME] = 0; - (void) ioctl(STDOUT, TCSETA, &new_settings); - - /* remember the erase and kill characters */ - ch_erase = old_settings.c_cc[VERASE]; - ch_kill = old_settings.c_cc[VKILL]; - - /* remember that it really is a terminal */ - is_a_terminal = Yes; - - /* send the termcap initialization string */ - putcap(terminal_init); - } -#endif -#ifdef TERMIOS if (tcgetattr(STDOUT, &old_settings) != -1) { /* copy the settings so we can modify them */ @@ -319,7 +219,6 @@ init_screen() /* send the termcap initialization string */ putcap(terminal_init); } -#endif if (!is_a_terminal) { @@ -344,18 +243,7 @@ end_screen() /* if we have settings to reset, then do so */ if (is_a_terminal) { -#ifdef SGTTY - (void) ioctl(STDOUT, TIOCSETP, &old_settings); -#ifdef TOStop - (void) ioctl(STDOUT, TIOCLSET, &old_lword); -#endif -#endif -#ifdef TERMIO - (void) ioctl(STDOUT, TCSETA, &old_settings); -#endif -#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, &old_settings); -#endif } } @@ -366,18 +254,7 @@ reinit_screen() /* install our settings if it is a terminal */ if (is_a_terminal) { -#ifdef SGTTY - (void) ioctl(STDOUT, TIOCSETP, &new_settings); -#ifdef TOStop - (void) ioctl(STDOUT, TIOCLSET, &new_lword); -#endif -#endif -#ifdef TERMIO - (void) ioctl(STDOUT, TCSETA, &new_settings); -#endif -#ifdef TERMIOS (void) tcsetattr(STDOUT, TCSADRAIN, &new_settings); -#endif } /* send init string */ @@ -392,7 +269,6 @@ get_screensize() { -#ifdef TIOCGWINSZ struct winsize ws; @@ -408,25 +284,6 @@ get_screensize() } } -#else -#ifdef TIOCGSIZE - - struct ttysize ts; - - if (ioctl (1, TIOCGSIZE, &ts) != -1) - { - if (ts.ts_lines != 0) - { - screen_length = ts.ts_lines; - } - if (ts.ts_cols != 0) - { - screen_width = ts.ts_cols - 1; - } - } - -#endif /* TIOCGSIZE */ -#endif /* TIOCGWINSZ */ (void) strncpy(lower_left, tgoto(cursor_motion, 0, screen_length - 1), sizeof(lower_left) - 1); From owner-svn-src-head@freebsd.org Sun May 20 18:18:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5D07EEA933; Sun, 20 May 2018 18:18:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C92069842; Sun, 20 May 2018 18:18:57 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DD5619DA0; Sun, 20 May 2018 18:18:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KIIvrG084773; Sun, 20 May 2018 18:18:57 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KIIv9q084772; Sun, 20 May 2018 18:18:57 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805201818.w4KIIv9q084772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 18:18:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333933 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 333933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 18:18:58 -0000 Author: eadler Date: Sun May 20 18:18:56 2018 New Revision: 333933 URL: https://svnweb.freebsd.org/changeset/base/333933 Log: bsd-family-tree: announce DragonFly 5.2.1 See http://lists.dragonflybsd.org/pipermail/commits/2018-May/672214.html Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Sun May 20 18:11:58 2018 (r333932) +++ head/share/misc/bsd-family-tree Sun May 20 18:18:56 2018 (r333933) @@ -370,6 +370,8 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 6.3 | | | | | | | DragonFly 5.2.0 | | | | v | | + | | | | | | DragonFly 5.2.1 + | | | | v | | | v | | | | | | | | | FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current @@ -743,6 +745,7 @@ NetBSD 7.1.1 2017-12-22 [NBD] NetBSD 7.1.2 2018-03-15 [NBD] OpenBSD 6.3 2018-04-02 [OBD] DragonFly 5.2.0 2018-04-10 [DFB] +DragonFly 5.2.1 2018-05-20 [DFB] Bibliography ------------------------ From owner-svn-src-head@freebsd.org Sun May 20 18:26:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBEF9EEAF66; Sun, 20 May 2018 18:26:10 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82B4269E9E; Sun, 20 May 2018 18:26:10 +0000 (UTC) (envelope-from nwhitehorn@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6226A19F31; Sun, 20 May 2018 18:26:10 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KIQAgd089695; Sun, 20 May 2018 18:26:10 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KIQAKC089694; Sun, 20 May 2018 18:26:10 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201805201826.w4KIQAKC089694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 20 May 2018 18:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333934 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 333934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 18:26:11 -0000 Author: nwhitehorn Date: Sun May 20 18:26:09 2018 New Revision: 333934 URL: https://svnweb.freebsd.org/changeset/base/333934 Log: Fix build with PSERIES but not POWERNV defined. Modified: head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/pseries/xics.c ============================================================================== --- head/sys/powerpc/pseries/xics.c Sun May 20 18:18:56 2018 (r333933) +++ head/sys/powerpc/pseries/xics.c Sun May 20 18:26:09 2018 (r333934) @@ -139,7 +139,9 @@ static driver_t xics_driver = { 0 }; +#ifdef POWERNV static uint32_t cpu_xirr[MAXCPU]; +#endif static devclass_t xicp_devclass; static devclass_t xics_devclass; From owner-svn-src-head@freebsd.org Sun May 20 18:33:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB313EEB554 for ; Sun, 20 May 2018 18:33:18 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03C596A55A; Sun, 20 May 2018 18:33:18 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6B4B221BEE; Sun, 20 May 2018 14:33:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 20 May 2018 14:33:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=eidY1Hzgk0FAMe+xrX45vVKl82uPH SdyAeWQkkwX60s=; b=Gaqc3EvWGQqTPenNoD5GqHXCfKu0iY+9HaJ0VbVBcfzB+ eIAlqp+I3oQc/YIi19nq5mMKf4Owgdyvgod7gUEIiU75/6KU3kgy7UUC2cuZr3VY kfdlK4cuHeukuiN7j+bhC19WQnRYq+Y5Ue4FVjBanxHDeqX/ei9mjN9dJSKVo9XY ZXIzvpLq78C/PPcWpy7DZH40fOL1+uzoiJJOH/5DVSxkIZdy119LkJDu2EdJwqBn zPFtt7oNseYXo58NdOxPt5sQNvNlpk/ISRjcXrc7KERrpqeanTe0uWujobLX5VaE Mf0B6tx/Rh09lM9k+8xUmWcrMffbTYJm94gJkuT/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=eidY1H zgk0FAMe+xrX45vVKl82uPHSdyAeWQkkwX60s=; b=AB0yvOSXZi+igG8lx/Mc0X +1xLR9cUPyz8jzkJet0F8mOkCQll4lOb524/r519UZLuae+LXKHeuZRpVM4qtbn3 RLP43Bohx3hOrmVgepirSB6XhyCqbdR+dpE19RxV6lPyEn518Clw4zwbKNV74cAk CdHCFiGIKxkq7O13AvqR+vcbDNPeQ8XW3a2EsNVIOpfPyqEdZZr/N7XSYDAoP4OD Fmnqjn+vadVbM5gsi9VIVoh3m+mdzO93bNyM6/LYsrOA9Rd+xWxWsu0HM2FJmg8F m4NkQwqVYRsmKfTV7yWEEBYnK3vNDEb1XdVwX4ZMchH4LEwHGWEjE9b9+TnJ3J7Q == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.2] (unknown [178.34.62.147]) by mail.messagingengine.com (Postfix) with ESMTPA id 1BF1BE498E; Sun, 20 May 2018 14:33:15 -0400 (EDT) Subject: Re: svn commit: r333929 - head/usr.bin/top To: Eitan Adler , svn-src-head@freebsd.org References: <201805201759.w4KHxxWS074470@repo.freebsd.org> From: Yuri Pankov Message-ID: <89acdfde-441e-fe6c-8c3e-672c497fa7c5@yuripv.net> Date: Sun, 20 May 2018 21:33:16 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201805201759.w4KHxxWS074470@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 18:33:19 -0000 Eitan Adler wrote: > Author: eadler > Date: Sun May 20 17:59:59 2018 > New Revision: 333929 > URL: https://svnweb.freebsd.org/changeset/base/333929 > > Log: > top(1): Make lack of "percent" information explicit > > When count is 1, no delta information can be produced. Make this > explicit. > > PR: 195717 > Submitted by: fernape > > Modified: > head/usr.bin/top/top.1 > > Modified: head/usr.bin/top/top.1 > ============================================================================== > --- head/usr.bin/top/top.1 Sun May 20 17:58:22 2018 (r333928) > +++ head/usr.bin/top/top.1 Sun May 20 17:59:59 2018 (r333929) > @@ -162,7 +162,10 @@ screen. This option allows the user to select the num > wants to see before > .I top > automatically exits. For intelligent terminals, no upper limit > -is set. The default is 1 for dumb terminals. > +is set. The default is 1 for dumb terminals. Please, note that for Really minor nit: rest of the man page seems to use double space between sentences (or just start the sentence from new line to have the proper auto-spacing). From owner-svn-src-head@freebsd.org Sun May 20 18:34:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24BB6EEB620 for ; Sun, 20 May 2018 18:34:55 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCA826A5D3 for ; Sun, 20 May 2018 18:34:54 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yb0-f175.google.com (mail-yb0-f175.google.com [209.85.213.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id 91E88EEB8 for ; Sun, 20 May 2018 18:34:54 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yb0-f175.google.com with SMTP id s8-v6so3130902ybp.11 for ; Sun, 20 May 2018 11:34:54 -0700 (PDT) X-Gm-Message-State: ALKqPwf/QdROSyxpXWKZo4J8VCPYwN+TEWuoIqEvQNskh8KJS9/BzaZP K41gO4nnUZkvKMZJG/t765JUiBBW4rGMFXUXdLUlTg== X-Google-Smtp-Source: AB8JxZq7x/2hR9YjD9ayrVi2BGgVWpz9sH+ALPTXeO6fn2voruMxuTmZh6XkM5c75F/PGJhiegqDaEv8GzA3UNunI88= X-Received: by 2002:a25:8751:: with SMTP id e17-v6mr2933378ybn.194.1526841294003; Sun, 20 May 2018 11:34:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Sun, 20 May 2018 11:34:23 -0700 (PDT) In-Reply-To: <89acdfde-441e-fe6c-8c3e-672c497fa7c5@yuripv.net> References: <201805201759.w4KHxxWS074470@repo.freebsd.org> <89acdfde-441e-fe6c-8c3e-672c497fa7c5@yuripv.net> From: Eitan Adler Date: Sun, 20 May 2018 11:34:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333929 - head/usr.bin/top To: Yuri Pankov Cc: svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 18:34:55 -0000 On 20 May 2018 at 11:33, Yuri Pankov wrote: > Eitan Adler wrote: >> >> Author: eadler >> Date: Sun May 20 17:59:59 2018 >> New Revision: 333929 >> URL: https://svnweb.freebsd.org/changeset/base/333929 >> >> Log: >> top(1): Make lack of "percent" information explicit >> When count is 1, no delta information can be produced. Make this >> explicit. >> PR: 195717 >> Submitted by: fernape >> >> Modified: >> head/usr.bin/top/top.1 >> >> Modified: head/usr.bin/top/top.1 >> >> ============================================================================== >> --- head/usr.bin/top/top.1 Sun May 20 17:58:22 2018 (r333928) >> +++ head/usr.bin/top/top.1 Sun May 20 17:59:59 2018 (r333929) >> @@ -162,7 +162,10 @@ screen. This option allows the user to select the >> num >> wants to see before >> .I top >> automatically exits. For intelligent terminals, no upper limit >> -is set. The default is 1 for dumb terminals. >> +is set. The default is 1 for dumb terminals. Please, note that for > > > Really minor nit: rest of the man page seems to use double space between > sentences (or just start the sentence from new line to have the proper > auto-spacing). I'm probably going to do a larger-scale formatting pass over the man page. I'll also look it over for anything that is no longer true. Thanks for the comment though! -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Sun May 20 19:35:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33040EED82B; Sun, 20 May 2018 19:35:25 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB9CC6D469; Sun, 20 May 2018 19:35:24 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A74301AA85; Sun, 20 May 2018 19:35:24 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KJZOQF026413; Sun, 20 May 2018 19:35:24 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KJZONj026412; Sun, 20 May 2018 19:35:24 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805201935.w4KJZONj026412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 19:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333935 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 333935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 19:35:25 -0000 Author: mmacy Date: Sun May 20 19:35:24 2018 New Revision: 333935 URL: https://svnweb.freebsd.org/changeset/base/333935 Log: pmc: avoid potential race on shutdown Clear shutdown flag first, conservatively allow 5ms for all hardclock consumers to see flag before drainining Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_logging.c Sun May 20 18:26:09 2018 (r333934) +++ head/sys/dev/hwpmc/hwpmc_logging.c Sun May 20 19:35:24 2018 (r333935) @@ -872,18 +872,20 @@ pmclog_close(struct pmc_owner *po) pmclog_process_closelog(po); mtx_lock(&pmc_kthread_mtx); - /* + * Initiate shutdown: no new data queued, + * thread will close file on last block. + */ + po->po_flags |= PMC_PO_SHUTDOWN; + /* give time for all to see */ + DELAY(50); + + /* * Schedule the current buffer. */ pmclog_schedule_all(po); wakeup_one(po); - /* - * Initiate shutdown: no new data queued, - * thread will close file on last block. - */ - po->po_flags |= PMC_PO_SHUTDOWN; mtx_unlock(&pmc_kthread_mtx); return (0); From owner-svn-src-head@freebsd.org Sun May 20 20:08:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D26EEEE1E9; Sun, 20 May 2018 20:08:22 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E12D6E2BE; Sun, 20 May 2018 20:08:22 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 152EB1AF50; Sun, 20 May 2018 20:08:22 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KK8LDY041637; Sun, 20 May 2018 20:08:21 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KK8L0h041636; Sun, 20 May 2018 20:08:21 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805202008.w4KK8L0h041636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 20:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333936 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 333936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 20:08:22 -0000 Author: mmacy Date: Sun May 20 20:08:21 2018 New Revision: 333936 URL: https://svnweb.freebsd.org/changeset/base/333936 Log: in(s)_moptions: free before tearing down inpcb Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun May 20 19:35:24 2018 (r333935) +++ head/sys/netinet/in_pcb.c Sun May 20 20:08:21 2018 (r333936) @@ -1341,33 +1341,16 @@ in_pcbfree_deferred(epoch_context_t ctx) { struct inpcb *inp; struct inpcbinfo *pcbinfo; -#ifdef INET6 - struct ip6_moptions *im6o = NULL; -#endif -#ifdef INET - struct ip_moptions *imo = NULL; -#endif inp = __containerof(ctx, struct inpcb, inp_epoch_ctx); pcbinfo = inp->inp_pcbinfo; INP_WLOCK(inp); -#ifdef INET - imo = inp->inp_moptions; - inp->inp_moptions = NULL; -#endif /* XXXRW: Do as much as possible here. */ #if defined(IPSEC) || defined(IPSEC_SUPPORT) if (inp->inp_sp != NULL) ipsec_delete_pcbpolicy(inp); #endif -#ifdef INET6 - if (inp->inp_vflag & INP_IPV6PROTO) { - ip6_freepcbopts(inp->in6p_outputopts); - im6o = inp->in6p_moptions; - inp->in6p_moptions = NULL; - } -#endif if (inp->inp_options) (void)m_free(inp->inp_options); @@ -1379,12 +1362,6 @@ in_pcbfree_deferred(epoch_context_t ctx) #endif if (!in_pcbrele_wlocked(inp)) INP_WUNLOCK(inp); -#ifdef INET6 - ip6_freemoptions(im6o); -#endif -#ifdef INET - inp_freemoptions(imo); -#endif } /* @@ -1399,6 +1376,12 @@ in_pcbfree_deferred(epoch_context_t ctx) void in_pcbfree(struct inpcb *inp) { +#ifdef INET6 + struct ip6_moptions *im6o = NULL; +#endif +#ifdef INET + struct ip_moptions *imo = NULL; +#endif struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); @@ -1417,6 +1400,19 @@ in_pcbfree(struct inpcb *inp) } #endif INP_WLOCK_ASSERT(inp); +#ifdef INET + imo = inp->inp_moptions; + inp->inp_moptions = NULL; + inp_freemoptions(imo); +#endif +#ifdef INET6 + if (inp->inp_vflag & INP_IPV6PROTO) { + ip6_freepcbopts(inp->in6p_outputopts); + im6o = inp->in6p_moptions; + inp->in6p_moptions = NULL; + ip6_freemoptions(im6o); + } +#endif /* Remove first from list */ INP_LIST_WLOCK(pcbinfo); inp->inp_gencnt = ++pcbinfo->ipi_gencnt; From owner-svn-src-head@freebsd.org Sun May 20 20:28:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67127EEE6BB; Sun, 20 May 2018 20:28:18 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12DF36EAE5; Sun, 20 May 2018 20:28:18 +0000 (UTC) (envelope-from sevan@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E55851B29C; Sun, 20 May 2018 20:28:17 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KKSH8j051381; Sun, 20 May 2018 20:28:17 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KKSH1i051380; Sun, 20 May 2018 20:28:17 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201805202028.w4KKSH1i051380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 20 May 2018 20:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333937 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: sevan X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 333937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 20:28:18 -0000 Author: sevan (doc committer) Date: Sun May 20 20:28:17 2018 New Revision: 333937 URL: https://svnweb.freebsd.org/changeset/base/333937 Log: Fix a typo and remove an unneeded Tn macro as highlighted by mandoc -Tlint. Submitted by: Mateusz Piotrowski MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15204 Modified: head/lib/libc/sys/recv.2 Modified: head/lib/libc/sys/recv.2 ============================================================================== --- head/lib/libc/sys/recv.2 Sun May 20 20:08:21 2018 (r333936) +++ head/lib/libc/sys/recv.2 Sun May 20 20:28:17 2018 (r333937) @@ -28,7 +28,7 @@ .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd October 3, 2017 +.Dd May 20, 2018 .Dt RECV 2 .Os .Sh NAME @@ -198,9 +198,7 @@ If no data is available, .Va errno is set to .Er EAGAIN . -This flag is not available in strict -.Tn ANSI -or C99 compilation mode. +This flag is not available in strict ANSI or C99 compilation mode. The .Dv MSG_WAITFORONE flag sets MSG_DONTWAIT after the first message has been received. @@ -298,7 +296,7 @@ system call uses the .Fa mmsghdr structure, defined as follows in the .In sys/socket.h -header : +header: .Bd -literal struct mmsghdr { struct msghdr msg_hdr; /* message header */ From owner-svn-src-head@freebsd.org Sun May 20 20:30:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14EFDEEE78F; Sun, 20 May 2018 20:30:04 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A4C726ECED; Sun, 20 May 2018 20:30:03 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id p186-v6so10392036qkd.1; Sun, 20 May 2018 13:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fYKIJyUgENgBqi6aOBncXaQcDdkKJOOhaF2ywYxs+lo=; b=crh8uLIMLMzrFoKrsWlkMXQbqcNJllY6KESSITecTok4IBA3l2F591OsHsnKjScJfz IF43hzcu0kDp0dydRn2c/LDStLBARGLxSVTs7lmdaTVX8qHni0ariLe30j6xRqz37zTC aYYq7eBXxmztrdDHKt1p/xrA+jkGRXe+y2QmrwKVZWf4iI84dU7Nl8JHVYz2FRqn78C3 4YVEXSPGsa01rdKHWRRdrkdb3xJl3UNZKu0aOzF7CpWfuwPlgsiOYLpgIdU66IvGBshX HDAYa2uF0kTHkbGvkDMjX8zwx5KdxDimCwtEHzDFYIhexVWP+IVfqoohU3JLvq4NqAT8 xmmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=fYKIJyUgENgBqi6aOBncXaQcDdkKJOOhaF2ywYxs+lo=; b=bHNDUs57bPb1R3pLHxbF0KIltHZDBDkxOxt/AsOls05CfKtShUJnJzI8Y4rpAPthPI 5o/ugN4+ehIexlVwqHkjGVKN84lu13Vqj0XpO6nCEOSXBsIdysvjTakH81mNhxMo7PZ3 /1ZTeN39ryL6tfKGOkaQt2ndNpG2z9MCfb+sNCtTK6lctcTQtf9CO8CMptbVDkudSU2l oZGWnkhuMqN4IWEJNOBBatLmdY0yue4iI4bVgG138qFIIj+gwuocf4LCVUyv64uc/qSm cV1YvZ8EGyaSoS/D/LXlv9xc+i/dYz631C6lGFp6m47pTeVhjL4+S6wN3Zv+rfYPFOvH yhIQ== X-Gm-Message-State: ALKqPwdk3YgvUyVvN+cilF1iBU6QMwuBZAitKrSR7QncJ6sCsqwW7cEl C3J7YKSOK3CrML54gDWCCeL1cpeK+RsKEXDLfWM= X-Google-Smtp-Source: AB8JxZoW8cwCuOdoN41LuhHBqtUF0IUjFQ/3lnx7Ud7SGhJk2+eE5iAoadmpfIJaFNORfeb32awumwm6R1Wflax9RbI= X-Received: by 2002:a37:1fa1:: with SMTP id n33-v6mr15768076qkh.393.1526848203000; Sun, 20 May 2018 13:30:03 -0700 (PDT) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.12.172.207 with HTTP; Sun, 20 May 2018 13:30:02 -0700 (PDT) In-Reply-To: <201805200506.w4K56gps088300@repo.freebsd.org> References: <201805200506.w4K56gps088300@repo.freebsd.org> From: Antoine Brodin Date: Sun, 20 May 2018 22:30:02 +0200 X-Google-Sender-Auth: _qUiUDZy1BqaPM3fTczcgf2L5_E Message-ID: Subject: Re: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 20:30:04 -0000 On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: > Author: eadler > Date: Sun May 20 05:06:42 2018 > New Revision: 333919 > URL: https://svnweb.freebsd.org/changeset/base/333919 > > Log: > MFV: file 5.33 > > Merge the latest file(1) in. > > Relevent Changelog: > - extend the support for ${x?:} expansions for magic descriptions > - add support for ${x?:} in mime types to handle pie binaries. > - add support for negative offsets (offsets from the end of file) > - close the file on error when writing magic > > Relnotes: yes Hi, This breaks the ports tree, please revert and request an exp-run. Cheers, Antoine (with hat: portmgr) From owner-svn-src-head@freebsd.org Sun May 20 20:34:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94B94EEEA67; Sun, 20 May 2018 20:34:16 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CB536F16D; Sun, 20 May 2018 20:34:16 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18D111B461; Sun, 20 May 2018 20:34:16 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KKYFot056173; Sun, 20 May 2018 20:34:15 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KKYFbu056172; Sun, 20 May 2018 20:34:15 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805202034.w4KKYFbu056172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 20:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333938 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 333938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 20:34:16 -0000 Author: mmacy Date: Sun May 20 20:34:15 2018 New Revision: 333938 URL: https://svnweb.freebsd.org/changeset/base/333938 Log: pmc: detach free_gtask on unload Reported by: pho Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Sun May 20 20:28:17 2018 (r333937) +++ head/sys/dev/hwpmc/hwpmc_mod.c Sun May 20 20:34:15 2018 (r333938) @@ -5557,6 +5557,7 @@ pmc_cleanup(void) mtx_pool_destroy(&pmc_mtxpool); mtx_destroy(&pmc_processhash_mtx); + taskqgroup_config_gtask_deinit(&free_gtask); if (pmc_processhash) { #ifdef HWPMC_DEBUG struct pmc_process *pp; From owner-svn-src-head@freebsd.org Sun May 20 20:39:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25966EEEB1D; Sun, 20 May 2018 20:39:54 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qt0-x241.google.com (mail-qt0-x241.google.com [IPv6:2607:f8b0:400d:c0d::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92DE56F2E9; Sun, 20 May 2018 20:39:53 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-qt0-x241.google.com with SMTP id m5-v6so16664301qti.1; Sun, 20 May 2018 13:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Vebc/tTlv6+X/yhF/D5golj5j03xjKiavihCkJI1gug=; b=dmikwlYFG/C3Ts6+eaqghvxVp+nGhuEx1CUpDILLEVWEUK3hnWBsa6g+6AZJN1oOz9 2POrHYwJ1Vj3r4l8Rx4tRhG5i2Hn085GhW2vy2VaBRvt9IjLAQw41WONm4fTCmV7HhV1 qNJ+2jghz54eEPVow+T9CHQq+D1EuqyXzLZWKFZeyggZdU9CzFlZButbEDSHJXaHHUZ7 0AixYrrTixvu0Wg2q3xFueUbcCu3FI6Icftelr6UMo/CIspGmBtaj2nMOzA0va8fi3VS YYAYZwie08TrqlxGeQGhvvazs6e8MnRTYJOeCQE7gPBANo2UV/31x4DezaERAvJXdRSl oE+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Vebc/tTlv6+X/yhF/D5golj5j03xjKiavihCkJI1gug=; b=icNjilAZQHT8qrqmsHa58hORxkqzcAgYtIDpbsKsLCHJpiG+6U4wR9DVt8IevIB+9j cSA2ebN2wpyY995BUNowR7BlVZtdq9fibillufAYUHbpxUMeYsL8BTpeO8uD6DLnHYxx QvSqi9lcJdySK/N6OE62Ywxa4d0CpvuElkxyF1hOJgA8NGb2nTaSeCUpgOWt8SNCs2wf gCpVH1iaqakGj/St4q6sj9HNCSLKCDO85+eIR0ZLKWueXWkY3WG6LMSr2PGX0VINKfHe 3XAK4pWAqomx42f6NfboJvSGLoK2e0CYIfi5YbvaSR0VP2+QTzvi6LbJfXijO8DhnU6y O1ew== X-Gm-Message-State: ALKqPwfNRRuO9Vf2hwVz3vpbEKW0d/MVYgPzr7KyTGGqzhReStkeLTfj venmu0T5lioyQJ76FtEHzuHit7OZWXi6hjLTgxLqrg== X-Google-Smtp-Source: AB8JxZp+Egk5Ie9AOONFlHlXBDUjSAvXja+imj1/0+CYEj/QwvWe9WHSfvxglTqFcwZzn7ndZa/zILMJlXqDg7LwAPk= X-Received: by 2002:aed:3511:: with SMTP id a17-v6mr16266230qte.289.1526848792966; Sun, 20 May 2018 13:39:52 -0700 (PDT) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.12.172.207 with HTTP; Sun, 20 May 2018 13:39:52 -0700 (PDT) In-Reply-To: References: <201805200506.w4K56gps088300@repo.freebsd.org> From: Antoine Brodin Date: Sun, 20 May 2018 22:39:52 +0200 X-Google-Sender-Auth: T6LHel06bne9pTMHXu4SD4vJ-r4 Message-ID: Subject: Re: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 20:39:54 -0000 On Sun, May 20, 2018 at 10:30 PM, Antoine Brodin wrote: > On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: >> Author: eadler >> Date: Sun May 20 05:06:42 2018 >> New Revision: 333919 >> URL: https://svnweb.freebsd.org/changeset/base/333919 >> >> Log: >> MFV: file 5.33 >> >> Merge the latest file(1) in. >> >> Relevent Changelog: >> - extend the support for ${x?:} expansions for magic descriptions >> - add support for ${x?:} in mime types to handle pie binaries. >> - add support for negative offsets (offsets from the end of file) >> - close the file on error when writing magic >> >> Relnotes: yes > > Hi, > > This breaks the ports tree, please revert and request an exp-run. At least revert the changes to contrib/file/magic/Magdir/elf Antoine From owner-svn-src-head@freebsd.org Sun May 20 20:45:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B24BEEED4C; Sun, 20 May 2018 20:45:09 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout11.t-online.de (mailout11.t-online.de [194.25.134.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C9B96F6F5; Sun, 20 May 2018 20:45:08 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd38.aul.t-online.de (fwd38.aul.t-online.de [172.20.26.138]) by mailout11.t-online.de (Postfix) with SMTP id 76137424BEB2; Sun, 20 May 2018 22:45:01 +0200 (CEST) Received: from Stefans-MacBook-Pro-10.local (SgphFsZaghWhTh1d0Cml63LcHI-Rruh2ZZ+T6990upEspUwgd-0Mx3RgNiwFVukQ8X@[84.154.105.176]) by fwd38.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1fKVCI-1TGJMm0; Sun, 20 May 2018 22:44:54 +0200 Subject: Re: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests To: Antoine Brodin , Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805200506.w4K56gps088300@repo.freebsd.org> From: Stefan Esser Openpgp: preference=signencrypt Autocrypt: addr=se@freebsd.org; prefer-encrypt=mutual; keydata= xsBNBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAHNKVN0ZWZhbiBFw59lciAoWWFob28hKSA8c3QuZXNzZXJAeWFob28uZGU+wsCWBBMBCgBA AhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AWIQSjceplnAvsyCtxUxNH67XvWv31RAUC WvLvqwUJCyUBEwAKCRBH67XvWv31REySCACc6vqcSFQCRyBRc2CV5ZBjbbnTy7VBoXbUS3/c 4Hn8I0YQ39q7//2z8vYsgLeM1mMXL4PUIU/0f0dBAFBLpxV7bntGzyCJls6SeGS/qcQKhqaI 6I7NcWg8OkIJIhUL6q238cS1ql9pU65fyHe0PP8JS08m81PDpX2/4wTE6h2jgYUy55eXRzoF MEjr1S8SSnidsBem27o7iWu9ltJsUtE86071iZlLzbuHv2nvucrjAV9cK9tHrxYT/YiY8QhT L48iWj2xIjLjg1ebmgIFZ2k881we/KTIoUugqOOR1gDSc4qwM8CA388cN3frjtl98CwhAT5T UV8tIDqri+/Z1AKwzsBNBFVxiRIBCACxI/aglzGVbnI6XHd0MTP05VK/fJub4hHdc+LQpz1M kVnCAhFbY9oecTB/togdKtfiloavjbFrb0nJhJnx57K+3SdSuu+znaQ4SlWiZOtXnkbpRWNU eMm+gtTDMSvloGAfr76RtFHskdDOLgXsHD70bKuMhlBxUCrSwGzHaD00q8iQPhJZ5itb3WPq z3B4IjiDAWTO2obD1wtAvSuHuUj/XJRsiKDKW3x13cfavkad81bZW4cpNwUv8XHLv/vaZPSA ly+hkY7NrDZydMMXVNQ7AJQufWuTJ0q7sImRcEZ5EIa98esJPey4O7C0vY405wjeyxpVZkpq ThDMurqtQFn1ABEBAAHCwHwEGAEKACYCGwwWIQSjceplnAvsyCtxUxNH67XvWv31RAUCWvLv qwUJCyUBGQAKCRBH67XvWv31RLnrB/9gzcRlpx71sDMosoZULWn7wysBJ/8AIEfIByRaHQe3 pn/KwE57pB+zFbbQqB7YzeZb7/UUgR4zU2ZbOcEfwDZcHUbj0B3fGRsS3t0uiLlAd8w0sBZb SxrqzjdpDjIbOZkxssqUmvrsN67UG1AFWH9aD24keBS7YjPBS8hLxPeYV+Xz6vUL8fRZje/Z JgiBMIwyj6g2lH/zkdnxBdC0iG1xxJOLTaghMMeQyCdH6ef8+VMyAlAJsMckbOTvx63tY8z7 DFcrnTJfbe1EziRilVsEaK8tTzJzhcTfos+f3eBYWEilxe5HzIhYKJeC7lmsSUcGwa6+9VRg a0ctmi9Z8OgX Message-ID: <6a8368eb-5ceb-192d-043e-f71e13a5b61d@freebsd.org> Date: Sun, 20 May 2018 22:44:54 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: de-CH Content-Transfer-Encoding: 7bit X-ID: SgphFsZaghWhTh1d0Cml63LcHI-Rruh2ZZ+T6990upEspUwgd-0Mx3RgNiwFVukQ8X X-TOI-MSGID: d1817515-3623-408e-8301-382c4de12ff8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 20:45:09 -0000 Am 20.05.18 um 22:30 schrieb Antoine Brodin: > On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: >> Author: eadler >> Date: Sun May 20 05:06:42 2018 >> New Revision: 333919 >> URL: https://svnweb.freebsd.org/changeset/base/333919 >> >> Log: >> MFV: file 5.33 >> >> Merge the latest file(1) in. >> >> Relevent Changelog: >> - extend the support for ${x?:} expansions for magic descriptions >> - add support for ${x?:} in mime types to handle pie binaries. >> - add support for negative offsets (offsets from the end of file) >> - close the file on error when writing magic >> >> Relnotes: yes > > Hi, > > This breaks the ports tree, please revert and request an exp-run. This seems to be the cause of LIB_DEPENDS not being correctly checked. I have fixed this locally with the following patch to find-lib.sh: Index: Mk/Scripts/find-lib.sh =================================================================== --- Mk/Scripts/find-lib.sh (Revision 470484) +++ Mk/Scripts/find-lib.sh (Arbeitskopie) @@ -27,7 +27,9 @@ for libdir in ${dirs} ; do test -f ${libdir}/${lib} || continue libfile=${libdir}/${lib} - [ `file -b -L --mime-type ${libfile}` = "application/x-sharedlib" ] || continue - echo $libfile - break + case `file -b -L --mime-type ${libfile}` in + application/x-pie-executable|application/x-sharedlib) + echo $libfile + break ;; + esac done This works for amd64 at least ... Regards, STefan From owner-svn-src-head@freebsd.org Sun May 20 20:48:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B59BEEEFE5; Sun, 20 May 2018 20:48:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B53036F958; Sun, 20 May 2018 20:48:26 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9260E1B625; Sun, 20 May 2018 20:48:26 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KKmQg3061616; Sun, 20 May 2018 20:48:26 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KKmQDk061615; Sun, 20 May 2018 20:48:26 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805202048.w4KKmQDk061615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 20:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333939 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 333939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 20:48:27 -0000 Author: mmacy Date: Sun May 20 20:48:26 2018 New Revision: 333939 URL: https://svnweb.freebsd.org/changeset/base/333939 Log: make sure vnet is set when freeing Reported by: pho Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Sun May 20 20:34:15 2018 (r333938) +++ head/sys/netinet6/in6_mcast.c Sun May 20 20:48:26 2018 (r333939) @@ -1626,6 +1626,8 @@ inp_gcmoptions(epoch_context_t ctx) { struct ip6_moptions *imo; struct in6_mfilter *imf; + struct in6_multi *inm; + struct ifnet *ifp; size_t idx, nmships; imo = __containerof(ctx, struct ip6_moptions, imo6_epoch_ctx); @@ -1635,8 +1637,13 @@ inp_gcmoptions(epoch_context_t ctx) imf = imo->im6o_mfilters ? &imo->im6o_mfilters[idx] : NULL; if (imf) im6f_leave(imf); - /* XXX this will thrash the lock(s) */ - (void)in6_leavegroup(imo->im6o_membership[idx], imf); + inm = imo->im6o_membership[idx]; + ifp = inm->in6m_ifp; + if (ifp) + CURVNET_SET(ifp->if_vnet); + (void)in6_leavegroup(inm, imf); + if (ifp) + CURVNET_RESTORE(); if (imf) im6f_purge(imf); } From owner-svn-src-head@freebsd.org Sun May 20 21:20:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 698DBEF0734; Sun, 20 May 2018 21:20:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 206F571309; Sun, 20 May 2018 21:20:27 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F18481BB17; Sun, 20 May 2018 21:20:26 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KLKQ3l076665; Sun, 20 May 2018 21:20:26 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KLKQ6P076664; Sun, 20 May 2018 21:20:26 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805202120.w4KLKQ6P076664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 21:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333941 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 333941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 21:20:27 -0000 Author: mmacy Date: Sun May 20 21:20:26 2018 New Revision: 333941 URL: https://svnweb.freebsd.org/changeset/base/333941 Log: AF_UNIX: Don't unlock unp/unp2 if they're not locked Reported by: mjg Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Sun May 20 21:07:29 2018 (r333940) +++ head/sys/kern/uipc_usrreq.c Sun May 20 21:20:26 2018 (r333941) @@ -1568,7 +1568,7 @@ unp_connectat(int fd, struct socket *so, struct sockad so2 = NULL; if (so2 == NULL) { error = ECONNREFUSED; - goto bad3; + goto bad2; } unp3 = sotounpcb(so2); unp_pcb_lock2(unp2, unp3); From owner-svn-src-head@freebsd.org Sun May 20 21:27:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF1E0EF099C; Sun, 20 May 2018 21:27:28 +0000 (UTC) (envelope-from kp@krion.cc) Received: from krion.cc (krion.cc [148.251.235.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46E9071782; Sun, 20 May 2018 21:27:28 +0000 (UTC) (envelope-from kp@krion.cc) Received: from krion.cc (krion.cc [148.251.235.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by krion.cc (Postfix) with ESMTPSA id CA5F27637D; Sun, 20 May 2018 23:27:26 +0200 (CEST) Date: Sun, 20 May 2018 23:27:26 +0200 From: Kirill Ponomarev To: Eitan Adler Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests Message-ID: <20180520212726.GA42447@krion.cc> References: <201805200506.w4K56gps088300@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ew6BAiZeqk4r7MaW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 21:27:29 -0000 --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 05/20, Antoine Brodin wrote: > On Sun, May 20, 2018 at 10:30 PM, Antoine Brodin wr= ote: > > On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: > >> Author: eadler > >> Date: Sun May 20 05:06:42 2018 > >> New Revision: 333919 > >> URL: https://svnweb.freebsd.org/changeset/base/333919 > >> > >> Log: > >> MFV: file 5.33 > >> > >> Merge the latest file(1) in. > >> > >> Relevent Changelog: > >> - extend the support for ${x?:} expansions for magic descriptions > >> - add support for ${x?:} in mime types to handle pie binaries. > >> - add support for negative offsets (offsets from the end of file) > >> - close the file on error when writing magic > >> > >> Relnotes: yes > > > > Hi, > > > > This breaks the ports tree, please revert and request an exp-run. >=20 > At least revert the changes to contrib/file/magic/Magdir/elf Eitan, please coordinate your efforts with portmgr first (for exp-run) before committing such changes. --ew6BAiZeqk4r7MaW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEJCHRFhEAQujKni1pDyI9/LMCykUFAlsB6D4ACgkQDyI9/LMC ykU1YAf+KDsPFEt1zRuppUI8nUvyGR1mgBS2LM4TOVVG1+lHA92mfaoL+ZWQFkMz lUnffctKN1RI5YyMVRphnQ74/iyAt00AzdYVEDaXke/vgjz/lmJsQUBosONW3Tjr JyclN33QMYdKLNy10FtVfV/uvj2yBNOgFAsomm/K1cW5AbqTbl+9bPAoqOQHPsrY ekKHZ1preSUp7MK12OOJOYknSNQfZ+9AJeva+xZVVmsUN3WBueQX6i3WoCYsBaPM 2FY0Qfs5dhJAgxeu7shyFtJkIs4599EnhyvZCF5IXJ0+oT4JVNBhOGL8HSMwQllN uikRkh0BmrCGLeC1qT5j6wxG7o+/QA== =DnfB -----END PGP SIGNATURE----- --ew6BAiZeqk4r7MaW-- From owner-svn-src-head@freebsd.org Sun May 20 21:29:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C071EF0A33 for ; Sun, 20 May 2018 21:29:06 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABB87719B5 for ; Sun, 20 May 2018 21:29:05 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-wm0-x22b.google.com with SMTP id t11-v6so22203529wmt.0 for ; Sun, 20 May 2018 14:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ZIfD41DgAnLk8yq1rQLSElMkcDuYepjSh3wbN963Lgs=; b=yzB+5gCyNoyIo0NAL1tsCS1t3/n+M/w3OxkkJCyFmFrTMHeV1/ceagmYVKYe47GcVk 5vRmIKT2jaKnJU+d4jgOTn8v7pGtWQIckYdAYsJI0JgW/BpbK5AbexPZkEWH8UGnwM6T kvUfXjBjQEaGIGsk1C1ripdjG33P/7hANVKADTsvHcNdpVdOWH+aHomQW/5l0cDXS9gt f3XLbIx8Dgx/ITYrDWMnKj770hoGeArALtr8PummMesBC5WzTCMg9/Au4w2CkF2zwlA4 7fivLnYqIL6ikHK0BNaUojgtu/K8VxfvztWmsw5PtPE2IcXZ1bcx6D48xdRVY0E+bUwY z61w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ZIfD41DgAnLk8yq1rQLSElMkcDuYepjSh3wbN963Lgs=; b=YboSI3iG+ARBzH8qW0OvO4QaiDSI4QTzNc49VJcQ43foRSWz6luVjiQtpTVXWpIOnB vjwXyFXdIvZpMUcxDIPx3XJjCeZzJY/ZPsXrNVwBA+15rIl5qvKuPmM3n52SQRJO1UMk XAe1M4uLMZFTBZ++g0X52X9zuQSWPL/pqLd6ur4aoh46Gu3ORssrtt0Lo0qvccS3YOao ji12ETrNessoCw1morAMSmh20pwEcXH7VTZ9gpPd4goV7c50Q7NQ4SqOpJKBHjTMbN60 9Fn0hkI2dbAmdyNBwPa7uYI7rvrhyNfNMRHvdx/5MqkAOLnSSZnJvHmPFez25ra2PdG/ +m8Q== X-Gm-Message-State: ALKqPwc4RBKqCnhYJDtw6NMD58cRXW54e7RrJiow19hSV4FsmWs1aIrR kOJc2ueqB2G1vRFQ8Swb1Zc71j9Nrkp52rOvkO4AWw== X-Google-Smtp-Source: AB8JxZrgeCNvmvizMbOSRWVYWuBDtTG6utRaNZZk/DzJa3nPG4JMvvb24G4cJzNhfpTFAZ6utT2JbyTt/OuRIj2lWes= X-Received: by 2002:aa7:d3d7:: with SMTP id o23-v6mr21210235edr.104.1526851744155; Sun, 20 May 2018 14:29:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.148.173 with HTTP; Sun, 20 May 2018 14:28:33 -0700 (PDT) In-Reply-To: <201805201421.w4KELKmY067883@repo.freebsd.org> References: <201805201421.w4KELKmY067883@repo.freebsd.org> From: Ed Schouten Date: Sun, 20 May 2018 23:28:33 +0200 Message-ID: Subject: Re: svn commit: r333925 - head/sys/teken To: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 21:29:06 -0000 Hi Jean-S=C3=A9bastien, 2018-05-20 16:21 GMT+02:00 Jean-S=C3=A9bastien P=C3=A9dron : > Modified: head/sys/teken/sequences > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/teken/sequences Sun May 20 06:14:12 2018 (r333924) > +++ head/sys/teken/sequences Sun May 20 14:21:20 2018 (r333925) > @@ -48,6 +48,7 @@ CUF Cursor Forward ^[ [ a = n > CUP Cursor Position ^[ [ H n n > CUP Cursor Position ^[ [ f n n > CUU Cursor Up ^[ [ A n > +CS Cursor style ^[ [ SP q r > DA1 Primary Device Attributes ^[ [ c r > DA2 Secondary Device Attributes ^[ [ > c r > DC Delete character ^[ [ P n So far I've been trying to be quite consistent in the naming here, using the exact phrasing that is used elsewhere. Could you please use "DECSCUSR" and "Set Cursor Style" here, just like on this page? https://vt100.net/docs/vt510-rm/DECSCUSR.html Thanks, --=20 Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-head@freebsd.org Sun May 20 21:35:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 694DBEF0D7B; Sun, 20 May 2018 21:35:29 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 14F76720FB; Sun, 20 May 2018 21:35:29 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from ler-imac.local (unknown [IPv6:2600:1700:210:b18f:7c4e:eda6:79a2:421b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: ler) by smtp.freebsd.org (Postfix) with ESMTPSA id 8854C100CC; Sun, 20 May 2018 21:35:28 +0000 (UTC) (envelope-from ler@FreeBSD.org) Date: Sun, 20 May 2018 16:35:27 -0500 From: Larry Rosenman To: Stefan Esser Cc: Antoine Brodin , Eitan Adler , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests Message-ID: <20180520213527.e3fhugq47mdlyt3x@ler-imac.local> Mail-Followup-To: Stefan Esser , Antoine Brodin , Eitan Adler , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201805200506.w4K56gps088300@repo.freebsd.org> <6a8368eb-5ceb-192d-043e-f71e13a5b61d@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wqm577oznjbr5rfv" Content-Disposition: inline In-Reply-To: <6a8368eb-5ceb-192d-043e-f71e13a5b61d@freebsd.org> User-Agent: NeoMutt/20180512-4-fd97e5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 21:35:29 -0000 --wqm577oznjbr5rfv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 20, 2018 at 10:44:54PM +0200, Stefan Esser wrote: > Am 20.05.18 um 22:30 schrieb Antoine Brodin: > > On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: > >> Author: eadler > >> Date: Sun May 20 05:06:42 2018 > >> New Revision: 333919 > >> URL: https://svnweb.freebsd.org/changeset/base/333919 > >> > >> Log: > >> MFV: file 5.33 > >> > >> Merge the latest file(1) in. > >> > >> Relevent Changelog: > >> - extend the support for ${x?:} expansions for magic descriptions > >> - add support for ${x?:} in mime types to handle pie binaries. > >> - add support for negative offsets (offsets from the end of file) > >> - close the file on error when writing magic > >> > >> Relnotes: yes > >=20 > > Hi, > >=20 > > This breaks the ports tree, please revert and request an exp-run. >=20 > This seems to be the cause of LIB_DEPENDS not being correctly checked. >=20 > I have fixed this locally with the following patch to find-lib.sh: >=20 > Index: Mk/Scripts/find-lib.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- Mk/Scripts/find-lib.sh (Revision 470484) > +++ Mk/Scripts/find-lib.sh (Arbeitskopie) > @@ -27,7 +27,9 @@ > for libdir in ${dirs} ; do > test -f ${libdir}/${lib} || continue > libfile=3D${libdir}/${lib} > - [ `file -b -L --mime-type ${libfile}` =3D "application/x-sharedlib" ] |= | continue > - echo $libfile > - break > + case `file -b -L --mime-type ${libfile}` in > + application/x-pie-executable|application/x-sharedlib) > + echo $libfile > + break ;; > + esac > done >=20 > This works for amd64 at least ... seems to work for me as well (also amd64).=20 --=20 Larry Rosenman https://people.FreeBSD.org/~ler/ Phone: +1 214-642-9640 E-Mail: ler@FreeBSD.org US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106 --wqm577oznjbr5rfv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHBBAABCgCrFiEEHjgknedhWzvJgwVzaXyZsatIp30FAlsB6h8tFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3JnbGVyQEZyZWVCU0Qub3JnXxSAAAAAAC4AKGlz c3Vlci1mcHJAbm90YXRpb25zLm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxRTM4 MjQ5REU3NjE1QjNCQzk4MzA1NzM2OTdDOTlCMUFCNDhBNzdEAAoJEGl8mbGrSKd9 mBcH/2qu6NO220DSTcLy0iNtzCIyKStond97cQtK3iAkciXHQAb/fRpT0T0/F8zR V/g1+cP4t/YU+cYGxdzQBNhYKK6lYUz+iukUFm02EcgU4USOzy0Dk5by+fkwoZW7 3Wcpz53poNs1NgbThq7vHzJvOsujZcdr/kBPInLhOycK7yAw++vnx0tLFqnKv56X YQSzFJkviy8ZQhBTNLa5W5FZeev2LUodmRggo6pl14Oq834hFXPn3pPOj0f4k+O+ 69PfgV9zV4c0/vWoMLlUhRHNqSRQdjK76injl6Md/sVWN/6LSMcVJKPL0xQiFkdE T+jXMRGGgaT3hHCyARnnvpTN60g= =vNuo -----END PGP SIGNATURE----- --wqm577oznjbr5rfv-- From owner-svn-src-head@freebsd.org Sun May 20 21:37:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C529FEF0EAE; Sun, 20 May 2018 21:37:35 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F2E072296; Sun, 20 May 2018 21:37:35 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48D341BE5E; Sun, 20 May 2018 21:37:35 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KLbZf2087095; Sun, 20 May 2018 21:37:35 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KLbZHH087094; Sun, 20 May 2018 21:37:35 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805202137.w4KLbZHH087094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 20 May 2018 21:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333942 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 333942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 21:37:36 -0000 Author: mmacy Date: Sun May 20 21:37:34 2018 New Revision: 333942 URL: https://svnweb.freebsd.org/changeset/base/333942 Log: AF_UNIX gc unused label ...sigh Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Sun May 20 21:20:26 2018 (r333941) +++ head/sys/kern/uipc_usrreq.c Sun May 20 21:37:34 2018 (r333942) @@ -1615,7 +1615,6 @@ unp_connectat(int fd, struct socket *so, struct sockad sotounpcb(so2) == unp2, ("%s: unp2 %p so2 %p", __func__, unp2, so2)); error = unp_connect2(so, so2, PRU_CONNECT); -bad3: UNP_PCB_UNLOCK(unp2); UNP_PCB_UNLOCK(unp); bad2: From owner-svn-src-head@freebsd.org Sun May 20 21:39:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5429EF0F53; Sun, 20 May 2018 21:39:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18EE9723F4; Sun, 20 May 2018 21:39:10 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4KLd2cm022070; Sun, 20 May 2018 14:39:02 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4KLd21O022069; Sun, 20 May 2018 14:39:02 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805202139.w4KLd21O022069@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r333937 - head/lib/libc/sys In-Reply-To: <201805202028.w4KKSH1i051380@repo.freebsd.org> To: Sevan Janiyan Date: Sun, 20 May 2018 14:39:02 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 21:39:11 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: sevan (doc committer) > Date: Sun May 20 20:28:17 2018 > New Revision: 333937 > URL: https://svnweb.freebsd.org/changeset/base/333937 > > Log: > Fix a typo and remove an unneeded Tn macro as highlighted by mandoc -Tlint. > > Submitted by: Mateusz Piotrowski > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D15204 > > Modified: > head/lib/libc/sys/recv.2 > > Modified: head/lib/libc/sys/recv.2 > ============================================================================== > --- head/lib/libc/sys/recv.2 Sun May 20 20:08:21 2018 (r333936) > +++ head/lib/libc/sys/recv.2 Sun May 20 20:28:17 2018 (r333937) > @@ -28,7 +28,7 @@ > .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 > .\" $FreeBSD$ > .\" > -.Dd October 3, 2017 > +.Dd May 20, 2018 > .Dt RECV 2 > .Os > .Sh NAME > @@ -198,9 +198,7 @@ If no data is available, > .Va errno > is set to > .Er EAGAIN . > -This flag is not available in strict > -.Tn ANSI > -or C99 compilation mode. > +This flag is not available in strict ANSI or C99 compilation mode. This could be re-written to use .St > The > .Dv MSG_WAITFORONE > flag sets MSG_DONTWAIT after the first message has been received. > @@ -298,7 +296,7 @@ system call uses the > .Fa mmsghdr > structure, defined as follows in the > .In sys/socket.h > -header : > +header: > .Bd -literal > struct mmsghdr { > struct msghdr msg_hdr; /* message header */ > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun May 20 21:56:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0D39EF1505; Sun, 20 May 2018 21:56:09 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 630D072D97; Sun, 20 May 2018 21:56:09 +0000 (UTC) (envelope-from sevan@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FDD51C198; Sun, 20 May 2018 21:56:09 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KLu9Td097167; Sun, 20 May 2018 21:56:09 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KLu90V097166; Sun, 20 May 2018 21:56:09 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201805202156.w4KLu90V097166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 20 May 2018 21:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333943 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: sevan X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 333943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 21:56:09 -0000 Author: sevan (doc committer) Date: Sun May 20 21:56:08 2018 New Revision: 333943 URL: https://svnweb.freebsd.org/changeset/base/333943 Log: Use St macro for specifying C standards. Reported by: rgrimes@ Modified: head/lib/libc/sys/recv.2 Modified: head/lib/libc/sys/recv.2 ============================================================================== --- head/lib/libc/sys/recv.2 Sun May 20 21:37:34 2018 (r333942) +++ head/lib/libc/sys/recv.2 Sun May 20 21:56:08 2018 (r333943) @@ -198,7 +198,11 @@ If no data is available, .Va errno is set to .Er EAGAIN . -This flag is not available in strict ANSI or C99 compilation mode. +This flag is not available in +.St -ansiC +or +.St -isoC-99 +compilation mode. The .Dv MSG_WAITFORONE flag sets MSG_DONTWAIT after the first message has been received. From owner-svn-src-head@freebsd.org Sun May 20 22:07:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E69BAEF1951; Sun, 20 May 2018 22:07:45 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9063073406; Sun, 20 May 2018 22:07:45 +0000 (UTC) (envelope-from antoine@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69FA11C32D; Sun, 20 May 2018 22:07:45 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KM7jki002520; Sun, 20 May 2018 22:07:45 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KM7jSO002519; Sun, 20 May 2018 22:07:45 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201805202207.w4KM7jSO002519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Sun, 20 May 2018 22:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333944 - head/contrib/file/magic/Magdir X-SVN-Group: head X-SVN-Commit-Author: antoine X-SVN-Commit-Paths: head/contrib/file/magic/Magdir X-SVN-Commit-Revision: 333944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 22:07:46 -0000 Author: antoine Date: Sun May 20 22:07:44 2018 New Revision: 333944 URL: https://svnweb.freebsd.org/changeset/base/333944 Log: Revert last change to file/magic/Magdir/elf, it misidentifies most shared libraries installed from ports as pie executables instead of shared libraries, and consequently breaks ports. Modified: head/contrib/file/magic/Magdir/elf Modified: head/contrib/file/magic/Magdir/elf ============================================================================== --- head/contrib/file/magic/Magdir/elf Sun May 20 21:56:08 2018 (r333943) +++ head/contrib/file/magic/Magdir/elf Sun May 20 22:07:44 2018 (r333944) @@ -48,9 +48,8 @@ !:mime application/x-object >16 leshort 2 executable, !:mime application/x-executable ->16 leshort 3 ${x?pie executable:shared object} - -!:mime application/x-${x?pie-executable:sharedlib} +>16 leshort 3 shared object, +!:mime application/x-sharedlib >16 leshort 4 core file !:mime application/x-coredump # Core file detection is not reliable. From owner-svn-src-head@freebsd.org Sun May 20 22:08:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A90BEF1996; Sun, 20 May 2018 22:08:21 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3ED773537; Sun, 20 May 2018 22:08:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4KM8ItD022225; Sun, 20 May 2018 15:08:18 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4KM8Ip2022224; Sun, 20 May 2018 15:08:18 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805202208.w4KM8Ip2022224@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r333943 - head/lib/libc/sys In-Reply-To: <201805202156.w4KLu90V097166@repo.freebsd.org> To: Sevan Janiyan Date: Sun, 20 May 2018 15:08:18 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 22:08:21 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: sevan (doc committer) > Date: Sun May 20 21:56:08 2018 > New Revision: 333943 > URL: https://svnweb.freebsd.org/changeset/base/333943 > > Log: > Use St macro for specifying C standards. > > Reported by: rgrimes@ Thank you. > Modified: > head/lib/libc/sys/recv.2 > > Modified: head/lib/libc/sys/recv.2 > ============================================================================== > --- head/lib/libc/sys/recv.2 Sun May 20 21:37:34 2018 (r333942) > +++ head/lib/libc/sys/recv.2 Sun May 20 21:56:08 2018 (r333943) > @@ -198,7 +198,11 @@ If no data is available, > .Va errno > is set to > .Er EAGAIN . > -This flag is not available in strict ANSI or C99 compilation mode. > +This flag is not available in > +.St -ansiC > +or > +.St -isoC-99 > +compilation mode. > The > .Dv MSG_WAITFORONE > flag sets MSG_DONTWAIT after the first message has been received. > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun May 20 22:10:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE04EEF1AA5; Sun, 20 May 2018 22:10:24 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qt0-x230.google.com (mail-qt0-x230.google.com [IPv6:2607:f8b0:400d:c0d::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6368D736CE; Sun, 20 May 2018 22:10:24 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-qt0-x230.google.com with SMTP id h2-v6so16793965qtp.7; Sun, 20 May 2018 15:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6HDsA/mPZ4EZPq/mjrYU3t9Lmo31m+0KINiNtyI2/oc=; b=KXR7FsZl++S4fUt1xTPKiznij+iLsKqVL09JqKGmOmpBlQP0CXU32ZwhUjXAnwMyiZ CuNy49KbvbZOB7aASiTmRiAoQ4JZ3Yp8bq9o4MTl+Y4h2FXJ9uQJSq/p8JAMlkENzYia +Mu7H2+2xPVy2hwb+/dWKWEMPpKauvr9b4oyjq/ucSc3iYT4UXka4WGyzRddeGoKzdvc BsxQsbN5XbWtEXsIwi8KeLBj7+d++d3Ms6fCPY4IYDEe0TztpfduUxAMcekYPKZiE9RB qV6l9vzdQ6d9caQZ7EQzX8PWJ7aGbmlPiBxwVOORzKVob5wBaDb7vhkBGcizcXhwWej0 6frg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=6HDsA/mPZ4EZPq/mjrYU3t9Lmo31m+0KINiNtyI2/oc=; b=mBjlEgojX41oxqjNJzB7F/qsUKrkE5zUarRAOkptfuV+LkzxMu2VucwEmFGFpfsOin odXAVqHS65toZKqDG+DALHQTlIC4moOIf+mhQNdkewY/YD9khyLYYYvdkaF55WbpBVe3 7BIC2goL+acBSodbJ55yb0KWywkz2OpWXufqpyUm5qcWkiI04V1MsuZeGDuAw8bY1mj8 C783k0UxNhoLm6FTAbIpydzAg+kwUsT4JFL5BXh3Lltb7Np3oSeSTc/ngXZmRbivo+1G 7/i1/bCWNbQfEJfOmU7+5stxSEYGV5S/2Vd+Cd95GAzMSksRW+TcbAT3d4p0aXM8dA/H FH5Q== X-Gm-Message-State: ALKqPwcNRmWAUVyWC8m0YpFs9Uk1Ff3yqoapEr+wsVwbi2oNL3+Ig/Y6 PWjx7dyL30hoGLzxJPAxtETYfdSOQIM/f8/HtuQ= X-Google-Smtp-Source: AB8JxZo2o0Ymuj27653+GfFjEpY3wkBZEzuJm/aius7D7BGgvVwoa124yuOgXQ+R3B36H6zrk7JKkH3dujBViAWZpfQ= X-Received: by 2002:a0c:8732:: with SMTP id 47-v6mr15927785qvh.134.1526854223762; Sun, 20 May 2018 15:10:23 -0700 (PDT) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.12.172.207 with HTTP; Sun, 20 May 2018 15:10:23 -0700 (PDT) In-Reply-To: References: <201805200506.w4K56gps088300@repo.freebsd.org> From: Antoine Brodin Date: Mon, 21 May 2018 00:10:23 +0200 X-Google-Sender-Auth: VKwDzzQ1MekiCN9SXfzBCg7um3s Message-ID: Subject: Re: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 22:10:25 -0000 On Sun, May 20, 2018 at 10:39 PM, Antoine Brodin wrote: > On Sun, May 20, 2018 at 10:30 PM, Antoine Brodin wrote: >> On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: >>> Author: eadler >>> Date: Sun May 20 05:06:42 2018 >>> New Revision: 333919 >>> URL: https://svnweb.freebsd.org/changeset/base/333919 >>> >>> Log: >>> MFV: file 5.33 >>> >>> Merge the latest file(1) in. >>> >>> Relevent Changelog: >>> - extend the support for ${x?:} expansions for magic descriptions >>> - add support for ${x?:} in mime types to handle pie binaries. >>> - add support for negative offsets (offsets from the end of file) >>> - close the file on error when writing magic >>> >>> Relnotes: yes >> >> Hi, >> >> This breaks the ports tree, please revert and request an exp-run. > > At least revert the changes to contrib/file/magic/Magdir/elf The problematic part was reverted in r333944 Antoine From owner-svn-src-head@freebsd.org Sun May 20 22:14:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEA6AEF1CCC; Sun, 20 May 2018 22:14:55 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660075.outbound.protection.outlook.com [40.107.66.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B47C73AB7; Sun, 20 May 2018 22:14:54 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM (52.132.44.24) by YTOPR0101MB2185.CANPRD01.PROD.OUTLOOK.COM (52.132.48.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Sun, 20 May 2018 22:14:53 +0000 Received: from YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM ([fe80::e15e:49f3:c225:a8de]) by YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM ([fe80::e15e:49f3:c225:a8de%13]) with mapi id 15.20.0776.015; Sun, 20 May 2018 22:14:53 +0000 From: Rick Macklem To: Matt Macy , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient Thread-Topic: svn commit: r333924 - head/sys/fs/nfsclient Thread-Index: AQHT8AHO3Ia6QcXkEUStxrPykfWmgqQ5LlDD Date: Sun, 20 May 2018 22:14:53 +0000 Message-ID: References: <201805200614.w4K6EC0L023252@repo.freebsd.org> In-Reply-To: <201805200614.w4K6EC0L023252@repo.freebsd.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB2185; 7:/XZl0fTeiigV5qxanc3K4FVefCWSOvZGbkMCYezMma9GFKCSlVA6fon5QFvA5vWJ+Jna7tuJZtzN/akWRzrKfV6ps0l0G3UOS+0MmGG3TMWEIL3CNEZazdSfb4qn835kmekGY1DYI8duDkkYcBU9PG2YCEXI8AbjFJ04gTeyaUU3SLIkt43d8duTcxhjBeGOeSiYR/1FHnqOx0LTD/iPXWxT3vKfrKpICUHbUZlYl+2SzZQPNoB3r/vu8086WCYm x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB2185; x-ms-traffictypediagnostic: YTOPR0101MB2185: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:YTOPR0101MB2185; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB2185; x-forefront-prvs: 06780E24F8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(396003)(39380400002)(366004)(346002)(69234005)(189003)(199004)(2906002)(55016002)(9686003)(6306002)(74316002)(786003)(110136005)(14454004)(33656002)(316002)(25786009)(74482002)(2900100001)(3280700002)(5660300001)(305945005)(3660700001)(966005)(106356001)(97736004)(105586002)(478600001)(68736007)(450100002)(6436002)(53936002)(476003)(6246003)(8676002)(229853002)(81166006)(81156014)(8936002)(99286004)(5250100002)(26005)(6506007)(2501003)(446003)(102836004)(86362001)(11346002)(2201001)(186003)(7696005)(486006)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB2185; H:YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: w1EYTHxFLg5zH/B9yYdTmr3cIR1LGO7rqJGM/+0EWUBMEFWLdubwjjZ8q69QtMn1JrZAZ6EWkRzreg28LjBPMcgXLZ3WFweDQuPbaro7G9HVbME6ams6WMPH+hSvkwAvAPfAQRgodjLBgs70UznYA174IhdJ3wI/WgfpqAHhQSbtqYWeyZNwiqyzZAV6UKEh spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 98ed2d96-e264-458f-c73d-08d5be9f1ca7 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 98ed2d96-e264-458f-c73d-08d5be9f1ca7 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2018 22:14:53.1378 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB2185 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 22:14:56 -0000 Matt Macy wrote: >Author: mmacy >Date: Sun May 20 06:14:12 2018 >New Revision: 333924 >URL: https://svnweb.freebsd.org/changeset/base/333924 > >Log: > nfsclient: warnings cleanups Just wondering what compiler you are using. I haven't seen warnings for the= se? FYI, for the first two cases, ncookie is always set before it is used. For the third, "rflags" is set but not used. I sometimes leave code like th= is in the tree since I might need those argument flags later and might not rememb= er how to get them. In this case, similar code in other functions set "rflags"= in the same way, so it shouldn't be hard to crib the assignment from there. As such, I don't have a problem with deleting the code. rick ... the commit patch ... Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 = (r333923) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 = (r333924) @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu char *uiocp; struct mbuf *mp, *mp2, *firstmp; int xfer, left, mlen; - int uiosiz, clflg, rem; + int uiosiz, clflg; char *tcp; KASSERT(uiop->uio_iovcnt =3D=3D 1, ("nfsm_uiotombuf: iovcnt !=3D 1"= )); @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu clflg =3D 1; else clflg =3D 0; - rem =3D NFSM_RNDUP(siz) - siz; if (clflg !=3D 0) NFSMCLGET(mp, M_WAITOK); else Modified: head/sys/fs/nfsclient/nfs_clrpcops.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 05:59:42 2018 = (r333923) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 06:14:12 2018 = (r333924) @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint6= 4 KASSERT(uiop->uio_iovcnt =3D=3D 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) =3D=3D 0, ("nfs readdirrpc bad uio")); - + ncookie.lval[0] =3D ncookie.lval[1] =3D 0; /* * There is no point in reading a lot more than uio_resid, however * adding one additional DIRBLKSIZ makes sense. Since uio_resid @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsu= i KASSERT(uiop->uio_iovcnt =3D=3D 1 && (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) =3D=3D 0, ("nfs readdirplusrpc bad uio")); + ncookie.lval[0] =3D ncookie.lval[1] =3D 0; timespecclear(&dctime); *attrflagp =3D 0; if (eofp !=3D NULL) @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, u= i NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); len =3D fxdr_unsigned(uint32_t, *tl); + str =3D NULL; if (len > NFSV4_OPAQUELIMIT) { error =3D NFSERR_BADXDR; goto nfsmout; @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int name= l struct nfsclsession *tsep; nfsattrbit_t attrbits; nfsv4stateid_t stateid; - uint32_t rflags; struct nfsmount *nmp; nmp =3D VFSTONFS(dvp->v_mount); @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int name= l stateid.other[0] =3D *tl++; stateid.other[1] =3D *tl++; stateid.other[2] =3D *tl; - rflags =3D fxdr_unsigned(u_int32_t, *(tl + 6)); nfsrv_getattrbits(nd, &attrbits, NULL, NULL); NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); deleg =3D fxdr_unsigned(int, *tl); From owner-svn-src-head@freebsd.org Sun May 20 22:18:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC5C4EF1D99 for ; Sun, 20 May 2018 22:18:47 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 568A573C54 for ; Sun, 20 May 2018 22:18:47 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yb0-f169.google.com (mail-yb0-f169.google.com [209.85.213.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id 1B6C0104C9 for ; Sun, 20 May 2018 22:18:47 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yb0-f169.google.com with SMTP id w14-v6so4471904ybm.5 for ; Sun, 20 May 2018 15:18:47 -0700 (PDT) X-Gm-Message-State: ALKqPwf38APLolzFP8gvjWPmyAPmeY1Cmi8tgezb1CmFzx4QYFC8QMDJ Kd9XXjBo0I0Q8yFtCuzhKDe40ILAZgh1IJ6UvItoHA== X-Google-Smtp-Source: AB8JxZpt1JcE47OvpxezSxvnIVva7ehfa4FvlZ591s5+UmFhqE0Z/j72wXU11ivuYXzrpYvmcE7vC+9jCTQQfTT9y8w= X-Received: by 2002:a25:2cd6:: with SMTP id s205-v6mr10178612ybs.338.1526854726434; Sun, 20 May 2018 15:18:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Sun, 20 May 2018 15:18:15 -0700 (PDT) In-Reply-To: <20180520212726.GA42447@krion.cc> References: <201805200506.w4K56gps088300@repo.freebsd.org> <20180520212726.GA42447@krion.cc> From: Eitan Adler Date: Sun, 20 May 2018 15:18:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests To: Kirill Ponomarev Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 22:18:47 -0000 On 20 May 2018 at 14:27, Kirill Ponomarev wrote: > On 05/20, Antoine Brodin wrote: >> On Sun, May 20, 2018 at 10:30 PM, Antoine Brodin wrote: >> > On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: >> >> Author: eadler >> >> Date: Sun May 20 05:06:42 2018 >> >> New Revision: 333919 >> >> URL: https://svnweb.freebsd.org/changeset/base/333919 >> >> >> >> Log: >> >> MFV: file 5.33 >> >> >> >> Merge the latest file(1) in. >> >> >> >> Relevent Changelog: >> >> - extend the support for ${x?:} expansions for magic descriptions >> >> - add support for ${x?:} in mime types to handle pie binaries. >> >> - add support for negative offsets (offsets from the end of file) >> >> - close the file on error when writing magic >> >> >> >> Relnotes: yes >> > >> > Hi, >> > >> > This breaks the ports tree, please revert and request an exp-run. >> >> At least revert the changes to contrib/file/magic/Magdir/elf > > Eitan, please coordinate your efforts with portmgr first (for > exp-run) before committing such changes. I had no reason to believe this would break ports. Now that is has, my world view has changed, and I'll ask for an exp-run before even minor changes to libmagic. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Sun May 20 22:59:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77DC9EF2FA6; Sun, 20 May 2018 22:59:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D013375339; Sun, 20 May 2018 22:59:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id KXISfxt6UvB5RKXIUfmmxr; Sun, 20 May 2018 16:59:27 -0600 X-Authority-Analysis: v=2.3 cv=PvS9kTE3 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=VUJBJC2UJ8kA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=w5ljuGIJZkUhbDPW5_8A:9 a=G2e4lgATrv1RmVsS:21 a=v9d0ehaTvkis5ogF:21 a=QEXdDO2ut3YA:10 a=B8167zOiiqfXwnzhc9UA:9 a=5ein6TGKt0wUSL1l:21 a=lKuqe9ei35Qf-Ro2:21 a=XVa0MgSaP10LGFhI:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from [192.168.1.70] (d23-16-123-169.bchsia.telus.net [23.16.123.169]) by spqr.komquats.com (Postfix) with ESMTPSA id 7E7D314E8; Sun, 20 May 2018 15:59:24 -0700 (PDT) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r333944 - head/contrib/file/magic/Magdir Date: Sun, 20 May 2018 15:59:25 -0700 To: Antoine Brodin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20180520225924.7E7D314E8@spqr.komquats.com> X-CMAE-Envelope: MS4wfJJLRo7PhDjyg+phfz9G9OgJ/YuwVK8mZuiGdo0kWVYt97BJigBjHAn5DJV9hrcQ0WZangSLHZ7UBQtpha2mILOY805Zjf23k+xvYMj82XLR0tkhx4/s IO5uGN2DXF8uFrg4yW5qHVCTdqCZGBL8aYKVxfyMuYOKzJRVWOe5MaB1n1dgN9ZssQOPoia+MPjzcD4RUeIupDjmtLYUD8e9v7iCGnhpyOxeWFExsQwSspxT M/GIzC2HDGwzW4AitEZv3motSqF10REZDy7nebqmWYxET1OrGJBHRYwgCoOBFZFK Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 22:59:29 -0000 Thank you! --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Antoine Brodin Sent: 20/05/2018 15:07 To: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: svn commit: r333944 - head/contrib/file/magic/Magdir Author: antoine Date: Sun May 20 22:07:44 2018 New Revision: 333944 URL: https://svnweb.freebsd.org/changeset/base/333944 Log: Revert last change to file/magic/Magdir/elf, it misidentifies most shared libraries installed from ports as pie executables instead of shared libra= ries, and consequently breaks ports. Modified: head/contrib/file/magic/Magdir/elf Modified: head/contrib/file/magic/Magdir/elf =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/contrib/file/magic/Magdir/elf Sun May 20 21:56:08 2018 (r333943) +++ head/contrib/file/magic/Magdir/elf Sun May 20 22:07:44 2018 (r333944) @@ -48,9 +48,8 @@ !:mime application/x-object >16 leshort 2 executable, !:mime application/x-executable ->16 leshort 3 ${x?pie executable:shared object} - -!:mime application/x-${x?pie-executable:sharedlib} +>16 leshort 3 shared object, +!:mime application/x-sharedlib >16 leshort 4 core file !:mime application/x-coredump # Core file detection is not reliable. From owner-svn-src-head@freebsd.org Sun May 20 23:10:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C300EF33B4; Sun, 20 May 2018 23:10:07 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BB547589F; Sun, 20 May 2018 23:10:07 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id CF13A109C0; Sun, 20 May 2018 23:10:06 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f172.google.com with SMTP id e12-v6so12289739iob.8; Sun, 20 May 2018 16:10:06 -0700 (PDT) X-Gm-Message-State: ALKqPwdp9KSgkLP19sSTW9nc955IsykEmA8duGeVi99sDboUudiiEmeF +6KVZ+Jr0gUMrWWsw9Xn7BAu6zAV/oqRGhMHpbQ= X-Google-Smtp-Source: AB8JxZqmj18KyBAwDKjs7eRaDGeoN/jL1ARiZ09PRSRon2TxlDfdrIOkWB9gw3yYDQUDIvHD5CsppitbfzvEk9tN6wo= X-Received: by 2002:a6b:a712:: with SMTP id q18-v6mr18911482ioe.237.1526857806247; Sun, 20 May 2018 16:10:06 -0700 (PDT) MIME-Version: 1.0 References: <201805200614.w4K6EC0L023252@repo.freebsd.org> In-Reply-To: From: Matthew Macy Date: Sun, 20 May 2018 16:09:55 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient To: Rick Macklem Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 23:10:07 -0000 gcc8 On Sun, May 20, 2018 at 15:14 Rick Macklem wrote: > Matt Macy wrote: > >Author: mmacy > >Date: Sun May 20 06:14:12 2018 > >New Revision: 333924 > >URL: https://svnweb.freebsd.org/changeset/base/333924 > > > >Log: > > nfsclient: warnings cleanups > Just wondering what compiler you are using. I haven't seen warnings for > these? > FYI, for the first two cases, ncookie is always set before it is used. > For the third, "rflags" is set but not used. I sometimes leave code like > this in > the tree since I might need those argument flags later and might not > remember > how to get them. In this case, similar code in other functions set > "rflags" in the > same way, so it shouldn't be hard to crib the assignment from there. > As such, I don't have a problem with deleting the code. > > rick > ... the commit patch ... > Modified: > head/sys/fs/nfsclient/nfs_clcomsubs.c > head/sys/fs/nfsclient/nfs_clrpcops.c > > Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c > > ============================================================================== > --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 > (r333923) > +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 > (r333924) > @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu > char *uiocp; > struct mbuf *mp, *mp2, *firstmp; > int xfer, left, mlen; > - int uiosiz, clflg, rem; > + int uiosiz, clflg; > char *tcp; > > KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); > @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu > clflg = 1; > else > clflg = 0; > - rem = NFSM_RNDUP(siz) - siz; > if (clflg != 0) > NFSMCLGET(mp, M_WAITOK); > else > > Modified: head/sys/fs/nfsclient/nfs_clrpcops.c > > ============================================================================== > --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 05:59:42 2018 > (r333923) > +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 06:14:12 2018 > (r333924) > @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, > nfsuint64 > KASSERT(uiop->uio_iovcnt == 1 && > (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, > ("nfs readdirrpc bad uio")); > - > + ncookie.lval[0] = ncookie.lval[1] = 0; > /* > * There is no point in reading a lot more than uio_resid, however > * adding one additional DIRBLKSIZ makes sense. Since uio_resid > @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, > nfsui > KASSERT(uiop->uio_iovcnt == 1 && > (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, > ("nfs readdirplusrpc bad uio")); > + ncookie.lval[0] = ncookie.lval[1] = 0; > timespecclear(&dctime); > *attrflagp = 0; > if (eofp != NULL) > @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, > ui > > NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); > len = fxdr_unsigned(uint32_t, *tl); > + str = NULL; > if (len > NFSV4_OPAQUELIMIT) { > error = NFSERR_BADXDR; > goto nfsmout; > @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int > namel > struct nfsclsession *tsep; > nfsattrbit_t attrbits; > nfsv4stateid_t stateid; > - uint32_t rflags; > struct nfsmount *nmp; > > nmp = VFSTONFS(dvp->v_mount); > @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int > namel > stateid.other[0] = *tl++; > stateid.other[1] = *tl++; > stateid.other[2] = *tl; > - rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); > nfsrv_getattrbits(nd, &attrbits, NULL, NULL); > NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); > deleg = fxdr_unsigned(int, *tl); > > From owner-svn-src-head@freebsd.org Sun May 20 23:16:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B73E1EF367D; Sun, 20 May 2018 23:16:32 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5ECBF75E09; Sun, 20 May 2018 23:16:32 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 257C810ABB; Sun, 20 May 2018 23:16:32 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f41.google.com with SMTP id j186-v6so19141826ita.5; Sun, 20 May 2018 16:16:32 -0700 (PDT) X-Gm-Message-State: ALKqPwcIHMGvMGBkZqAPpxOCm8jv49HsZdr0U+goB1Md9rf4uc+/KJCz 1wa+zsNylmZdYWMJ0/mkOZW5MceYnMFibR6LVog= X-Google-Smtp-Source: AB8JxZrw5kgRkFRS5dlwn2rTTHB4GobOdTy0BnlBfuxmRSnCRrsHJjC+B/XO8sJms+cvDEjOd7DAdA9QWQldUC6V+7g= X-Received: by 2002:a24:ddcc:: with SMTP id t195-v6mr15445931itf.77.1526858191470; Sun, 20 May 2018 16:16:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ae:0:0:0:0:0 with HTTP; Sun, 20 May 2018 16:16:31 -0700 (PDT) In-Reply-To: References: <201805200614.w4K6EC0L023252@repo.freebsd.org> From: Matthew Macy Date: Sun, 20 May 2018 16:16:31 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient To: Rick Macklem Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 23:16:33 -0000 Actually if you could clean up the NFS code that would be great. It's _full_ of set but not used warnings. And anyone else reading this if you could clean up other areas. I've mostly cleaned up kern / net / netinet / iflib drivers. both WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j buildkernel and WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j buildkernel KERNCONF=GENERIC-NODEBUG Thanks. On Sun, May 20, 2018 at 4:09 PM, Matthew Macy wrote: > gcc8 > > On Sun, May 20, 2018 at 15:14 Rick Macklem wrote: >> >> Matt Macy wrote: >> >Author: mmacy >> >Date: Sun May 20 06:14:12 2018 >> >New Revision: 333924 >> >URL: https://svnweb.freebsd.org/changeset/base/333924 >> > >> >Log: >> > nfsclient: warnings cleanups >> Just wondering what compiler you are using. I haven't seen warnings for >> these? >> FYI, for the first two cases, ncookie is always set before it is used. >> For the third, "rflags" is set but not used. I sometimes leave code like >> this in >> the tree since I might need those argument flags later and might not >> remember >> how to get them. In this case, similar code in other functions set >> "rflags" in the >> same way, so it shouldn't be hard to crib the assignment from there. >> As such, I don't have a problem with deleting the code. >> >> rick >> ... the commit patch ... >> Modified: >> head/sys/fs/nfsclient/nfs_clcomsubs.c >> head/sys/fs/nfsclient/nfs_clrpcops.c >> >> Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c >> >> ============================================================================== >> --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 >> (r333924) >> @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >> char *uiocp; >> struct mbuf *mp, *mp2, *firstmp; >> int xfer, left, mlen; >> - int uiosiz, clflg, rem; >> + int uiosiz, clflg; >> char *tcp; >> >> KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); >> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >> clflg = 1; >> else >> clflg = 0; >> - rem = NFSM_RNDUP(siz) - siz; >> if (clflg != 0) >> NFSMCLGET(mp, M_WAITOK); >> else >> >> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c >> >> ============================================================================== >> --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 06:14:12 2018 >> (r333924) >> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, >> nfsuint64 >> KASSERT(uiop->uio_iovcnt == 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >> ("nfs readdirrpc bad uio")); >> - >> + ncookie.lval[0] = ncookie.lval[1] = 0; >> /* >> * There is no point in reading a lot more than uio_resid, however >> * adding one additional DIRBLKSIZ makes sense. Since uio_resid >> @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, >> nfsui >> KASSERT(uiop->uio_iovcnt == 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >> ("nfs readdirplusrpc bad uio")); >> + ncookie.lval[0] = ncookie.lval[1] = 0; >> timespecclear(&dctime); >> *attrflagp = 0; >> if (eofp != NULL) >> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, >> ui >> >> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); >> len = fxdr_unsigned(uint32_t, *tl); >> + str = NULL; >> if (len > NFSV4_OPAQUELIMIT) { >> error = NFSERR_BADXDR; >> goto nfsmout; >> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> struct nfsclsession *tsep; >> nfsattrbit_t attrbits; >> nfsv4stateid_t stateid; >> - uint32_t rflags; >> struct nfsmount *nmp; >> >> nmp = VFSTONFS(dvp->v_mount); >> @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> stateid.other[0] = *tl++; >> stateid.other[1] = *tl++; >> stateid.other[2] = *tl; >> - rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); >> nfsrv_getattrbits(nd, &attrbits, NULL, NULL); >> NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); >> deleg = fxdr_unsigned(int, *tl); >> > From owner-svn-src-head@freebsd.org Sun May 20 23:19:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FAFEEF376B; Sun, 20 May 2018 23:19:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ECDA75F96; Sun, 20 May 2018 23:19:10 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B6F51CE4B; Sun, 20 May 2018 23:19:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KNJAeI038456; Sun, 20 May 2018 23:19:10 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KNJ9hj038452; Sun, 20 May 2018 23:19:09 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805202319.w4KNJ9hj038452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 23:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333945 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 23:19:10 -0000 Author: eadler Date: Sun May 20 23:19:09 2018 New Revision: 333945 URL: https://svnweb.freebsd.org/changeset/base/333945 Log: top(1): set max username length based on system constant This changes previous behavior of calculating it at startup based on the current max username length. This is done because: - it is in theory possible for the max length to change at run-time (e.g., a new user is added after top starts running) - on machines with many users this delays startup significantly PR: 20799 PR: 89762 Reported by: ob@e-Gitt.NET Reported by: wkwu@Kavalan.csie.NCTU.edu.tw Reported on: 2000-08-23 and 2005-11-30 Modified: head/usr.bin/top/machine.c head/usr.bin/top/machine.h head/usr.bin/top/top.c head/usr.bin/top/username.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Sun May 20 22:07:44 2018 (r333944) +++ head/usr.bin/top/machine.c Sun May 20 23:19:09 2018 (r333945) @@ -314,7 +314,7 @@ update_layout(void) } int -machine_init(struct statics *statics, char do_unames) +machine_init(struct statics *statics) { int i, j, empty, pagesize; uint64_t arc_size; @@ -340,12 +340,7 @@ machine_init(struct statics *statics, char do_unames) NULL, 0) == 0 && carc_en == 1) carc_enabled = 1; - if (do_unames) { - while ((pw = getpwent()) != NULL) { - if (strlen(pw->pw_name) > namelength) - namelength = strlen(pw->pw_name); - } - } + namelength = MAXLOGNAME; if (smpmode && namelength > SMPUNAMELEN) namelength = SMPUNAMELEN; else if (namelength > UPUNAMELEN) Modified: head/usr.bin/top/machine.h ============================================================================== --- head/usr.bin/top/machine.h Sun May 20 22:07:44 2018 (r333944) +++ head/usr.bin/top/machine.h Sun May 20 23:19:09 2018 (r333945) @@ -85,7 +85,7 @@ char *format_next_process(caddr_t handle, char *(*get_ int flags); void toggle_pcpustats(void); void get_system_info(struct system_info *si); -int machine_init(struct statics *statics, char do_unames); +int machine_init(struct statics *statics); int proc_owner(int pid); /* non-int routines typically used by the machine dependent module */ Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Sun May 20 22:07:44 2018 (r333944) +++ head/usr.bin/top/top.c Sun May 20 23:19:09 2018 (r333945) @@ -548,7 +548,7 @@ char *argv[]; } /* initialize the kernel memory interface */ - if (machine_init(&statics, do_unames) == -1) + if (machine_init(&statics) == -1) { exit(1); } @@ -572,14 +572,6 @@ char *argv[]; exit(1); } } - -#ifdef no_initialization_needed - /* initialize the hashing stuff */ - if (do_unames) - { - init_hash(); - } -#endif /* initialize termcap */ init_termcap(interactive); Modified: head/usr.bin/top/username.c ============================================================================== --- head/usr.bin/top/username.c Sun May 20 22:07:44 2018 (r333944) +++ head/usr.bin/top/username.c Sun May 20 23:19:09 2018 (r333945) @@ -60,17 +60,6 @@ struct hash_el { struct hash_el hash_table[Table_size]; -void -init_hash() - -{ - /* - * There used to be some steps we had to take to initialize things. - * We don't need to do that anymore, but we will leave this stub in - * just in case future changes require initialization steps. - */ -} - char *username(uid) int uid; From owner-svn-src-head@freebsd.org Sun May 20 23:37:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC803EF3DEB; Sun, 20 May 2018 23:37:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 563997690B; Sun, 20 May 2018 23:37:32 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33BEC1D16D; Sun, 20 May 2018 23:37:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KNbVXU048143; Sun, 20 May 2018 23:37:31 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KNbVCb048138; Sun, 20 May 2018 23:37:31 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805202337.w4KNbVCb048138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 23:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333946 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 23:37:32 -0000 Author: eadler Date: Sun May 20 23:37:30 2018 New Revision: 333946 URL: https://svnweb.freebsd.org/changeset/base/333946 Log: top(1): pull configuration directly into header files This sets configuration variables directly in the various header files, avoiding the need to have special logic in our Makefile to build the header. Deleted: head/usr.bin/top/top.local.hs head/usr.bin/top/top.xs Modified: head/usr.bin/top/Makefile head/usr.bin/top/top.c head/usr.bin/top/top.h head/usr.bin/top/username.c head/usr.bin/top/username.h Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Sun May 20 23:19:09 2018 (r333945) +++ head/usr.bin/top/Makefile Sun May 20 23:37:30 2018 (r333946) @@ -16,15 +16,4 @@ SIGNAL_H= ${SRCTOP}/sys/sys/signal.h sigdesc.h: sigconv.awk ${SIGNAL_H} awk -f ${SRCTOP}/usr.bin/top/sigconv.awk < ${SIGNAL_H} > ${.TARGET} -.SUFFIXES: .xs .x .hs .h -.xs.x .hs.h: - @${ECHO} Making ${.TARGET} from ${.IMPSRC} - @sed -e's,%LoadMax%,5.0,g' \ - -e's,%TableSize%,20011,g' \ - -e's,%NominalTopn%,18,g' \ - -e's,%topn%,-1,g' \ - -e's,%delay%,2,g' \ - -e's,%random%,1,g' \ - ${.IMPSRC} > ${.TARGET} - .include Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Sun May 20 23:19:09 2018 (r333945) +++ head/usr.bin/top/top.c Sun May 20 23:37:30 2018 (r333946) @@ -251,7 +251,7 @@ char *argv[]; static char tempbuf1[50]; static char tempbuf2[50]; int old_sigmask; /* only used for BSD-style signals */ - int topn = Default_TOPN; + int topn = Infinity; int delay = Default_DELAY; int displays = 0; /* indicates unspecified */ int sel_ret = 0; @@ -268,9 +268,7 @@ char *argv[]; char do_unames = Yes; char interactive = Maybe; char warnings = 0; -#if Default_TOPN == Infinity char topn_specified = No; -#endif char ch; char *iptr; char no_command = 1; @@ -525,12 +523,10 @@ char *argv[]; myname); warnings++; } -#if Default_TOPN == Infinity else { topn_specified = Yes; } -#endif } /* tricky: remember old value of preset_argc & set preset_argc = 0 */ @@ -608,12 +604,8 @@ char *argv[]; * and the default is Infinity, then (and only then) we use * "Nominal_TOPN" instead. */ -#if Default_TOPN == Infinity topn = smart_terminal ? Largest : (topn_specified ? Largest : Nominal_TOPN); -#else - topn = Largest; -#endif } /* set header display accordingly */ Modified: head/usr.bin/top/top.h ============================================================================== --- head/usr.bin/top/top.h Sun May 20 23:19:09 2018 (r333945) +++ head/usr.bin/top/top.h Sun May 20 23:37:30 2018 (r333946) @@ -10,8 +10,7 @@ #ifndef TOP_H #define TOP_H -/* Current major version number */ -#define VERSION 3 +#define Default_DELAY 2 /* Number of lines of header information on the standard screen */ extern int Header_lines; /* 7 */ @@ -48,5 +47,33 @@ extern int pcpu_stats; char* kill_procs(char *); char* renice_procs(char *); + +/* + * The space command forces an immediate update. Sometimes, on loaded + * systems, this update will take a significant period of time (because all + * the output is buffered). So, if the short-term load average is above + * "LoadMax", then top will put the cursor home immediately after the space + * is pressed before the next update is attempted. This serves as a visual + * acknowledgement of the command. + */ +#define LoadMax 5.0 + +/* + * "Nominal_TOPN" is used as the default TOPN when + * the output is a dumb terminal. If we didn't do this, then + * we will get every + * process in the system when running top on a dumb terminal (or redirected + * to a file). Note that Nominal_TOPN is a default: it can still be + * overridden on the command line, even with the value "infinity". + */ +#define Nominal_TOPN 18 + +/* + * If the local system's getpwnam interface uses random access to retrieve + * a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining + * RANDOM_PW will take advantage of that fact. + */ + +#define RANDOM_PW 1 #endif /* TOP_H */ Modified: head/usr.bin/top/username.c ============================================================================== --- head/usr.bin/top/username.c Sun May 20 23:19:09 2018 (r333945) +++ head/usr.bin/top/username.c Sun May 20 23:37:30 2018 (r333946) @@ -1,6 +1,5 @@ /* * Top users/processes display for Unix - * Version 3 * * This program may be freely redistributed, * but this entire comment MUST remain intact. @@ -131,54 +130,20 @@ int wecare; /* 1 = enter it always, 0 = nice to have /* * Get a userid->name mapping from the system. * If the passwd database is hashed (#define RANDOM_PW), we - * just handle this uid. Otherwise we scan the passwd file - * and cache any entries we pass over while looking. + * just handle this uid. */ -int get_user(uid) - -int uid; - +int +get_user(int uid) { struct passwd *pwd; -#ifdef RANDOM_PW /* no performance penalty for using getpwuid makes it easy */ if ((pwd = getpwuid(uid)) != NULL) { return(enter_user(pwd->pw_uid, pwd->pw_name, 1)); } -#else - int from_start = 0; - - /* - * If we just called getpwuid each time, things would be very slow - * since that just iterates through the passwd file each time. So, - * we walk through the file instead (using getpwent) and cache each - * entry as we go. Once the right record is found, we cache it and - * return immediately. The next time we come in, getpwent will get - * the next record. In theory, we never have to read the passwd file - * a second time (because we cache everything we read). But in - * practice, the cache may not be large enough, so if we don't find - * it the first time we have to scan the file a second time. This - * is not very efficient, but it will do for now. - */ - - while (from_start++ < 2) - { - while ((pwd = getpwent()) != NULL) - { - if (pwd->pw_uid == uid) - { - return(enter_user(pwd->pw_uid, pwd->pw_name, 1)); - } - (void) enter_user(pwd->pw_uid, pwd->pw_name, 0); - } - /* try again */ - setpwent(); - } -#endif /* if we can't find the name at all, then use the uid as the name */ return(enter_user(uid, itoa7(uid), 1)); } Modified: head/usr.bin/top/username.h ============================================================================== --- head/usr.bin/top/username.h Sun May 20 23:19:09 2018 (r333945) +++ head/usr.bin/top/username.h Sun May 20 23:37:30 2018 (r333946) @@ -20,4 +20,14 @@ void init_hash(void); char *username(int uid); int userid(char *username); +/* + * "Table_size" defines the size of the hash tables used to map uid to + * username. The number of users in /etc/passwd CANNOT be greater than + * this number. If the error message "table overflow: too many users" + * is printed by top, then "Table_size" needs to be increased. Things will + * work best if the number is a prime number that is about twice the number + * of lines in /etc/passwd. + */ +#define Table_size 20011 + #endif /* USERNAME_H */ From owner-svn-src-head@freebsd.org Sun May 20 23:39:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB530EF3EE8; Sun, 20 May 2018 23:39:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CEA776AC2; Sun, 20 May 2018 23:39:09 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E22C1D171; Sun, 20 May 2018 23:39:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KNd9dG048237; Sun, 20 May 2018 23:39:09 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4KNd9PT048236; Sun, 20 May 2018 23:39:09 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805202339.w4KNd9PT048236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 20 May 2018 23:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333947 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 23:39:10 -0000 Author: eadler Date: Sun May 20 23:39:08 2018 New Revision: 333947 URL: https://svnweb.freebsd.org/changeset/base/333947 Log: top(1): Remove now-unused variable Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Sun May 20 23:37:30 2018 (r333946) +++ head/usr.bin/top/machine.c Sun May 20 23:39:08 2018 (r333947) @@ -320,7 +320,6 @@ machine_init(struct statics *statics) uint64_t arc_size; boolean_t carc_en; size_t size; - struct passwd *pw; size = sizeof(smpmode); if ((sysctlbyname("machdep.smp_active", &smpmode, &size, From owner-svn-src-head@freebsd.org Mon May 21 00:17:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3F23EF8A66; Mon, 21 May 2018 00:17:43 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670085.outbound.protection.outlook.com [40.107.67.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A61F7AA3E; Mon, 21 May 2018 00:17:43 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM (52.132.44.24) by YTOPR0101MB2265.CANPRD01.PROD.OUTLOOK.COM (52.132.51.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Mon, 21 May 2018 00:17:41 +0000 Received: from YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM ([fe80::e15e:49f3:c225:a8de]) by YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM ([fe80::e15e:49f3:c225:a8de%13]) with mapi id 15.20.0776.015; Mon, 21 May 2018 00:17:41 +0000 From: Rick Macklem To: Matthew Macy CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient Thread-Topic: svn commit: r333924 - head/sys/fs/nfsclient Thread-Index: AQHT8AHO3Ia6QcXkEUStxrPykfWmgqQ5LlDDgAARAICAAAHYgIAAEOpg Date: Mon, 21 May 2018 00:17:41 +0000 Message-ID: References: <201805200614.w4K6EC0L023252@repo.freebsd.org> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB2265; 7:XeqFwmRHfJwrxyo/vhZ4BUcjZNxZyFLIJY+Wv9PfS1/GEdn+qXqf6NJ8V1xMysFdx+ZRzIrhOR579iaOpnU8Jjzi375ox8+H7aOQFyCrlaNhoTSllk++spHWhYQv3Oam05zWOGsc7EeVEFt46Z80zMZpbvdjANoJARHrxhZDrgzYOHkAHp+v2jxafD3FNT+AzmXAxUDMgzenhOwACoE79OXB5swQ0+CLwU6dsP5eRMuvgxkrLOp6g76Xvr9xKYb7 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:(18154293887054); BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB2265; x-ms-traffictypediagnostic: YTOPR0101MB2265: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849)(18154293887054); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:YTOPR0101MB2265; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB2265; x-forefront-prvs: 06793E740F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39380400002)(396003)(39860400002)(69234005)(189003)(199004)(966005)(186003)(5250100002)(450100002)(6916009)(86362001)(6506007)(7696005)(3660700001)(6436002)(2900100001)(106356001)(105586002)(25786009)(74482002)(74316002)(99286004)(6246003)(476003)(53936002)(68736007)(53546011)(4326008)(305945005)(102836004)(316002)(229853002)(33656002)(55016002)(3280700002)(6306002)(478600001)(76176011)(9686003)(93886005)(26005)(786003)(81156014)(2906002)(486006)(8936002)(81166006)(11346002)(54906003)(14454004)(97736004)(446003)(8676002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB2265; H:YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: mIGL9M7/MYYkogrGId1JwKxk7DZtChsz4X2ZRL1nrXg9GdKX8QR1J2RDnFex+EgbUZpMZdpMGMUI3Tl2Ah/wlX/DTfeDP9iL7uX/YRLJwj36v8NP94IZ0VWDZP1gKRTznMuHqnuvsUgLEa8FFI8Iezf0RLkZaCuyumOETwTCbrL3Y5hVbTLUld5Mn9HeaknP spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a66620c6-1770-4147-5939-08d5beb044a0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: a66620c6-1770-4147-5939-08d5beb044a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2018 00:17:41.6892 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB2265 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 00:17:44 -0000 I'm not in a situation where I can use gcc, but if you email me the list of warnings, I can look at them. rick ________________________________________ From: Matthew Macy Sent: Sunday, May 20, 2018 7:16:31 PM To: Rick Macklem Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient Actually if you could clean up the NFS code that would be great. It's _full_ of set but not used warnings. And anyone else reading this if you could clean up other areas. I've mostly cleaned up kern / net / netinet / iflib drivers. both WITHOUT_FORMAT_EXTENSIONS=3D XCC=3D/usr/local/bin/gcc8 make -j build= kernel and WITHOUT_FORMAT_EXTENSIONS=3D XCC=3D/usr/local/bin/gcc8 make -j buildkernel KERNCONF=3DGENERIC-NODEBUG Thanks. On Sun, May 20, 2018 at 4:09 PM, Matthew Macy wrote: > gcc8 > > On Sun, May 20, 2018 at 15:14 Rick Macklem wrote: >> >> Matt Macy wrote: >> >Author: mmacy >> >Date: Sun May 20 06:14:12 2018 >> >New Revision: 333924 >> >URL: https://svnweb.freebsd.org/changeset/base/333924 >> > >> >Log: >> > nfsclient: warnings cleanups >> Just wondering what compiler you are using. I haven't seen warnings for >> these? >> FYI, for the first two cases, ncookie is always set before it is used. >> For the third, "rflags" is set but not used. I sometimes leave code like >> this in >> the tree since I might need those argument flags later and might not >> remember >> how to get them. In this case, similar code in other functions set >> "rflags" in the >> same way, so it shouldn't be hard to crib the assignment from there. >> As such, I don't have a problem with deleting the code. >> >> rick >> ... the commit patch ... >> Modified: >> head/sys/fs/nfsclient/nfs_clcomsubs.c >> head/sys/fs/nfsclient/nfs_clrpcops.c >> >> Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 >> (r333924) >> @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct m= bu >> char *uiocp; >> struct mbuf *mp, *mp2, *firstmp; >> int xfer, left, mlen; >> - int uiosiz, clflg, rem; >> + int uiosiz, clflg; >> char *tcp; >> >> KASSERT(uiop->uio_iovcnt =3D=3D 1, ("nfsm_uiotombuf: iovcnt !=3D= 1")); >> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct m= bu >> clflg =3D 1; >> else >> clflg =3D 0; >> - rem =3D NFSM_RNDUP(siz) - siz; >> if (clflg !=3D 0) >> NFSMCLGET(mp, M_WAITOK); >> else >> >> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 06:14:12 2018 >> (r333924) >> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, >> nfsuint64 >> KASSERT(uiop->uio_iovcnt =3D=3D 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) =3D=3D 0, >> ("nfs readdirrpc bad uio")); >> - >> + ncookie.lval[0] =3D ncookie.lval[1] =3D 0; >> /* >> * There is no point in reading a lot more than uio_resid, howev= er >> * adding one additional DIRBLKSIZ makes sense. Since uio_resid >> @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, >> nfsui >> KASSERT(uiop->uio_iovcnt =3D=3D 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) =3D=3D 0, >> ("nfs readdirplusrpc bad uio")); >> + ncookie.lval[0] =3D ncookie.lval[1] =3D 0; >> timespecclear(&dctime); >> *attrflagp =3D 0; >> if (eofp !=3D NULL) >> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp= , >> ui >> >> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); >> len =3D fxdr_unsigned(uint32_t, *tl); >> + str =3D NULL; >> if (len > NFSV4_OPAQUELIMIT) { >> error =3D NFSERR_BADXDR; >> goto nfsmout; >> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> struct nfsclsession *tsep; >> nfsattrbit_t attrbits; >> nfsv4stateid_t stateid; >> - uint32_t rflags; >> struct nfsmount *nmp; >> >> nmp =3D VFSTONFS(dvp->v_mount); >> @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> stateid.other[0] =3D *tl++; >> stateid.other[1] =3D *tl++; >> stateid.other[2] =3D *tl; >> - rflags =3D fxdr_unsigned(u_int32_t, *(tl + 6)); >> nfsrv_getattrbits(nd, &attrbits, NULL, NULL); >> NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); >> deleg =3D fxdr_unsigned(int, *tl); >> > From owner-svn-src-head@freebsd.org Mon May 21 00:20:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F098EF8DD6; Mon, 21 May 2018 00:20:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E13857AF14; Mon, 21 May 2018 00:20:32 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEBBF1D7E8; Mon, 21 May 2018 00:20:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L0KWip068220; Mon, 21 May 2018 00:20:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L0KWKx068219; Mon, 21 May 2018 00:20:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210020.w4L0KWKx068219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 00:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333948 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 00:20:33 -0000 Author: eadler Date: Mon May 21 00:20:32 2018 New Revision: 333948 URL: https://svnweb.freebsd.org/changeset/base/333948 Log: top(1): add getrusage to SEE also This documents the various columns that top might support. PR: 199637 Submitted by: vermaden@interia.pl Modified: head/usr.bin/top/top.1 Modified: head/usr.bin/top/top.1 ============================================================================== --- head/usr.bin/top/top.1 Sun May 20 23:39:08 2018 (r333947) +++ head/usr.bin/top/top.1 Mon May 21 00:20:32 2018 (r333948) @@ -454,13 +454,13 @@ things can change while .I top is collecting information for an update. The picture it gives is only a close approximation to reality. -.SH "SEE ALSO" +.SH SEE ALSO kill(1), ps(1), stty(1), mem(4), +getrusage(2), renice(8) -.\" $FreeBSD$ .SH "FreeBSD NOTES" .SH DESCRIPTION OF MEMORY From owner-svn-src-head@freebsd.org Mon May 21 00:32:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06CD9EF9D2C; Mon, 21 May 2018 00:32:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 700CC7C5F0; Mon, 21 May 2018 00:32:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 12CAA429BFF; Mon, 21 May 2018 10:32:31 +1000 (AEST) Date: Mon, 21 May 2018 10:32:30 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333945 - head/usr.bin/top In-Reply-To: <201805202319.w4KNJ9hj038452@repo.freebsd.org> Message-ID: <20180521094344.Q1053@besplex.bde.org> References: <201805202319.w4KNJ9hj038452@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=rk5NMaI1AAAA:8 a=dYzdpWnkpNr2m-ZP4Y0A:9 a=hcruLiCCMtTOPr4T:21 a=K1KVkOobxMxi5ht9:21 a=CjuIK1q_8ugA:10 a=sIxPTbSaAgciHCfj06py:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 00:32:49 -0000 On Sun, 20 May 2018, Eitan Adler wrote: > Log: > top(1): set max username length based on system constant > > This changes previous behavior of calculating it at startup based on > the current max username length. > > This is done because: > - it is in theory possible for the max length to change at run-time > (e.g., a new user is added after top starts running) > - on machines with many users this delays startup significantly This is sort of backwards. MAXLOGNAME would be harmful if it were actually used for the limit here, but it has never been used for the limit here. First, MAXLOGNAME should never be used. It is an old BSD name for the POSIX limit {LOGIN_NAME_MAX}. LOGIN_NAME_MAX should never be used either. It might be undefined, or possibily -1, to indicate that it can vary. sysconf() should be used to determine {LOGIN_NAME_MAX}. After determining the correct value, you will find that it is always unusable here because it is too large. It might be LONG_MAX to indicate no limit, or it might be 255 which is merely 3 times the terminal width. It used to be 17 in FreeBSD, and is now 33. 17 is about 1/5 of the terminal width, but that is too wide. 33 is grossly too wide. 17 was used for a while, but this was mostly fixed in r146291 in 2005. The log message for r146291 claims to limit the length to 8, but the code is slightly better, but obfuscated. The lower limit is never 8, but is 13 for SMP and 15 for UP. 8 is only the lower limit and is only imposed so that the format doesn't change too often if all user names are short. > PR: 20799 > PR: 89762 > Reported by: ob@e-Gitt.NET > Reported by: wkwu@Kavalan.csie.NCTU.edu.tw > Reported on: 2000-08-23 and 2005-11-30 The first one of these is much older than the fix in r146291. > Modified: head/usr.bin/top/machine.c > ============================================================================== > --- head/usr.bin/top/machine.c Sun May 20 22:07:44 2018 (r333944) > +++ head/usr.bin/top/machine.c Sun May 20 23:19:09 2018 (r333945) > @@ -340,12 +340,7 @@ machine_init(struct statics *statics, char do_unames) > NULL, 0) == 0 && carc_en == 1) > carc_enabled = 1; > > - if (do_unames) { > - while ((pw = getpwent()) != NULL) { > - if (strlen(pw->pw_name) > namelength) > - namelength = strlen(pw->pw_name); > - } > - } namelength is now initially TOP_USERNAME_LEN if that is defined, else 8. TOP_USERNAME_LEN is now never used as well as rarely configured. The hard-coded 8 is now never used instead of rarely used. The above loop took the maximum of {(initial TOP_USERNAME_LEN or 8), all names in system}. On large systems there is usually at least one use with a verbose name. This makes any reasonably small initial limits have no effect (since they minimums, not maximumns). A minimum limit is also needed for space for "USERNAME" in the header. > + namelength = MAXLOGNAME; This is now always 33 in FreeBSD. > if (smpmode && namelength > SMPUNAMELEN) > namelength = SMPUNAMELEN; > else if (namelength > UPUNAMELEN) But 33 is too large. It is much larger than the hard-coded maximum limits, so it is never used, but is reduced to SMPNAMELEN = 13 or UPUNAMELEN = 15. So getting the correct value of about 8 is even harder than before, but changing SMPNAMELEN to 4 works quite well -- "USERNAME" in the header is then reduced to "USER" and space is made available for something useful like the command name. The old code did work for forcing a minimum user name length of (TOP_USERNAME_LEN or 8) and a maximum user name length of (SMPUNAMELEN or UPUNAMELEN). The breakage in this commit is only seen on systems without verbose names, e.g., mine, where the longest name is "operator" (length 8). Then the dynamic maximum is the same as the static maximum (8), so the final length is 8. Now the minimum and maxium are hard-coded (modulo MAXLOGNAME being unusuably large) as 15 or 13, so all systems now waste space like only large systems used to do. The correct method is something like defaulting to 8 but allow overriding this using an environment variable or option. Bruce From owner-svn-src-head@freebsd.org Mon May 21 00:32:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C9F0EF9D32; Mon, 21 May 2018 00:32:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 069657C600; Mon, 21 May 2018 00:32:50 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C44AB1DB05; Mon, 21 May 2018 00:32:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L0WnYZ077999; Mon, 21 May 2018 00:32:49 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L0Wnbe077995; Mon, 21 May 2018 00:32:49 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210032.w4L0Wnbe077995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 00:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333949 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 00:32:50 -0000 Author: eadler Date: Mon May 21 00:32:48 2018 New Revision: 333949 URL: https://svnweb.freebsd.org/changeset/base/333949 Log: top(1): build with WARN=2 Modified: head/usr.bin/top/Makefile head/usr.bin/top/machine.c head/usr.bin/top/screen.c Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Mon May 21 00:20:32 2018 (r333948) +++ head/usr.bin/top/Makefile Mon May 21 00:32:48 2018 (r333949) @@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h CFLAGS+= -I ${.OBJDIR} MAN= top.1 -WARNS?= 1 +WARNS?= 2 LIBADD= ncursesw m kvm jail Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 00:20:32 2018 (r333948) +++ head/usr.bin/top/machine.c Mon May 21 00:32:48 2018 (r333949) @@ -872,7 +872,7 @@ get_process_info(struct system_info *si, struct proces total_oublock += p_oublock; total_majflt += p_majflt; total_procs++; - process_states[pp->ki_stat]++; + process_states[(unsigned char)pp->ki_stat]++; if (pp->ki_stat == SZOMB) /* skip zombies */ @@ -1316,7 +1316,7 @@ static int sorted_state[] = { } while (0) #define ORDERKEY_STATE(a, b) do { \ - int diff = sorted_state[(b)->ki_stat] - sorted_state[(a)->ki_stat]; \ + int diff = sorted_state[(unsigned char)(b)->ki_stat] - sorted_state[(unsigned char)(a)->ki_stat]; \ if (diff != 0) \ return (diff > 0 ? 1 : -1); \ } while (0) Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Mon May 21 00:20:32 2018 (r333948) +++ head/usr.bin/top/screen.c Mon May 21 00:32:48 2018 (r333949) @@ -59,8 +59,6 @@ char *terminal_end; static struct termios old_settings; static struct termios new_settings; static char is_a_terminal = No; -static int old_lword; -static int new_lword; #define STDIN 0 #define STDOUT 1 From owner-svn-src-head@freebsd.org Mon May 21 00:53:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6741BEFB66B; Mon, 21 May 2018 00:53:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 187CD7EB99; Mon, 21 May 2018 00:53:44 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEA521DE8B; Mon, 21 May 2018 00:53:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L0rh9j087923; Mon, 21 May 2018 00:53:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L0rgMI087917; Mon, 21 May 2018 00:53:42 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210053.w4L0rgMI087917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 00:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333951 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 00:53:44 -0000 Author: eadler Date: Mon May 21 00:53:42 2018 New Revision: 333951 URL: https://svnweb.freebsd.org/changeset/base/333951 Log: top(1): clean much of WARNS=3 issues There is still one glaring issue: new_message is not a protoype, but can't be trivially converted since it uses K&R style var-args. Modified: head/usr.bin/top/display.c head/usr.bin/top/display.h head/usr.bin/top/machine.c head/usr.bin/top/screen.c head/usr.bin/top/screen.h head/usr.bin/top/top.c Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Mon May 21 00:51:30 2018 (r333950) +++ head/usr.bin/top/display.c Mon May 21 00:53:42 2018 (r333951) @@ -92,9 +92,9 @@ static int cpustates_column; static enum { OFF, ON, ERASE } header_status = ON; -static int string_count(); -static void summary_format(); -static void line_update(); +static int string_count(char **); +static void summary_format(char *, int *, char **); +static void line_update(char *, char *, int, int); int x_lastpid = 10; int y_lastpid = 0; @@ -1041,11 +1041,9 @@ int hi; } void -display_header(t) - -int t; - +display_header(int t) { + if (t) { header_status = ON; @@ -1058,17 +1056,12 @@ int t; /*VARARGS2*/ void -new_message(type, msgfmt, a1, a2, a3) - -int type; -char *msgfmt; -caddr_t a1, a2, a3; - +new_message(int type, char *msgfmt, caddr_t a1, caddr_t a2, caddr_t a3) { int i; /* first, format the message */ - (void) snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3); + snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3); if (msglen > 0) { @@ -1196,10 +1189,7 @@ int numeric; /* internal support routines */ -static int string_count(pp) - -char **pp; - +static int string_count(char **pp) { int cnt; @@ -1211,12 +1201,7 @@ char **pp; return(cnt); } -static void summary_format(str, numbers, names) - -char *str; -int *numbers; -char **names; - +static void summary_format(char *str, int *numbers, char **names) { char *p; int num; Modified: head/usr.bin/top/display.h ============================================================================== --- head/usr.bin/top/display.h Mon May 21 00:51:30 2018 (r333950) +++ head/usr.bin/top/display.h Mon May 21 00:53:42 2018 (r333951) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* constants needed for display.c */ /* "type" argument for new_message function */ @@ -27,7 +28,7 @@ void i_swap(int *stats); void i_timeofday(time_t *tod); void i_uptime(struct timeval *bt, time_t *tod); void new_message(); -int readline(char *buffer, int size, int numeric); +int readline(char *buffer, int size, int numeric); char *trim_header(char *text); void u_arc(int *stats); void u_carc(int *stats); Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 00:51:30 2018 (r333950) +++ head/usr.bin/top/machine.c Mon May 21 00:53:42 2018 (r333951) @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -460,6 +461,8 @@ format_header(char *uname_field) jidlength, ps.jail ? " JID" : "", namelength, namelength, uname_field); break; + case DISP_MAX: + assert("displaymode must not be set to DISP_MAX"); } cmdlengthdelta = strlen(Header) - 7; return (Header); @@ -624,7 +627,7 @@ get_system_info(struct system_info *si) * XXX: this could be done when the actual processes are fetched, we do * it here out of laziness. */ -const struct kinfo_proc * +static const struct kinfo_proc * get_old_proc(struct kinfo_proc *pp) { struct kinfo_proc **oldpp, *oldp; @@ -667,7 +670,7 @@ get_old_proc(struct kinfo_proc *pp) * Return the total amount of IO done in blocks in/out and faults. * store the values individually in the pointers passed in. */ -long +static long get_io_stats(struct kinfo_proc *pp, long *inp, long *oup, long *flp, long *vcsw, long *ivcsw) { @@ -741,7 +744,7 @@ proc_used_cpu(struct kinfo_proc *pp) /* * Return the total number of block in/out and faults by a process. */ -long +static long get_io_total(struct kinfo_proc *pp) { long dummy; @@ -932,7 +935,8 @@ format_next_process(caddr_t xhandle, char *(*get_useri double pct; struct handle *hp; char status[16]; - int cpu, state; + int cpu; + size_t state; struct rusage ru, *rup; long p_tot, s_tot; char *proc_fmt, thr_buf[6]; @@ -995,7 +999,7 @@ format_next_process(caddr_t xhandle, char *(*get_useri state < sizeof(state_abbrev) / sizeof(*state_abbrev)) sprintf(status, "%.6s", state_abbrev[state]); else - sprintf(status, "?%5d", state); + sprintf(status, "?%5lu", state); break; } @@ -1359,8 +1363,8 @@ static int sorted_state[] = { /* compare_cpu - the comparison function for sorting by cpu percentage */ -int -compare_cpu(void *arg1, void *arg2) +static int +compare_cpu(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1376,17 +1380,24 @@ compare_cpu(void *arg1, void *arg2) } /* "cpu" compare routines */ -int compare_size(), compare_res(), compare_time(), compare_prio(), - compare_threads(); +static int compare_size(const void *arg1, const void *arg2); +static int compare_res(const void *arg1, const void *arg2); +static int compare_time(const void *arg1, const void *arg2); +static int compare_prio(const void *arg1, const void *arg2); +static int compare_threads(const void *arg1, const void *arg2); /* * "io" compare routines. Context switches aren't i/o, but are displayed * on the "io" display. */ -int compare_iototal(), compare_ioread(), compare_iowrite(), compare_iofault(), - compare_vcsw(), compare_ivcsw(); +static int compare_iototal(const void *arg1, const void *arg2); +static int compare_ioread(const void *arg1, const void *arg2); +static int compare_iowrite(const void *arg1, const void *arg2); +static int compare_iofault(const void *arg1, const void *arg2); +static int compare_vcsw(const void *arg1, const void *arg2); +static int compare_ivcsw(const void *arg1, const void *arg2); -int (*compares[])() = { +int (*compares[])(const void *arg1, const void *arg2) = { compare_cpu, compare_size, compare_res, @@ -1407,7 +1418,7 @@ int (*compares[])() = { /* compare_size - the comparison function for sorting by total memory usage */ int -compare_size(void *arg1, void *arg2) +compare_size(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1425,7 +1436,7 @@ compare_size(void *arg1, void *arg2) /* compare_res - the comparison function for sorting by resident set size */ int -compare_res(void *arg1, void *arg2) +compare_res(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1443,7 +1454,7 @@ compare_res(void *arg1, void *arg2) /* compare_time - the comparison function for sorting by total cpu time */ int -compare_time(void *arg1, void *arg2) +compare_time(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1461,7 +1472,7 @@ compare_time(void *arg1, void *arg2) /* compare_prio - the comparison function for sorting by priority */ int -compare_prio(void *arg1, void *arg2) +compare_prio(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1477,8 +1488,8 @@ compare_prio(void *arg1, void *arg2) } /* compare_threads - the comparison function for sorting by threads */ -int -compare_threads(void *arg1, void *arg2) +static int +compare_threads(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1533,7 +1544,7 @@ compare_swap(const void *arg1, const void *arg2) /* assorted comparison functions for sorting by i/o */ int -compare_iototal(void *arg1, void *arg2) +compare_iototal(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1541,8 +1552,8 @@ compare_iototal(void *arg1, void *arg2) return (get_io_total(p2) - get_io_total(p1)); } -int -compare_ioread(void *arg1, void *arg2) +static int +compare_ioread(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1554,8 +1565,8 @@ compare_ioread(void *arg1, void *arg2) return (inp2 - inp1); } -int -compare_iowrite(void *arg1, void *arg2) +static int +compare_iowrite(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1567,8 +1578,8 @@ compare_iowrite(void *arg1, void *arg2) return (oup2 - oup1); } -int -compare_iofault(void *arg1, void *arg2) +static int +compare_iofault(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1580,8 +1591,8 @@ compare_iofault(void *arg1, void *arg2) return (flp2 - flp1); } -int -compare_vcsw(void *arg1, void *arg2) +static int +compare_vcsw(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; @@ -1594,7 +1605,7 @@ compare_vcsw(void *arg1, void *arg2) } int -compare_ivcsw(void *arg1, void *arg2) +compare_ivcsw(const void *arg1, const void *arg2) { struct kinfo_proc *p1 = *(struct kinfo_proc **)arg1; struct kinfo_proc *p2 = *(struct kinfo_proc **)arg2; Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Mon May 21 00:51:30 2018 (r333950) +++ head/usr.bin/top/screen.c Mon May 21 00:53:42 2018 (r333951) @@ -23,9 +23,10 @@ #include "top.h" #include +#include #include -# define TERMIOS -# include +#define TERMIOS +#include #include #include #include "screen.h" @@ -41,8 +42,6 @@ char ch_erase; char ch_kill; char smart_terminal; char PC; -char *tgetstr(); -char *tgoto(); char termcap_buf[1024]; char string_buffer[1024]; char home[15]; @@ -73,7 +72,6 @@ int interactive; char *bufptr; char *PCptr; char *term_name; - char *getenv(); int status; /* set defaults in case we aren't smart */ Modified: head/usr.bin/top/screen.h ============================================================================== --- head/usr.bin/top/screen.h Mon May 21 00:51:30 2018 (r333950) +++ head/usr.bin/top/screen.h Mon May 21 00:53:42 2018 (r333951) @@ -3,15 +3,13 @@ * * This file contains all the definitions necessary to use the hand-written * screen package in "screen.c" + * + * $FreeBSD$ */ #define TCputs(str) tputs(str, 1, putstdout) #define putcap(str) (void)((str) != NULL ? TCputs(str) : 0) #define Move_to(x, y) TCputs(tgoto(cursor_motion, x, y)) - -/* declare return values for termcap functions */ -char *tgetstr(); -char *tgoto(); extern char ch_erase; /* set to the user's erase character */ extern char ch_kill; /* set to the user's kill character */ Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Mon May 21 00:51:30 2018 (r333950) +++ head/usr.bin/top/top.c Mon May 21 00:53:42 2018 (r333951) @@ -81,16 +81,16 @@ static int fmt_flags = 0; int pcpu_stats = No; /* signal handling routines */ -sigret_t leave(); -sigret_t tstop(); -sigret_t top_winch(int); +static sigret_t leave(int); +static sigret_t tstop(int); +static sigret_t top_winch(int); volatile sig_atomic_t leaveflag; volatile sig_atomic_t tstopflag; volatile sig_atomic_t winchflag; /* internal routines */ -void quit(); +void quit(int); /* values which need to be accessed by signal handlers */ static int max_topn; /* maximum displayable processes */ @@ -100,20 +100,18 @@ struct process_select ps; char *myname = "top"; jmp_buf jmp_int; -/* routines that don't return int */ +char *username(int); -char *username(); +extern int (*compares[])(const void*, const void*); +time_t time(time_t *tloc); -extern int (*compares[])(); -time_t time(); - caddr_t get_process_info(struct system_info *si, struct process_select *sel, int (*compare)(const void *, const void *)); /* different routines for displaying the user's identification */ /* (values assigned to get_userid) */ -char *username(); -char *itoa7(); +char *username(int); +char *itoa7(int); /* pointers to display routines */ void (*d_loadave)(int mpid, double *avenrun) = i_loadave; @@ -632,10 +630,10 @@ char *argv[]; old_sigmask = sigblock(Smask(SIGINT) | Smask(SIGQUIT) | Smask(SIGTSTP)); #endif init_screen(); - (void) signal(SIGINT, leave); - (void) signal(SIGQUIT, leave); - (void) signal(SIGTSTP, tstop); - (void) signal(SIGWINCH, top_winch); + signal(SIGINT, leave); + signal(SIGQUIT, leave); + signal(SIGTSTP, tstop); + signal(SIGWINCH, top_winch); #ifdef SIGRELSE sigrelse(SIGINT); sigrelse(SIGQUIT); @@ -1228,30 +1226,30 @@ reset_display() * signal handlers */ -sigret_t leave() /* exit under normal conditions -- INT handler */ +static sigret_t +leave(int i __unused) /* exit under normal conditions -- INT handler */ { leaveflag = 1; } -sigret_t tstop(int i __unused) /* SIGTSTP handler */ +static sigret_t +tstop(int i __unused) /* SIGTSTP handler */ { tstopflag = 1; } -sigret_t top_winch(int i __unused) /* SIGWINCH handler */ +static sigret_t +top_winch(int i __unused) /* SIGWINCH handler */ { winchflag = 1; } -void quit(status) /* exit under duress */ - -int status; - +void +quit(int status) /* exit under duress */ { end_screen(); exit(status); - /*NOTREACHED*/ } From owner-svn-src-head@freebsd.org Mon May 21 01:05:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E751EA9587; Mon, 21 May 2018 01:05:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E290680069; Mon, 21 May 2018 01:05:32 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3A551E01B; Mon, 21 May 2018 01:05:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L15WXR093551; Mon, 21 May 2018 01:05:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L15WYB093550; Mon, 21 May 2018 01:05:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210105.w4L15WYB093550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 01:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333952 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 01:05:33 -0000 Author: eadler Date: Mon May 21 01:05:32 2018 New Revision: 333952 URL: https://svnweb.freebsd.org/changeset/base/333952 Log: top(1): fix "variable without declaration" warning This is only shown at WARNS=6, but since we don't yet build at WARNS=2 its hidden. Modified: head/usr.bin/top/sigconv.awk Modified: head/usr.bin/top/sigconv.awk ============================================================================== --- head/usr.bin/top/sigconv.awk Mon May 21 00:53:42 2018 (r333951) +++ head/usr.bin/top/sigconv.awk Mon May 21 01:05:32 2018 (r333952) @@ -9,7 +9,7 @@ BEGIN { print " const char * const name;" print " const int number;" print "};\n" - print "struct sigdesc sigdesc[] = {" + print "static struct sigdesc sigdesc[] = {" } /^#define[ \t][ \t]*SIG[A-Z]+[0-9]*[ \t]/ { From owner-svn-src-head@freebsd.org Mon May 21 01:11:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4527EAA02E; Mon, 21 May 2018 01:11:44 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C45D80BC8; Mon, 21 May 2018 01:11:44 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com [209.85.214.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 3804C116EB; Mon, 21 May 2018 01:11:44 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f47.google.com with SMTP id q4-v6so19350245ite.3; Sun, 20 May 2018 18:11:44 -0700 (PDT) X-Gm-Message-State: ALKqPwdEswbbf11MRqJImTXTgicnOAtQj/Fq25OvvuyZHXl/H2sgEwqN DwQAyDh4xJ6Gle0KX5eNQyfbbenP+6LQ6xOu/Ik= X-Google-Smtp-Source: AB8JxZolRdLUnztGY/0XL0vGZDT9Aw1XSqQPDZVo6FAiydXxV7h1UVWSKtb5ISIjOOn/lheaH2CJgteI1ITosQi0lhg= X-Received: by 2002:a24:5b54:: with SMTP id g81-v6mr15405653itb.7.1526865103714; Sun, 20 May 2018 18:11:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ae:0:0:0:0:0 with HTTP; Sun, 20 May 2018 18:11:43 -0700 (PDT) In-Reply-To: References: <201805200614.w4K6EC0L023252@repo.freebsd.org> From: Matthew Macy Date: Sun, 20 May 2018 18:11:43 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient To: Rick Macklem Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 01:11:44 -0000 I don't understand why you can't install the gcc8 package but here you go: https://people.freebsd.org/~mmacy/gcc8logs/nfs-GENERIC-NODEBUG.log https://people.freebsd.org/~mmacy/gcc8logs/nfs-GENERIC.log On Sun, May 20, 2018 at 5:17 PM, Rick Macklem wrote: > I'm not in a situation where I can use gcc, but if you email me the > list of warnings, I can look at them. > > rick > > ________________________________________ > From: Matthew Macy > Sent: Sunday, May 20, 2018 7:16:31 PM > To: Rick Macklem > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freebsd.org > Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient > > Actually if you could clean up the NFS code that would be great. It's > _full_ of set but not used warnings. And anyone else reading this if > you could clean up other areas. I've mostly cleaned up kern / net / > netinet / iflib drivers. > > > both > WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j buildkernel > > and > WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j > buildkernel KERNCONF=GENERIC-NODEBUG > > Thanks. > > On Sun, May 20, 2018 at 4:09 PM, Matthew Macy wrote: >> gcc8 >> >> On Sun, May 20, 2018 at 15:14 Rick Macklem wrote: >>> >>> Matt Macy wrote: >>> >Author: mmacy >>> >Date: Sun May 20 06:14:12 2018 >>> >New Revision: 333924 >>> >URL: https://svnweb.freebsd.org/changeset/base/333924 >>> > >>> >Log: >>> > nfsclient: warnings cleanups >>> Just wondering what compiler you are using. I haven't seen warnings for >>> these? >>> FYI, for the first two cases, ncookie is always set before it is used. >>> For the third, "rflags" is set but not used. I sometimes leave code like >>> this in >>> the tree since I might need those argument flags later and might not >>> remember >>> how to get them. In this case, similar code in other functions set >>> "rflags" in the >>> same way, so it shouldn't be hard to crib the assignment from there. >>> As such, I don't have a problem with deleting the code. >>> >>> rick >>> ... the commit patch ... >>> Modified: >>> head/sys/fs/nfsclient/nfs_clcomsubs.c >>> head/sys/fs/nfsclient/nfs_clrpcops.c >>> >>> Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c >>> >>> ============================================================================== >>> --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 >>> (r333923) >>> +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 >>> (r333924) >>> @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >>> char *uiocp; >>> struct mbuf *mp, *mp2, *firstmp; >>> int xfer, left, mlen; >>> - int uiosiz, clflg, rem; >>> + int uiosiz, clflg; >>> char *tcp; >>> >>> KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1")); >>> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu >>> clflg = 1; >>> else >>> clflg = 0; >>> - rem = NFSM_RNDUP(siz) - siz; >>> if (clflg != 0) >>> NFSMCLGET(mp, M_WAITOK); >>> else >>> >>> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c >>> >>> ============================================================================== >>> --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 05:59:42 2018 >>> (r333923) >>> +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 06:14:12 2018 >>> (r333924) >>> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, >>> nfsuint64 >>> KASSERT(uiop->uio_iovcnt == 1 && >>> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >>> ("nfs readdirrpc bad uio")); >>> - >>> + ncookie.lval[0] = ncookie.lval[1] = 0; >>> /* >>> * There is no point in reading a lot more than uio_resid, however >>> * adding one additional DIRBLKSIZ makes sense. Since uio_resid >>> @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, >>> nfsui >>> KASSERT(uiop->uio_iovcnt == 1 && >>> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0, >>> ("nfs readdirplusrpc bad uio")); >>> + ncookie.lval[0] = ncookie.lval[1] = 0; >>> timespecclear(&dctime); >>> *attrflagp = 0; >>> if (eofp != NULL) >>> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp, >>> ui >>> >>> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); >>> len = fxdr_unsigned(uint32_t, *tl); >>> + str = NULL; >>> if (len > NFSV4_OPAQUELIMIT) { >>> error = NFSERR_BADXDR; >>> goto nfsmout; >>> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >>> namel >>> struct nfsclsession *tsep; >>> nfsattrbit_t attrbits; >>> nfsv4stateid_t stateid; >>> - uint32_t rflags; >>> struct nfsmount *nmp; >>> >>> nmp = VFSTONFS(dvp->v_mount); >>> @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >>> namel >>> stateid.other[0] = *tl++; >>> stateid.other[1] = *tl++; >>> stateid.other[2] = *tl; >>> - rflags = fxdr_unsigned(u_int32_t, *(tl + 6)); >>> nfsrv_getattrbits(nd, &attrbits, NULL, NULL); >>> NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); >>> deleg = fxdr_unsigned(int, *tl); >>> >> From owner-svn-src-head@freebsd.org Mon May 21 01:16:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A7E7EAA670; Mon, 21 May 2018 01:16:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC80E815D2; Mon, 21 May 2018 01:16:27 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA1671E1C2; Mon, 21 May 2018 01:16:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L1GRAR098544; Mon, 21 May 2018 01:16:27 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L1GQ8q098540; Mon, 21 May 2018 01:16:26 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210116.w4L1GQ8q098540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 01:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333954 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 01:16:28 -0000 Author: eadler Date: Mon May 21 01:16:26 2018 New Revision: 333954 URL: https://svnweb.freebsd.org/changeset/base/333954 Log: top(1): pull function declarations and externs into headers Modified: head/usr.bin/top/commands.c head/usr.bin/top/machine.c head/usr.bin/top/top.c head/usr.bin/top/top.h Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Mon May 21 01:06:59 2018 (r333953) +++ head/usr.bin/top/commands.c Mon May 21 01:16:26 2018 (r333954) @@ -35,11 +35,6 @@ #include "utils.h" #include "machine.h" -extern char *copyright; - -/* imported from screen.c */ -extern int overstrike; - static int err_compar(const void *p1, const void *p2); struct errs /* structure for a system-call error */ Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 01:06:59 2018 (r333953) +++ head/usr.bin/top/machine.c Mon May 21 01:16:26 2018 (r333954) @@ -43,6 +43,7 @@ #include "top.h" #include "machine.h" +#include "display.h" #include "screen.h" #include "utils.h" #include "layout.h" @@ -52,7 +53,7 @@ #define UPUNAMELEN 15 extern struct process_select ps; -extern char* printable(char *); +extern struct timeval timeout; static int smpmode; enum displaymodes displaymode; #ifdef TOP_USERNAME_LEN @@ -67,9 +68,6 @@ static int jidlength; static int swaplength; static int cmdlengthdelta; -/* Prototypes for top internals */ -void quit(int); - /* get_process_info passes back a handle. This is what it looks like: */ struct handle { @@ -233,9 +231,6 @@ static int pageshift; /* log base 2 of the pagesize * #define ki_swap(kip) \ ((kip)->ki_swrss > (kip)->ki_rssize ? (kip)->ki_swrss - (kip)->ki_rssize : 0) -/* useful externals */ -long percentages(int cnt, int *out, long *new, long *old, long *diffs); - /* * Sorting orders. The first element is the default. */ @@ -470,7 +465,6 @@ format_header(char *uname_field) static int swappgsin = -1; static int swappgsout = -1; -extern struct timeval timeout; void Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Mon May 21 01:06:59 2018 (r333953) +++ head/usr.bin/top/top.c Mon May 21 01:16:26 2018 (r333954) @@ -3,7 +3,6 @@ char *copyright = /* * Top users/processes display for Unix - * Version 3 * * This program may be freely redistributed, * but this entire comment MUST remain intact. @@ -16,23 +15,6 @@ char *copyright = * $FreeBSD$ */ -/* - * See the file "Changes" for information on version-to-version changes. - */ - -/* - * This file contains "main" and other high-level routines. - */ - -/* - * The following preprocessor variables, when defined, are used to - * distinguish between different Unix implementations: - * - * SIGHOLD - use SVR4 sighold function when defined - * SIGRELSE - use SVR4 sigrelse function when defined - * FD_SET - macros FD_SET and FD_ZERO are used when defined - */ - #include #include #include @@ -48,7 +30,6 @@ char *copyright = #include #include -/* includes specific to top */ #include "commands.h" #include "display.h" /* interface to display package */ #include "screen.h" /* interface to screen package */ @@ -70,13 +51,7 @@ char stdoutbuf[Buffersize]; /* build Signal masks */ #define Smask(s) (1 << ((s) - 1)) -/* for getopt: */ -extern int optind; -extern char *optarg; -/* imported from screen.c */ -extern int overstrike; - static int fmt_flags = 0; int pcpu_stats = No; @@ -85,13 +60,10 @@ static sigret_t leave(int); static sigret_t tstop(int); static sigret_t top_winch(int); -volatile sig_atomic_t leaveflag; -volatile sig_atomic_t tstopflag; -volatile sig_atomic_t winchflag; +static volatile sig_atomic_t leaveflag; +static volatile sig_atomic_t tstopflag; +static volatile sig_atomic_t winchflag; -/* internal routines */ -void quit(int); - /* values which need to be accessed by signal handlers */ static int max_topn; /* maximum displayable processes */ @@ -102,7 +74,6 @@ jmp_buf jmp_int; char *username(int); -extern int (*compares[])(const void*, const void*); time_t time(time_t *tloc); caddr_t get_process_info(struct system_info *si, struct process_select *sel, Modified: head/usr.bin/top/top.h ============================================================================== --- head/usr.bin/top/top.h Mon May 21 01:06:59 2018 (r333953) +++ head/usr.bin/top/top.h Mon May 21 01:16:26 2018 (r333954) @@ -44,9 +44,17 @@ enum displaymodes { DISP_CPU = 0, DISP_IO, DISP_MAX }; extern enum displaymodes displaymode; extern int pcpu_stats; +extern int overstrike; +extern int (*compares[])(const void*, const void*); + char* kill_procs(char *); char* renice_procs(char *); + +extern char *copyright; +/* internal routines */ +void quit(int); + /* * The space command forces an immediate update. Sometimes, on loaded From owner-svn-src-head@freebsd.org Mon May 21 01:20:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92C6FEAABAE; Mon, 21 May 2018 01:20:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4429181C31; Mon, 21 May 2018 01:20:20 +0000 (UTC) (envelope-from marius@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 253AA1E1CB; Mon, 21 May 2018 01:20:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L1KK42098747; Mon, 21 May 2018 01:20:20 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L1KJge098745; Mon, 21 May 2018 01:20:19 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201805210120.w4L1KJge098745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 21 May 2018 01:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333955 - in head/stand: common ofw/libofw sparc64/loader X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: in head/stand: common ofw/libofw sparc64/loader X-SVN-Commit-Revision: 333955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 01:20:20 -0000 Author: marius Date: Mon May 21 01:20:19 2018 New Revision: 333955 URL: https://svnweb.freebsd.org/changeset/base/333955 Log: - Unbreak booting sparc64 kernels after the metadata unification in r329190; sparc64 kernels are always 64-bit but with that revision in place, the loader was treating them as 32-bit ones. - In order to reduce the likelihood of this kind of breakage in the future, #ifdef out md_load() on sparc64 and make md_load_dual() - which is currently local to metadata.c anyway - static. - Make md_getboothowto() - also local to metadata.c - static. - Get rid of the unused DTB pointer on sparc64. Modified: head/stand/common/metadata.c head/stand/ofw/libofw/libofw.h head/stand/sparc64/loader/main.c Modified: head/stand/common/metadata.c ============================================================================== --- head/stand/common/metadata.c Mon May 21 01:16:26 2018 (r333954) +++ head/stand/common/metadata.c Mon May 21 01:20:19 2018 (r333955) @@ -94,7 +94,7 @@ md_bootserial(void) } #endif -int +static int md_getboothowto(char *kargs) { char *cp; @@ -307,7 +307,7 @@ md_copymodules(vm_offset_t addr, int kern64) * - The kernel environment is copied into kernel space. * - Module metadata are formatted and placed in kernel space. */ -int +static int md_load_dual(char *args, vm_offset_t *modulep, vm_offset_t *dtb, int kern64) { struct preloaded_file *kfp; @@ -460,13 +460,15 @@ md_load_dual(char *args, vm_offset_t *modulep, vm_offs return(0); } +#if !defined(__sparc64__) int md_load(char *args, vm_offset_t *modulep, vm_offset_t *dtb) { return (md_load_dual(args, modulep, dtb, 0)); } +#endif -#if defined(__mips__) || defined(__powerpc__) +#if defined(__mips__) || defined(__powerpc__) || defined(__sparc64__) int md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb) { Modified: head/stand/ofw/libofw/libofw.h ============================================================================== --- head/stand/ofw/libofw/libofw.h Mon May 21 01:16:26 2018 (r333954) +++ head/stand/ofw/libofw/libofw.h Mon May 21 01:20:19 2018 (r333955) @@ -62,7 +62,9 @@ struct preloaded_file; struct file_format; /* MD code implementing MI interfaces */ +#if !defined(__sparc64__) vm_offset_t md_load(char *args, vm_offset_t *modulep, vm_offset_t *dtb); +#endif vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb); extern void reboot(void); Modified: head/stand/sparc64/loader/main.c ============================================================================== --- head/stand/sparc64/loader/main.c Mon May 21 01:16:26 2018 (r333954) +++ head/stand/sparc64/loader/main.c Mon May 21 01:20:19 2018 (r333955) @@ -339,7 +339,7 @@ static int __elfN(exec)(struct preloaded_file *fp) { struct file_metadata *fmp; - vm_offset_t mdp, dtbp; + vm_offset_t mdp; Elf_Addr entry; Elf_Ehdr *e; int error; @@ -348,7 +348,7 @@ __elfN(exec)(struct preloaded_file *fp) return (EFTYPE); e = (Elf_Ehdr *)&fmp->md_data; - if ((error = md_load(fp->f_args, &mdp, &dtbp)) != 0) + if ((error = md_load64(fp->f_args, &mdp, NULL)) != 0) return (error); printf("jumping to kernel entry at %#lx.\n", e->e_entry); From owner-svn-src-head@freebsd.org Mon May 21 01:39:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA21EEACC05; Mon, 21 May 2018 01:39:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A29883D09; Mon, 21 May 2018 01:39:27 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CBA71E4FC; Mon, 21 May 2018 01:39:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L1dRUC008912; Mon, 21 May 2018 01:39:27 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L1dRc2008911; Mon, 21 May 2018 01:39:27 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210139.w4L1dRc2008911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 01:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333956 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 01:39:27 -0000 Author: eadler Date: Mon May 21 01:39:26 2018 New Revision: 333956 URL: https://svnweb.freebsd.org/changeset/base/333956 Log: top(1): fix build on arches where size_t != ull Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 01:20:19 2018 (r333955) +++ head/usr.bin/top/machine.c Mon May 21 01:39:26 2018 (r333956) @@ -993,7 +993,7 @@ format_next_process(caddr_t xhandle, char *(*get_useri state < sizeof(state_abbrev) / sizeof(*state_abbrev)) sprintf(status, "%.6s", state_abbrev[state]); else - sprintf(status, "?%5lu", state); + sprintf(status, "?%5zu", state); break; } From owner-svn-src-head@freebsd.org Mon May 21 01:53:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA2C5EAE3A5; Mon, 21 May 2018 01:53:24 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C5A085D35; Mon, 21 May 2018 01:53:24 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 442571E842; Mon, 21 May 2018 01:53:24 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L1rOxC019227; Mon, 21 May 2018 01:53:24 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L1rN4H019226; Mon, 21 May 2018 01:53:23 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805210153.w4L1rN4H019226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Mon, 21 May 2018 01:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333957 - in head/sys: net sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: net sys X-SVN-Commit-Revision: 333957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 01:53:25 -0000 Author: mmacy Date: Mon May 21 01:53:23 2018 New Revision: 333957 URL: https://svnweb.freebsd.org/changeset/base/333957 Log: ck: simplify interface with libkvm consumers by defining ck_queue types as their queue.h equivalents if !_KERNEL Added: head/sys/sys/ck.h (contents, props changed) Modified: head/sys/net/if_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Mon May 21 01:39:26 2018 (r333956) +++ head/sys/net/if_var.h Mon May 21 01:53:23 2018 (r333957) @@ -76,10 +76,10 @@ struct netdump_methods; #include /* ifqueue only? */ #include #include -#include -#include #endif /* _KERNEL */ +#include #include +#include #include /* XXX */ #include /* struct ifqueue */ #include /* XXX */ @@ -90,13 +90,8 @@ struct netdump_methods; #include TAILQ_HEAD(ifnethead, ifnet); /* we use TAILQs so that the order of */ -#ifdef _KERNEL CK_STAILQ_HEAD(ifaddrhead, ifaddr); /* instantiation is preserved in the list */ CK_STAILQ_HEAD(ifmultihead, ifmultiaddr); -#else -STAILQ_HEAD(ifaddrhead, ifaddr); /* instantiation is preserved in the list */ -STAILQ_HEAD(ifmultihead, ifmultiaddr); -#endif TAILQ_HEAD(ifgrouphead, ifg_group); #ifdef _KERNEL @@ -522,7 +517,7 @@ struct ifaddr { struct sockaddr *ifa_netmask; /* used to determine subnet */ struct ifnet *ifa_ifp; /* back-pointer to interface */ struct carp_softc *ifa_carp; /* pointer to CARP data */ - STAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ + CK_STAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */ (int, struct rtentry *, struct rt_addrinfo *); u_short ifa_flags; /* mostly rt_flags for cloning */ @@ -546,7 +541,7 @@ void ifa_ref(struct ifaddr *ifa); * structure except that it keeps track of multicast addresses. */ struct ifmultiaddr { - STAILQ_ENTRY(ifmultiaddr) ifma_link; /* queue macro glue */ + CK_STAILQ_ENTRY(ifmultiaddr) ifma_link; /* queue macro glue */ struct sockaddr *ifma_addr; /* address this membership is for */ struct sockaddr *ifma_lladdr; /* link-layer translation, if any */ struct ifnet *ifma_ifp; /* back-pointer to interface */ Added: head/sys/sys/ck.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/ck.h Mon May 21 01:53:23 2018 (r333957) @@ -0,0 +1,13 @@ +/* + * $FreeBSD$ + */ +#ifdef _KERNEL +#include +#include +#else +#include +#define CK_STAILQ_HEAD STAILQ_HEAD +#define CK_STAILQ_ENTRY STAILQ_ENTRY +#define CK_LIST_HEAD LIST_HEAD +#define CK_LIST_ENTRY LIST_ENTRY +#endif From owner-svn-src-head@freebsd.org Mon May 21 03:36:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACE49EB1E36; Mon, 21 May 2018 03:36:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 638936A3D7; Mon, 21 May 2018 03:36:18 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4575B1F922; Mon, 21 May 2018 03:36:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L3aI77071173; Mon, 21 May 2018 03:36:18 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L3aGCr071165; Mon, 21 May 2018 03:36:16 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210336.w4L3aGCr071165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 03:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333958 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 03:36:18 -0000 Author: eadler Date: Mon May 21 03:36:16 2018 New Revision: 333958 URL: https://svnweb.freebsd.org/changeset/base/333958 Log: top(1): fix several more warnings Modified: head/usr.bin/top/commands.c head/usr.bin/top/display.c head/usr.bin/top/machine.c head/usr.bin/top/screen.c head/usr.bin/top/top.c head/usr.bin/top/top.h head/usr.bin/top/utils.c Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Mon May 21 01:53:23 2018 (r333957) +++ head/usr.bin/top/commands.c Mon May 21 03:36:16 2018 (r333958) @@ -326,8 +326,8 @@ static int err_compar(const void *p1, const void *p2) { int result; - struct errs * g1 = (struct errs *)p1; - struct errs * g2 = (struct errs *)p2; + const struct errs * const g1 = (const struct errs * const)p1; + const struct errs * const g2 = (const struct errs * const)p2; Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Mon May 21 01:53:23 2018 (r333957) +++ head/usr.bin/top/display.c Mon May 21 03:36:16 2018 (r333958) @@ -66,7 +66,7 @@ static int display_width = MAX_COLS; /* things initialized by display_init and used thruout */ /* buffer of proc information lines for display updating */ -char *screenbuf = NULL; +static char *screenbuf = NULL; static char **procstate_names; static char **cpustate_names; @@ -656,13 +656,10 @@ int *stats; * Assumptions: cursor is on "lastline" * for i_arc ONLY: cursor is on the previous line */ -char arc_buffer[MAX_COLS]; +static char arc_buffer[MAX_COLS]; void -i_arc(stats) - -int *stats; - +i_arc(int *stats) { if (arc_names == NULL) return; @@ -698,13 +695,10 @@ int *stats; * Assumptions: cursor is on "lastline" * for i_carc ONLY: cursor is on the previous line */ -char carc_buffer[MAX_COLS]; +static char carc_buffer[MAX_COLS]; void -i_carc(stats) - -int *stats; - +i_carc(int *stats) { if (carc_names == NULL) return; @@ -740,13 +734,10 @@ int *stats; * for i_swap ONLY: cursor is on the previous line */ -char swap_buffer[MAX_COLS]; +static char swap_buffer[MAX_COLS]; void -i_swap(stats) - -int *stats; - +i_swap(int *stats) { fputs("\nSwap: ", stdout); lastline++; @@ -757,10 +748,7 @@ int *stats; } void -u_swap(stats) - -int *stats; - +u_swap(int *stats) { static char new[MAX_COLS]; @@ -790,8 +778,8 @@ static int msglen = 0; void i_message() - { + while (lastline < y_message) { fputc('\n', stdout); Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 01:53:23 2018 (r333957) +++ head/usr.bin/top/machine.c Mon May 21 03:36:16 2018 (r333958) @@ -124,7 +124,7 @@ static char up_header[] = /* the extra nulls in the string "run" are for adding a slash and the processor number when needed */ -char *state_abbrev[] = { +static char *state_abbrev[] = { "", "START", "RUN\0\0\0", "SLEEP", "STOP", "ZOMB", "WAIT", "LOCK" }; @@ -151,8 +151,8 @@ static long cp_diff[CPUSTATES]; /* these are for detailing the process states */ -int process_states[8]; -char *procstatenames[] = { +static int process_states[8]; +static char *procstatenames[] = { "", " starting, ", " running, ", " sleeping, ", " stopped, ", " zombie, ", " waiting, ", " lock, ", NULL @@ -160,33 +160,33 @@ char *procstatenames[] = { /* these are for detailing the cpu states */ -int cpu_states[CPUSTATES]; -char *cpustatenames[] = { +static int cpu_states[CPUSTATES]; +static char *cpustatenames[] = { "user", "nice", "system", "interrupt", "idle", NULL }; /* these are for detailing the memory statistics */ -int memory_stats[7]; -char *memorynames[] = { +static int memory_stats[7]; +static char *memorynames[] = { "K Active, ", "K Inact, ", "K Laundry, ", "K Wired, ", "K Buf, ", "K Free", NULL }; -int arc_stats[7]; -char *arcnames[] = { +static int arc_stats[7]; +static char *arcnames[] = { "K Total, ", "K MFU, ", "K MRU, ", "K Anon, ", "K Header, ", "K Other", NULL }; -int carc_stats[4]; -char *carcnames[] = { +static int carc_stats[4]; +static char *carcnames[] = { "K Compressed, ", "K Uncompressed, ", ":1 Ratio, ", NULL }; -int swap_stats[7]; -char *swapnames[] = { +static int swap_stats[7]; +static char *swapnames[] = { "K Total, ", "K Used, ", "K Free, ", "% Inuse, ", "K In, ", "K Out", NULL }; @@ -933,7 +933,8 @@ format_next_process(caddr_t xhandle, char *(*get_useri size_t state; struct rusage ru, *rup; long p_tot, s_tot; - char *proc_fmt, thr_buf[6]; + char *proc_fmt; + char thr_buf[6]; char jid_buf[TOP_JID_LEN + 1], swap_buf[TOP_SWAP_LEN + 1]; char *cmdbuf = NULL; char **args; Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Mon May 21 01:53:23 2018 (r333957) +++ head/usr.bin/top/screen.c Mon May 21 03:36:16 2018 (r333958) @@ -32,9 +32,6 @@ #include "screen.h" #include "boolean.h" -extern char *myname; - - int overstrike; int screen_length; int screen_width; Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Mon May 21 01:53:23 2018 (r333957) +++ head/usr.bin/top/top.c Mon May 21 03:36:16 2018 (r333958) @@ -1,6 +1,3 @@ -char *copyright = - "Copyright (c) 1984 through 1996, William LeFebvre"; - /* * Top users/processes display for Unix * @@ -43,10 +40,13 @@ char *copyright = /* Size of the stdio buffer given to stdout */ #define Buffersize 2048 +char *copyright = + "Copyright (c) 1984 through 1996, William LeFebvre"; + typedef void sigret_t; /* The buffer that stdio will use */ -char stdoutbuf[Buffersize]; +static char stdoutbuf[Buffersize]; /* build Signal masks */ #define Smask(s) (1 << ((s) - 1)) @@ -69,34 +69,30 @@ static int max_topn; /* maximum displayable processes /* miscellaneous things */ struct process_select ps; -char *myname = "top"; -jmp_buf jmp_int; +const char * myname = "top"; char *username(int); time_t time(time_t *tloc); -caddr_t get_process_info(struct system_info *si, struct process_select *sel, - int (*compare)(const void *, const void *)); - /* different routines for displaying the user's identification */ /* (values assigned to get_userid) */ char *username(int); char *itoa7(int); /* pointers to display routines */ -void (*d_loadave)(int mpid, double *avenrun) = i_loadave; -void (*d_procstates)(int total, int *brkdn) = i_procstates; -void (*d_cpustates)(int *states) = i_cpustates; -void (*d_memory)(int *stats) = i_memory; -void (*d_arc)(int *stats) = i_arc; -void (*d_carc)(int *stats) = i_carc; -void (*d_swap)(int *stats) = i_swap; -void (*d_message)(void) = i_message; -void (*d_header)(char *text) = i_header; -void (*d_process)(int line, char *thisline) = i_process; +static void (*d_loadave)(int mpid, double *avenrun) = i_loadave; +static void (*d_procstates)(int total, int *brkdn) = i_procstates; +static void (*d_cpustates)(int *states) = i_cpustates; +static void (*d_memory)(int *stats) = i_memory; +static void (*d_arc)(int *stats) = i_arc; +static void (*d_carc)(int *stats) = i_carc; +static void (*d_swap)(int *stats) = i_swap; +static void (*d_message)(void) = i_message; +static void (*d_header)(char *text) = i_header; +static void (*d_process)(int line, char *thisline) = i_process; -void reset_display(void); +static void reset_display(void); static void reset_uids() @@ -1177,7 +1173,7 @@ restart: * screen will get redrawn. */ -void +static void reset_display() { Modified: head/usr.bin/top/top.h ============================================================================== --- head/usr.bin/top/top.h Mon May 21 01:53:23 2018 (r333957) +++ head/usr.bin/top/top.h Mon May 21 03:36:16 2018 (r333958) @@ -46,6 +46,8 @@ extern enum displaymodes displaymode; extern int pcpu_stats; extern int overstrike; +extern const char * myname; + extern int (*compares[])(const void*, const void*); char* kill_procs(char *); Modified: head/usr.bin/top/utils.c ============================================================================== --- head/usr.bin/top/utils.c Mon May 21 01:53:23 2018 (r333957) +++ head/usr.bin/top/utils.c Mon May 21 03:36:16 2018 (r333958) @@ -16,6 +16,7 @@ */ #include "top.h" +#include "utils.h" #include #include @@ -428,10 +429,8 @@ int amt; return(ret); } -char *format_k2(amt) - -unsigned long long amt; - +char * +format_k2(unsigned long long amt) { static char retarray[NUM_STRINGS][16]; static int index = 0; From owner-svn-src-head@freebsd.org Mon May 21 03:58:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7FAAEDB791; Mon, 21 May 2018 03:58:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 77AF66AEA5; Mon, 21 May 2018 03:58:16 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 584061FC8A; Mon, 21 May 2018 03:58:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L3wGri081511; Mon, 21 May 2018 03:58:16 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L3wFji081505; Mon, 21 May 2018 03:58:15 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210358.w4L3wFji081505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 03:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333959 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 03:58:17 -0000 Author: eadler Date: Mon May 21 03:58:15 2018 New Revision: 333959 URL: https://svnweb.freebsd.org/changeset/base/333959 Log: top(1): build with WARNS=3 This fixes everything but -Wincompatible-pointer-types-discards-qualifiers Modified: head/usr.bin/top/Makefile head/usr.bin/top/display.c head/usr.bin/top/display.h head/usr.bin/top/machine.h head/usr.bin/top/top.c Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Mon May 21 03:36:16 2018 (r333958) +++ head/usr.bin/top/Makefile Mon May 21 03:58:15 2018 (r333959) @@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h CFLAGS+= -I ${.OBJDIR} MAN= top.1 -WARNS?= 2 +WARNS?= 3 LIBADD= ncursesw m kvm jail Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Mon May 21 03:36:16 2018 (r333958) +++ head/usr.bin/top/display.c Mon May 21 03:58:15 2018 (r333959) @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -1042,14 +1043,16 @@ display_header(int t) } } -/*VARARGS2*/ void -new_message(int type, char *msgfmt, caddr_t a1, caddr_t a2, caddr_t a3) +new_message(int type, char *msgfmt, ...) { - int i; + va_list args; + size_t i; + va_start(args, msgfmt); + /* first, format the message */ - snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3); + snprintf(next_msg, sizeof(next_msg), msgfmt, args); if (msglen > 0) { Modified: head/usr.bin/top/display.h ============================================================================== --- head/usr.bin/top/display.h Mon May 21 03:36:16 2018 (r333958) +++ head/usr.bin/top/display.h Mon May 21 03:58:15 2018 (r333959) @@ -27,7 +27,7 @@ void i_procstates(int total, int *brkdn); void i_swap(int *stats); void i_timeofday(time_t *tod); void i_uptime(struct timeval *bt, time_t *tod); -void new_message(); +void new_message(int type, char *msgfmt, ...); int readline(char *buffer, int size, int numeric); char *trim_header(char *text); void u_arc(int *stats); Modified: head/usr.bin/top/machine.h ============================================================================== --- head/usr.bin/top/machine.h Mon May 21 03:36:16 2018 (r333958) +++ head/usr.bin/top/machine.h Mon May 21 03:58:15 2018 (r333959) @@ -91,4 +91,8 @@ int proc_owner(int pid); /* non-int routines typically used by the machine dependent module */ char *printable(char *string); +caddr_t +get_process_info(struct system_info *si, struct process_select *sel, + int (*compare)(const void *, const void *)); + #endif /* MACHINE_H */ Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Mon May 21 03:36:16 2018 (r333958) +++ head/usr.bin/top/top.c Mon May 21 03:58:15 2018 (r333959) @@ -221,7 +221,7 @@ char *argv[]; int displays = 0; /* indicates unspecified */ int sel_ret = 0; time_t curr_time; - char *(*get_userid)() = username; + char *(*get_userid)(int) = username; char *uname_field = "USERNAME"; char *header_text; char *env_top; @@ -625,7 +625,7 @@ restart: while ((displays == -1) || (displays-- > 0)) { - int (*compare)(); + int (*compare)(const void * const, const void * const); /* get the current stats */ From owner-svn-src-head@freebsd.org Mon May 21 04:02:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 775FBEDB9E0; Mon, 21 May 2018 04:02:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E20D6B2C8; Mon, 21 May 2018 04:02:47 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F20AC1FE1E; Mon, 21 May 2018 04:02:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L42kKE086369; Mon, 21 May 2018 04:02:46 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L42kB2086366; Mon, 21 May 2018 04:02:46 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210402.w4L42kB2086366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 04:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333960 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 04:02:47 -0000 Author: eadler Date: Mon May 21 04:02:45 2018 New Revision: 333960 URL: https://svnweb.freebsd.org/changeset/base/333960 Log: top(1): further unconditionally assume we're on FreeBSD Modified: head/usr.bin/top/commands.c head/usr.bin/top/display.c head/usr.bin/top/display.h head/usr.bin/top/machine.c Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Mon May 21 03:58:15 2018 (r333959) +++ head/usr.bin/top/commands.c Mon May 21 04:02:45 2018 (r333960) @@ -489,13 +489,11 @@ renice_procs(char *str) prio = -prio; } -#if defined(PRIO_MIN) && defined(PRIO_MAX) /* check for validity */ if (procnum == -1 || prio < PRIO_MIN || prio > PRIO_MAX) { return(" bad priority value"); } -#endif /* move to the first process number */ if ((str = next_field(str)) == NULL) Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Mon May 21 03:58:15 2018 (r333959) +++ head/usr.bin/top/display.c Mon May 21 04:02:45 2018 (r333960) @@ -441,40 +441,6 @@ int *brkdn; } } -#ifdef no_more -/* - * *_cpustates(states, names) - print the cpu state percentages - * - * Assumptions: cursor is on the PREVIOUS line - */ - -/* cpustates_tag() calculates the correct tag to use to label the line */ - -char *cpustates_tag() - -{ - char *use; - - static char *short_tag = "CPU: "; - static char *long_tag = "CPU states: "; - - /* if length + strlen(long_tag) >= screen_width, then we have to - use the shorter tag (we subtract 2 to account for ": ") */ - if (cpustate_total_length + (int)strlen(long_tag) - 2 >= screen_width) - { - use = short_tag; - } - else - { - use = long_tag; - } - - /* set cpustates_column accordingly then return result */ - cpustates_column = strlen(use); - return(use); -} -#endif - void i_cpustates(states) Modified: head/usr.bin/top/display.h ============================================================================== --- head/usr.bin/top/display.h Mon May 21 03:58:15 2018 (r333959) +++ head/usr.bin/top/display.h Mon May 21 04:02:45 2018 (r333960) @@ -13,7 +13,6 @@ void clear_message(void); int display_resize(void); void i_header(char *text); char *printable(char *string); -char *cpustates_tag(void); void display_header(int t); int display_init(struct statics *statics); void i_arc(int *stats); Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 03:58:15 2018 (r333959) +++ head/usr.bin/top/machine.c Mon May 21 04:02:45 2018 (r333960) @@ -42,8 +42,9 @@ #include #include "top.h" -#include "machine.h" #include "display.h" +#include "machine.h" +#include "loadavg.h" #include "screen.h" #include "utils.h" #include "layout.h" @@ -56,11 +57,7 @@ extern struct process_select ps; extern struct timeval timeout; static int smpmode; enum displaymodes displaymode; -#ifdef TOP_USERNAME_LEN -static int namelength = TOP_USERNAME_LEN; -#else static int namelength = 8; -#endif /* TOP_JID_LEN based on max of 999999 */ #define TOP_JID_LEN 7 #define TOP_SWAP_LEN 6 @@ -75,8 +72,6 @@ struct handle { int remaining; /* number of pointers remaining */ }; -/* declarations for load_avg */ -#include "loadavg.h" /* define what weighted cpu is. */ #define weighted_cpu(pct, pp) ((pp)->ki_swtime == 0 ? 0.0 : \ From owner-svn-src-head@freebsd.org Mon May 21 04:32:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C85C2EE230F; Mon, 21 May 2018 04:32:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A6916BCCE; Mon, 21 May 2018 04:32:15 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B7B8202CC; Mon, 21 May 2018 04:32:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L4WF93098967; Mon, 21 May 2018 04:32:15 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L4WFsW098966; Mon, 21 May 2018 04:32:15 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210432.w4L4WFsW098966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 04:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333961 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 04:32:16 -0000 Author: eadler Date: Mon May 21 04:32:14 2018 New Revision: 333961 URL: https://svnweb.freebsd.org/changeset/base/333961 Log: top(1): clean up in prep for const poisoning - sprinkle "const" in a few obvious places - remove "(void)" in front of lack-of-error-checked functions Modified: head/usr.bin/top/commands.c Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Mon May 21 04:02:45 2018 (r333960) +++ head/usr.bin/top/commands.c Mon May 21 04:32:14 2018 (r333961) @@ -43,7 +43,7 @@ struct errs /* structure for a system-call error */ char *arg; /* argument that caused the error */ }; -char *err_string(void); +static char *err_string(void); static int str_adderr(char *str, int len, int err); static int str_addarg(char *str, int len, char *arg, int first); @@ -237,7 +237,7 @@ char *err_string() { return(err_listem); } - (void) strcat(string, "; "); /* we know there's more */ + strcat(string, "; "); /* we know there's more */ } currerr = errp->errnum; first = Yes; @@ -262,15 +262,10 @@ char *err_string() */ static int -str_adderr(str, len, err) - -char *str; -int len; -int err; - +str_adderr(char *str, int len, int err) { - char *msg; - int msglen; + const char *msg; + int msglen; msg = err == 0 ? "Not a number" : strerror(err); msglen = strlen(msg) + 2; @@ -278,8 +273,8 @@ int err; { return(0); } - (void) strcat(str, ": "); - (void) strcat(str, msg); + strcat(str, ": "); + strcat(str, msg); return(len - msglen); } @@ -311,9 +306,9 @@ int first; } if (!first) { - (void) strcat(str, ", "); + strcat(str, ", "); } - (void) strcat(str, arg); + strcat(str, arg); return(len - arglen); } @@ -402,7 +397,7 @@ kill_procs(char *str) if (isdigit(str[1])) { - (void) scanint(str + 1, &signum); + scanint(str + 1, &signum); if (signum <= 0 || signum >= NSIG) { return(" invalid signal number"); From owner-svn-src-head@freebsd.org Mon May 21 04:40:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2DFFEE24EC; Mon, 21 May 2018 04:40:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 836276BF63; Mon, 21 May 2018 04:40:21 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61514202EC; Mon, 21 May 2018 04:40:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L4eLdG001689; Mon, 21 May 2018 04:40:21 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L4eKCh001684; Mon, 21 May 2018 04:40:20 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210440.w4L4eKCh001684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 04:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333962 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 04:40:22 -0000 Author: eadler Date: Mon May 21 04:40:20 2018 New Revision: 333962 URL: https://svnweb.freebsd.org/changeset/base/333962 Log: top(1): further unconditionally assume we're on FreeBSD Modified: head/usr.bin/top/loadavg.h head/usr.bin/top/machine.c head/usr.bin/top/machine.h head/usr.bin/top/top.c Modified: head/usr.bin/top/loadavg.h ============================================================================== --- head/usr.bin/top/loadavg.h Mon May 21 04:32:14 2018 (r333961) +++ head/usr.bin/top/loadavg.h Mon May 21 04:40:20 2018 (r333962) @@ -10,6 +10,8 @@ * * loaddouble(la) - convert load_avg to double. * intload(i) - convert integer to load_avg. + * + * $FreeBSD$ */ /* @@ -19,39 +21,19 @@ * * Defined types: load_avg for load averages, pctcpu for cpu percentages. */ -#if defined(__mips__) && !(defined(__NetBSD__) || defined(__FreeBSD__)) +#if defined(__mips__) && defined(__FreeBSD__) # include # if defined(FBITS) && !defined(FSCALE) # define FSCALE (1 << FBITS) /* RISC/os on mips */ # endif #endif -#ifdef FSCALE -# define FIXED_LOADAVG FSCALE -# define FIXED_PCTCPU FSCALE -#endif +#define FIXED_LOADAVG FSCALE +#define FIXED_PCTCPU FSCALE -#ifdef ibm032 -# undef FIXED_LOADAVG -# undef FIXED_PCTCPU -# define FIXED_PCTCPU PCT_SCALE -#endif +typedef long pctcpu; +#define pctdouble(p) ((double)(p) / FIXED_PCTCPU) - -#ifdef FIXED_PCTCPU - typedef long pctcpu; -# define pctdouble(p) ((double)(p) / FIXED_PCTCPU) -#else -typedef double pctcpu; -# define pctdouble(p) (p) -#endif - -#ifdef FIXED_LOADAVG - typedef fixpt_t load_avg; -# define loaddouble(la) ((double)(la) / FIXED_LOADAVG) -# define intload(i) ((int)((i) * FIXED_LOADAVG)) -#else - typedef double load_avg; -# define loaddouble(la) (la) -# define intload(i) ((double)(i)) -#endif +typedef fixpt_t load_avg; +#define loaddouble(la) ((double)(la) / FIXED_LOADAVG) +#define intload(i) ((int)((i) * FIXED_LOADAVG)) Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 04:32:14 2018 (r333961) +++ head/usr.bin/top/machine.c Mon May 21 04:40:20 2018 (r333962) @@ -905,7 +905,7 @@ get_process_info(struct system_info *si, struct proces /* remember active and total counts */ si->p_total = total_procs; - si->p_active = pref_len = active_procs; + si->p_pactive = pref_len = active_procs; /* pass back a handle */ handle.next_proc = pref; Modified: head/usr.bin/top/machine.h ============================================================================== --- head/usr.bin/top/machine.h Mon May 21 04:32:14 2018 (r333961) +++ head/usr.bin/top/machine.h Mon May 21 04:40:20 2018 (r333962) @@ -31,18 +31,12 @@ struct statics * the system_info struct is filled in by a machine dependent routine. */ -#ifdef p_active /* uw7 define macro p_active */ -#define P_ACTIVE p_pactive -#else -#define P_ACTIVE p_active -#endif - struct system_info { int last_pid; double load_avg[NUM_AVERAGES]; int p_total; - int P_ACTIVE; /* number of procs considered "active" */ + int p_pactive; /* number of procs considered "active" */ int *procstates; int *cpustates; int *memory; Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Mon May 21 04:32:14 2018 (r333961) +++ head/usr.bin/top/top.c Mon May 21 04:40:20 2018 (r333962) @@ -403,7 +403,7 @@ char *argv[]; if (getuid() == 0) { /* be very un-nice! */ - (void) nice(-20); + nice(-20); } else { @@ -589,25 +589,13 @@ char *argv[]; } /* hold interrupt signals while setting up the screen and the handlers */ -#ifdef SIGHOLD - sighold(SIGINT); - sighold(SIGQUIT); - sighold(SIGTSTP); -#else old_sigmask = sigblock(Smask(SIGINT) | Smask(SIGQUIT) | Smask(SIGTSTP)); -#endif init_screen(); signal(SIGINT, leave); signal(SIGQUIT, leave); signal(SIGTSTP, tstop); signal(SIGWINCH, top_winch); -#ifdef SIGRELSE - sigrelse(SIGINT); - sigrelse(SIGQUIT); - sigrelse(SIGTSTP); -#else - (void) sigsetmask(old_sigmask); -#endif + sigsetmask(old_sigmask); if (warnings) { fputs("....", stderr); @@ -689,7 +677,7 @@ restart: /* determine number of processes to actually display */ /* this number will be the smallest of: active processes, number user requested, number current screen accomodates */ - active_procs = system_info.P_ACTIVE; + active_procs = system_info.p_pactive; if (active_procs > topn) { active_procs = topn; @@ -779,18 +767,14 @@ restart: fflush(stdout); /* default the signal handler action */ - (void) signal(SIGTSTP, SIG_DFL); + signal(SIGTSTP, SIG_DFL); /* unblock the signal and send ourselves one */ -#ifdef SIGRELSE - sigrelse(SIGTSTP); -#else - (void) sigsetmask(sigblock(0) & ~(1 << (SIGTSTP - 1))); -#endif - (void) kill(0, SIGTSTP); + sigsetmask(sigblock(0) & ~(1 << (SIGTSTP - 1))); + kill(0, SIGTSTP); /* reset the signal handler */ - (void) signal(SIGTSTP, tstop); + signal(SIGTSTP, tstop); /* reinit screen */ reinit_screen(); @@ -807,7 +791,7 @@ restart: max_topn = display_resize(); /* reset the signal handler */ - (void) signal(SIGWINCH, top_winch); + signal(SIGWINCH, top_winch); reset_display(); winchflag = 0; @@ -885,7 +869,7 @@ restart: show_help(); top_standout("Hit any key to continue: "); fflush(stdout); - (void) read(0, &ch, 1); + read(0, &ch, 1); break; case CMD_errors: /* show errors */ @@ -903,7 +887,7 @@ restart: show_errors(); top_standout("Hit any key to continue: "); fflush(stdout); - (void) read(0, &ch, 1); + read(0, &ch, 1); } break; From owner-svn-src-head@freebsd.org Mon May 21 04:47:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EBC2EE27D3; Mon, 21 May 2018 04:47:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 484246C3AC; Mon, 21 May 2018 04:47:14 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B1782048F; Mon, 21 May 2018 04:47:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L4lD7s006581; Mon, 21 May 2018 04:47:13 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L4lDiD006580; Mon, 21 May 2018 04:47:13 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210447.w4L4lDiD006580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 04:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333963 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 04:47:14 -0000 Author: eadler Date: Mon May 21 04:47:13 2018 New Revision: 333963 URL: https://svnweb.freebsd.org/changeset/base/333963 Log: top(1): fix MIPS I missed where the parentheses were. Reported by: imp Modified: head/usr.bin/top/loadavg.h Modified: head/usr.bin/top/loadavg.h ============================================================================== --- head/usr.bin/top/loadavg.h Mon May 21 04:40:20 2018 (r333962) +++ head/usr.bin/top/loadavg.h Mon May 21 04:47:13 2018 (r333963) @@ -14,20 +14,6 @@ * $FreeBSD$ */ -/* - * We assume that if FSCALE is defined, then avenrun and ccpu are type long. - * If your machine is an exception (mips, perhaps?) then make adjustments - * here. - * - * Defined types: load_avg for load averages, pctcpu for cpu percentages. - */ -#if defined(__mips__) && defined(__FreeBSD__) -# include -# if defined(FBITS) && !defined(FSCALE) -# define FSCALE (1 << FBITS) /* RISC/os on mips */ -# endif -#endif - #define FIXED_LOADAVG FSCALE #define FIXED_PCTCPU FSCALE From owner-svn-src-head@freebsd.org Mon May 21 04:51:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60D5FEE2A5C; Mon, 21 May 2018 04:51:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16DB56C62E; Mon, 21 May 2018 04:51:44 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D27AC205D9; Mon, 21 May 2018 04:51:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L4phIW008181; Mon, 21 May 2018 04:51:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L4phnt008180; Mon, 21 May 2018 04:51:43 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210451.w4L4phnt008180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 04:51:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333964 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 04:51:44 -0000 Author: eadler Date: Mon May 21 04:51:43 2018 New Revision: 333964 URL: https://svnweb.freebsd.org/changeset/base/333964 Log: top(1): remove prime.c This file was not connected to the build, and is better served by primes(6) anyways. Deleted: head/usr.bin/top/prime.c From owner-svn-src-head@freebsd.org Mon May 21 05:00:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DD39EE2C02; Mon, 21 May 2018 05:00:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFF866C9D7; Mon, 21 May 2018 05:00:20 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFDE320624; Mon, 21 May 2018 05:00:20 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L50Kmu011769; Mon, 21 May 2018 05:00:20 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L50Kpl011766; Mon, 21 May 2018 05:00:20 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210500.w4L50Kpl011766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 05:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333965 - in head: . usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: . usr.bin/top X-SVN-Commit-Revision: 333965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 05:00:21 -0000 Author: eadler Date: Mon May 21 05:00:19 2018 New Revision: 333965 URL: https://svnweb.freebsd.org/changeset/base/333965 Log: top(1): add myself as a MAINTAIENR also fix some nits Modified: head/MAINTAINERS head/usr.bin/top/username.h head/usr.bin/top/utils.c Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Mon May 21 04:51:43 2018 (r333964) +++ head/MAINTAINERS Mon May 21 05:00:19 2018 (r333965) @@ -99,6 +99,7 @@ sys/netpfil/pf kp,glebius Pre-commit review recommende sys/x86/xen royger Pre-commit review recommended. sys/xen royger Pre-commit review recommended. tests freebsd-testing,ngie Pre-commit review requested. +top(1) eadler Pre-commit review requested. usr.sbin/bsdconfig dteske Pre-commit phabricator review requested. usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv. usr.sbin/pkg pkg@ Please coordinate behavior or flag changes with pkg team. Modified: head/usr.bin/top/username.h ============================================================================== --- head/usr.bin/top/username.h Mon May 21 04:51:43 2018 (r333964) +++ head/usr.bin/top/username.h Mon May 21 05:00:19 2018 (r333965) @@ -1,7 +1,4 @@ /* - * Top users/processes display for Unix - * Version 3 - * * This program may be freely redistributed, * but this entire comment MUST remain intact. * Modified: head/usr.bin/top/utils.c ============================================================================== --- head/usr.bin/top/utils.c Mon May 21 04:51:43 2018 (r333964) +++ head/usr.bin/top/utils.c Mon May 21 05:00:19 2018 (r333965) @@ -1,7 +1,4 @@ /* - * Top users/processes display for Unix - * Version 3 - * * This program may be freely redistributed, * but this entire comment MUST remain intact. * @@ -397,10 +394,7 @@ long seconds; #define NUM_STRINGS 8 -char *format_k(amt) - -int amt; - +char *format_k(int amt) { static char retarray[NUM_STRINGS][16]; static int index = 0; From owner-svn-src-head@freebsd.org Mon May 21 05:01:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0528EE2DED; Mon, 21 May 2018 05:01:57 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 261BA6CC32; Mon, 21 May 2018 05:01:57 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4L51rO8023413; Sun, 20 May 2018 22:01:53 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4L51rwf023412; Sun, 20 May 2018 22:01:53 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805210501.w4L51rwf023412@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r333948 - head/usr.bin/top In-Reply-To: <201805210020.w4L0KWKx068219@repo.freebsd.org> To: Eitan Adler Date: Sun, 20 May 2018 22:01:53 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 05:01:58 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: eadler > Date: Mon May 21 00:20:32 2018 > New Revision: 333948 > URL: https://svnweb.freebsd.org/changeset/base/333948 > > Log: > top(1): add getrusage to SEE also > > This documents the various columns that top might support. > > PR: 199637 > Submitted by: vermaden@interia.pl > > Modified: > head/usr.bin/top/top.1 > > Modified: head/usr.bin/top/top.1 > ============================================================================== > --- head/usr.bin/top/top.1 Sun May 20 23:39:08 2018 (r333947) > +++ head/usr.bin/top/top.1 Mon May 21 00:20:32 2018 (r333948) > @@ -454,13 +454,13 @@ things can change while > .I top > is collecting information for an update. The picture it gives is only a > close approximation to reality. > -.SH "SEE ALSO" > +.SH SEE ALSO > kill(1), > ps(1), > stty(1), > mem(4), > +getrusage(2), > renice(8) > -.\" $FreeBSD$ Was deleting this intentional? It wasnt mentioned in the commit log, and I do not see it added back anyplace else. > .SH "FreeBSD NOTES" > > .SH DESCRIPTION OF MEMORY > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon May 21 05:04:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66CF6EE2F4B for ; Mon, 21 May 2018 05:04:43 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 166CD6CF89 for ; Mon, 21 May 2018 05:04:43 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yb0-f174.google.com (mail-yb0-f174.google.com [209.85.213.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id D4FF012E3E for ; Mon, 21 May 2018 05:04:42 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yb0-f174.google.com with SMTP id g140-v6so4667809ybf.6 for ; Sun, 20 May 2018 22:04:42 -0700 (PDT) X-Gm-Message-State: ALKqPwdsbGMrdQJMdXwZlxfM6Ia9HKG14NcBlzIf0KyxblzuR01aETDT V1jDP0C+4QIbI+ilNbVqdpMuOQG8jFWaVoG79IyyQg== X-Google-Smtp-Source: AB8JxZq7Jb95M7g8G/g4r6mItJ32EOkuBdavsfq2XDbVSo1dHv1Yv6ojmtM7fNC4GJS15W6xeWa/T8vbsSUz4bUDUyo= X-Received: by 2002:a25:2605:: with SMTP id m5-v6mr6283300ybm.89.1526879082175; Sun, 20 May 2018 22:04:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Sun, 20 May 2018 22:04:11 -0700 (PDT) In-Reply-To: <201805210501.w4L51rwf023412@pdx.rh.CN85.dnsmgr.net> References: <201805210020.w4L0KWKx068219@repo.freebsd.org> <201805210501.w4L51rwf023412@pdx.rh.CN85.dnsmgr.net> From: Eitan Adler Date: Sun, 20 May 2018 22:04:11 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333948 - head/usr.bin/top To: "Rodney W. Grimes" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 05:04:43 -0000 On 20 May 2018 at 22:01, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: eadler >> Date: Mon May 21 00:20:32 2018 >> New Revision: 333948 >> URL: https://svnweb.freebsd.org/changeset/base/333948 >> >> Log: >> top(1): add getrusage to SEE also >> >> This documents the various columns that top might support. >> >> PR: 199637 >> Submitted by: vermaden@interia.pl >> >> Modified: >> head/usr.bin/top/top.1 >> >> Modified: head/usr.bin/top/top.1 >> ============================================================================== >> --- head/usr.bin/top/top.1 Sun May 20 23:39:08 2018 (r333947) >> +++ head/usr.bin/top/top.1 Mon May 21 00:20:32 2018 (r333948) >> @@ -454,13 +454,13 @@ things can change while >> .I top >> is collecting information for an update. The picture it gives is only a >> close approximation to reality. >> -.SH "SEE ALSO" >> +.SH SEE ALSO >> kill(1), >> ps(1), >> stty(1), >> mem(4), >> +getrusage(2), >> renice(8) >> -.\" $FreeBSD$ > > Was deleting this intentional? It wasnt mentioned in the commit log, > and I do not see it added back anyplace else. Yeah. Its a duplicate of a line above. It was originally included because it was concatenating generated code. I need to rewrite the top(1) man page, but each time I started ended up finding something else to change. I'll get to it "soon" -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Mon May 21 05:20:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89472EE33F1; Mon, 21 May 2018 05:20:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D4916D4B3; Mon, 21 May 2018 05:20:24 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C0C820944; Mon, 21 May 2018 05:20:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L5KNwY021831; Mon, 21 May 2018 05:20:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L5KNms021830; Mon, 21 May 2018 05:20:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201805210520.w4L5KNms021830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 21 May 2018 05:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333966 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 333966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 05:20:24 -0000 Author: mjg Date: Mon May 21 05:20:23 2018 New Revision: 333966 URL: https://svnweb.freebsd.org/changeset/base/333966 Log: amd64: annotate pti with __read_frequently Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon May 21 05:00:19 2018 (r333965) +++ head/sys/amd64/amd64/pmap.c Mon May 21 05:20:23 2018 (r333966) @@ -413,7 +413,7 @@ int invpcid_works = 0; SYSCTL_INT(_vm_pmap, OID_AUTO, invpcid_works, CTLFLAG_RD, &invpcid_works, 0, "Is the invpcid instruction available ?"); -int pti = 0; +int __read_frequently pti = 0; SYSCTL_INT(_vm_pmap, OID_AUTO, pti, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &pti, 0, "Page Table Isolation enabled"); From owner-svn-src-head@freebsd.org Mon May 21 06:39:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42785EE4F0D; Mon, 21 May 2018 06:39:54 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1E7F6F48F; Mon, 21 May 2018 06:39:53 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id C7AE3C21A; Mon, 21 May 2018 06:39:53 +0000 (UTC) Date: Mon, 21 May 2018 06:39:53 +0000 From: Alexey Dokuchaev To: Bruce Evans Cc: Eitan Adler , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r333945 - head/usr.bin/top Message-ID: <20180521063953.GA70671@FreeBSD.org> References: <201805202319.w4KNJ9hj038452@repo.freebsd.org> <20180521094344.Q1053@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180521094344.Q1053@besplex.bde.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 06:39:54 -0000 On Mon, May 21, 2018 at 10:32:30AM +1000, Bruce Evans wrote: > ... > > if (smpmode && namelength > SMPUNAMELEN) > > namelength = SMPUNAMELEN; > > else if (namelength > UPUNAMELEN) > > But 33 is too large. It is much larger than the hard-coded maximum limits, > so it is never used, but is reduced to SMPNAMELEN = 13 or UPUNAMELEN = 15. > > So getting the correct value of about 8 is even harder than before, but > changing SMPNAMELEN to 4 works quite well -- "USERNAME" in the header is > then reduced to "USER" and space is made available for something useful > like the command name. Big +1. I didn't go as far as 4, but have to patch top(1) locally to use namelength = 8 and header format so it neatly looks like this: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 844 danfe 2 21 0 114M 38836K select 0 49:39 3.82% Xorg 5836 danfe 12 20 0 101M 23020K select 0 38:19 2.26% deadbeef instead of our ugly, default this: vvvv PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 41086 danfe 1 20 0 13280K 3112K CPU1 1 0:00 0.09% top 751 root 1 20 0 10812K 596K select 2 16:53 0.03% powerd ^^^^^^^^^^ The amount of wasted space (shown above) is unjustified IMO. ./danfe From owner-svn-src-head@freebsd.org Mon May 21 07:12:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 814A6EE5EDF; Mon, 21 May 2018 07:12:07 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F782707A3; Mon, 21 May 2018 07:12:07 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1245521B2F; Mon, 21 May 2018 07:12:07 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L7C6wU081192; Mon, 21 May 2018 07:12:06 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L7C62h081191; Mon, 21 May 2018 07:12:06 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805210712.w4L7C62h081191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Mon, 21 May 2018 07:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333967 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 333967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 07:12:07 -0000 Author: mmacy Date: Mon May 21 07:12:06 2018 New Revision: 333967 URL: https://svnweb.freebsd.org/changeset/base/333967 Log: ensure that vnet is set when doing in_leavegroup Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Mon May 21 05:20:23 2018 (r333966) +++ head/sys/netinet/in_mcast.c Mon May 21 07:12:06 2018 (r333967) @@ -1664,6 +1664,8 @@ inp_gcmoptions(epoch_context_t ctx) { struct ip_moptions *imo; struct in_mfilter *imf; + struct in_multi *inm; + struct ifnet *ifp; size_t idx, nmships; imo = __containerof(ctx, struct ip_moptions, imo_epoch_ctx); @@ -1673,7 +1675,13 @@ inp_gcmoptions(epoch_context_t ctx) imf = imo->imo_mfilters ? &imo->imo_mfilters[idx] : NULL; if (imf) imf_leave(imf); - (void)in_leavegroup(imo->imo_membership[idx], imf); + inm = imo->imo_membership[idx]; + ifp = inm->inm_ifp; + if (ifp) + CURVNET_SET(ifp->if_vnet); + (void)in_leavegroup(inm, imf); + if (ifp) + CURVNET_RESTORE(); if (imf) imf_purge(imf); } From owner-svn-src-head@freebsd.org Mon May 21 07:47:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5044AEE6D31; Mon, 21 May 2018 07:47:54 +0000 (UTC) (envelope-from zec@fer.hr) Received: from mail.fer.hr (mail.fer.hr [161.53.72.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.fer.hr", Issuer "TERENA SSL CA 3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B77E171D95; Mon, 21 May 2018 07:47:53 +0000 (UTC) (envelope-from zec@fer.hr) Received: from x23.koncar-institut.local (161.53.98.245) by MAIL.fer.hr (161.53.72.233) with Microsoft SMTP Server (TLS) id 14.3.399.0; Mon, 21 May 2018 09:46:42 +0200 Date: Mon, 21 May 2018 09:47:34 +0200 From: Marko Zec To: Matt Macy CC: , , Subject: Re: svn commit: r333967 - head/sys/netinet Message-ID: <20180521094734.3270cccb@x23.koncar-institut.local> In-Reply-To: <201805210712.w4L7C62h081191@repo.freebsd.org> References: <201805210712.w4L7C62h081191@repo.freebsd.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; amd64-portbld-freebsd11.1) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [161.53.98.245] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 07:47:54 -0000 On Mon, 21 May 2018 07:12:06 +0000 Matt Macy wrote: > Author: mmacy > Date: Mon May 21 07:12:06 2018 > New Revision: 333967 > URL: https://svnweb.freebsd.org/changeset/base/333967 > > Log: > ensure that vnet is set when doing in_leavegroup > > Modified: > head/sys/netinet/in_mcast.c > > Modified: head/sys/netinet/in_mcast.c > ============================================================================== > --- head/sys/netinet/in_mcast.c Mon May 21 05:20:23 > 2018 (r333966) +++ head/sys/netinet/in_mcast.c Mon May > 21 07:12:06 2018 (r333967) @@ -1664,6 +1664,8 @@ > inp_gcmoptions(epoch_context_t ctx) { > struct ip_moptions *imo; > struct in_mfilter *imf; > + struct in_multi *inm; > + struct ifnet *ifp; > size_t idx, nmships; > > imo = __containerof(ctx, struct ip_moptions, imo_epoch_ctx); > @@ -1673,7 +1675,13 @@ inp_gcmoptions(epoch_context_t ctx) > imf = imo->imo_mfilters ? &imo->imo_mfilters[idx] : > NULL; if (imf) > imf_leave(imf); > - (void)in_leavegroup(imo->imo_membership[idx], imf); > + inm = imo->imo_membership[idx]; > + ifp = inm->inm_ifp; > + if (ifp) > + CURVNET_SET(ifp->if_vnet); Unfortunately, this won't work because CURVNET_SET() expands to a sequence of declarations and assignments which are NOT enclosed in a single block. Instead, only the first statement in CURVNET_SET() sequence, which is an assert, will be executed conditionally only if ifp != NULL, while the rest of the CURVNET_SET() body will fall out of the scope of the if (ifp) conditional. I'd recommend backing out this patch, and instead extending the struct ip_moptions with an struct vnet * entry, which would be populated before scheduling inp_gcmoptions(). Then CURVNET_SET(imo->imo_vnet) could be called only once (and unconditionally) in gcmoptions(), instead of (attempts at) doing this multiple times in a for loop. Marko > + (void)in_leavegroup(inm, imf); > + if (ifp) > + CURVNET_RESTORE(); > if (imf) > imf_purge(imf); > } > From owner-svn-src-head@freebsd.org Mon May 21 08:02:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7258EE77CE; Mon, 21 May 2018 08:02:41 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 858D2727E6; Mon, 21 May 2018 08:02:41 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 507181404B; Mon, 21 May 2018 08:02:41 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f178.google.com with SMTP id a10-v6so13328577ioc.9; Mon, 21 May 2018 01:02:41 -0700 (PDT) X-Gm-Message-State: ALKqPwfnqcUxeTd79uwbtsChGVKx0FMOD33o8tiHAPTxwwl/wfI7c78u NVj04ncH6Y9z/q1nRuhqSkDROT4q+wbcuvF+3MM= X-Google-Smtp-Source: AB8JxZr+TuSzbMeYoOf1kPZ2f0dqdjkV2En+8ljNyXjzJ3hzpHoIN+z3Pmcumtt1ZrgLiAcABNwnE9aXDeBrrKj3qBU= X-Received: by 2002:a6b:a712:: with SMTP id q18-v6mr20050398ioe.237.1526889760614; Mon, 21 May 2018 01:02:40 -0700 (PDT) MIME-Version: 1.0 References: <201805210712.w4L7C62h081191@repo.freebsd.org> <20180521094734.3270cccb@x23.koncar-institut.local> In-Reply-To: <20180521094734.3270cccb@x23.koncar-institut.local> From: Matthew Macy Date: Mon, 21 May 2018 01:02:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333967 - head/sys/netinet To: Marko Zec Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 08:02:42 -0000 Thanks On Mon, May 21, 2018 at 00:47 Marko Zec wrote: > On Mon, 21 May 2018 07:12:06 +0000 > Matt Macy wrote: > > > Author: mmacy > > Date: Mon May 21 07:12:06 2018 > > New Revision: 333967 > > URL: https://svnweb.freebsd.org/changeset/base/333967 > > > > Log: > > ensure that vnet is set when doing in_leavegroup > > > > Modified: > > head/sys/netinet/in_mcast.c > > > > Modified: head/sys/netinet/in_mcast.c > > > ============================================================================== > > --- head/sys/netinet/in_mcast.c Mon May 21 05:20:23 > > 2018 (r333966) +++ head/sys/netinet/in_mcast.c Mon May > > 21 07:12:06 2018 (r333967) @@ -1664,6 +1664,8 @@ > > inp_gcmoptions(epoch_context_t ctx) { > > struct ip_moptions *imo; > > struct in_mfilter *imf; > > + struct in_multi *inm; > > + struct ifnet *ifp; > > size_t idx, nmships; > > > > imo = __containerof(ctx, struct ip_moptions, imo_epoch_ctx); > > @@ -1673,7 +1675,13 @@ inp_gcmoptions(epoch_context_t ctx) > > imf = imo->imo_mfilters ? &imo->imo_mfilters[idx] : > > NULL; if (imf) > > imf_leave(imf); > > - (void)in_leavegroup(imo->imo_membership[idx], imf); > > + inm = imo->imo_membership[idx]; > > + ifp = inm->inm_ifp; > > + if (ifp) > > + CURVNET_SET(ifp->if_vnet); > > Unfortunately, this won't work because CURVNET_SET() expands to a > sequence of declarations and assignments which are NOT enclosed in a > single block. Instead, only the first statement in CURVNET_SET() > sequence, which is an assert, will be executed conditionally only if > ifp != NULL, while the rest of the CURVNET_SET() body will fall out of > the scope of the if (ifp) conditional. > > I'd recommend backing out this patch, and instead extending the struct > ip_moptions with an struct vnet * entry, which would be populated > before scheduling inp_gcmoptions(). Then CURVNET_SET(imo->imo_vnet) > could be called only once (and unconditionally) in gcmoptions(), > instead of (attempts at) doing this multiple times in a for loop. > > Marko > > > > + (void)in_leavegroup(inm, imf); > > + if (ifp) > > + CURVNET_RESTORE(); > > if (imf) > > imf_purge(imf); > > } > > > > From owner-svn-src-head@freebsd.org Mon May 21 08:04:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 770ABEE78C2; Mon, 21 May 2018 08:04:04 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 24BAA72A8E; Mon, 21 May 2018 08:04:04 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id E19AC1404E; Mon, 21 May 2018 08:04:03 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f182.google.com with SMTP id r9-v6so13332975iod.6; Mon, 21 May 2018 01:04:03 -0700 (PDT) X-Gm-Message-State: ALKqPwe+slshSqiVIQv1vmzD2ulCQnqFKWMCtdm5aCaVyMuska1lh8IV R6AtaCd+r1c0tbwBUTmI1ETTw0SJUAT+i3QTWNI= X-Google-Smtp-Source: AB8JxZpZVg8zMYe/I+tsx6TSZyY1+IzR1Wdk/FB9vuJ8Q9cjisFVY5R87+i9q3IDsfK2fr93COdhL9OAd+kn7bCjNw4= X-Received: by 2002:a6b:c5a:: with SMTP id w87-v6mr20966889ioi.132.1526889843528; Mon, 21 May 2018 01:04:03 -0700 (PDT) MIME-Version: 1.0 References: <201805210712.w4L7C62h081191@repo.freebsd.org> <20180521094734.3270cccb@x23.koncar-institut.local> In-Reply-To: <20180521094734.3270cccb@x23.koncar-institut.local> From: Matthew Macy Date: Mon, 21 May 2018 01:03:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333967 - head/sys/netinet To: Marko Zec Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 08:04:04 -0000 On Mon, May 21, 2018 at 00:47 Marko Zec wrote: > On Mon, 21 May 2018 07:12:06 +0000 > Matt Macy wrote: > > > Author: mmacy > > Date: Mon May 21 07:12:06 2018 > > New Revision: 333967 > > URL: https://svnweb.freebsd.org/changeset/base/333967 > > > > Log: > > ensure that vnet is set when doing in_leavegroup > > > > Modified: > > head/sys/netinet/in_mcast.c > > > > Modified: head/sys/netinet/in_mcast.c > > > ============================================================================== > > --- head/sys/netinet/in_mcast.c Mon May 21 05:20:23 > > 2018 (r333966) +++ head/sys/netinet/in_mcast.c Mon May > > 21 07:12:06 2018 (r333967) @@ -1664,6 +1664,8 @@ > > inp_gcmoptions(epoch_context_t ctx) { > > struct ip_moptions *imo; > > struct in_mfilter *imf; > > + struct in_multi *inm; > > + struct ifnet *ifp; > > size_t idx, nmships; > > > > imo = __containerof(ctx, struct ip_moptions, imo_epoch_ctx); > > @@ -1673,7 +1675,13 @@ inp_gcmoptions(epoch_context_t ctx) > > imf = imo->imo_mfilters ? &imo->imo_mfilters[idx] : > > NULL; if (imf) > > imf_leave(imf); > > - (void)in_leavegroup(imo->imo_membership[idx], imf); > > + inm = imo->imo_membership[idx]; > > + ifp = inm->inm_ifp; > > + if (ifp) > > + CURVNET_SET(ifp->if_vnet); > > Unfortunately, this won't work because CURVNET_SET() expands to a > sequence of declarations and assignments which are NOT enclosed in a > single block. Instead, only the first statement in CURVNET_SET() > sequence, which is an assert, will be executed conditionally only if > ifp != NULL, while the rest of the CURVNET_SET() body will fall out of > the scope of the if (ifp) conditional. > That's pretty counter to the way macros are done _everywhere_ else in the kernel. You should probably fix that. > I'd recommend backing out this patch, and instead extending the struct > ip_moptions with an struct vnet * entry, which would be populated > before scheduling inp_gcmoptions(). Then CURVNET_SET(imo->imo_vnet) > could be called only once (and unconditionally) in gcmoptions(), > instead of (attempts at) doing this multiple times in a for loop. > > Marko > > > > + (void)in_leavegroup(inm, imf); > > + if (ifp) > > + CURVNET_RESTORE(); > > if (imf) > > imf_purge(imf); > > } > > > > From owner-svn-src-head@freebsd.org Mon May 21 08:13:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21BD8EE7D61; Mon, 21 May 2018 08:13:33 +0000 (UTC) (envelope-from zec@fer.hr) Received: from mail.fer.hr (mail.fer.hr [161.53.72.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.fer.hr", Issuer "TERENA SSL CA 3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91BA57317E; Mon, 21 May 2018 08:13:32 +0000 (UTC) (envelope-from zec@fer.hr) Received: from x23.koncar-institut.local (161.53.98.245) by MAIL.fer.hr (161.53.72.233) with Microsoft SMTP Server (TLS) id 14.3.399.0; Mon, 21 May 2018 10:13:30 +0200 Date: Mon, 21 May 2018 10:14:23 +0200 From: Marko Zec To: Matthew Macy CC: , , Subject: Re: svn commit: r333967 - head/sys/netinet Message-ID: <20180521101423.5fd869be@x23.koncar-institut.local> In-Reply-To: References: <201805210712.w4L7C62h081191@repo.freebsd.org> <20180521094734.3270cccb@x23.koncar-institut.local> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; amd64-portbld-freebsd11.1) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [161.53.98.245] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 08:13:33 -0000 On Mon, 21 May 2018 01:03:53 -0700 Matthew Macy wrote: > On Mon, May 21, 2018 at 00:47 Marko Zec wrote: > > On Mon, 21 May 2018 07:12:06 +0000 Matt Macy wrote: ... > > > + if (ifp) > > > + CURVNET_SET(ifp->if_vnet); > > > > Unfortunately, this won't work because CURVNET_SET() expands to a > > sequence of declarations and assignments which are NOT enclosed in a > > single block. Instead, only the first statement in CURVNET_SET() > > sequence, which is an assert, will be executed conditionally only if > > ifp != NULL, while the rest of the CURVNET_SET() body will fall out > > of the scope of the if (ifp) conditional. > > That's pretty counter to the way macros are done _everywhere_ else in > the kernel. Agreed, unfortunately it is. > You should probably fix that. This problem was discussed on numerous occasions but no better / more convenient and workable proposals come up so far. Bjoern clearly documented and emphasized this problem in vnet(9). Marko > > > > I'd recommend backing out this patch, and instead extending the > > struct ip_moptions with an struct vnet * entry, which would be > > populated before scheduling inp_gcmoptions(). Then > > CURVNET_SET(imo->imo_vnet) could be called only once (and > > unconditionally) in gcmoptions(), instead of (attempts at) doing > > this multiple times in a for loop. > > > > Marko > > > > > > > + (void)in_leavegroup(inm, imf); > > > + if (ifp) > > > + CURVNET_RESTORE(); > > > if (imf) > > > imf_purge(imf); > > > } > > > > > > > From owner-svn-src-head@freebsd.org Mon May 21 08:34:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEE56EE8382; Mon, 21 May 2018 08:34:11 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60D2773C16; Mon, 21 May 2018 08:34:11 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41DF2228FC; Mon, 21 May 2018 08:34:11 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L8YBqL022950; Mon, 21 May 2018 08:34:11 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L8YAcD022948; Mon, 21 May 2018 08:34:10 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805210834.w4L8YAcD022948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Mon, 21 May 2018 08:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333968 - in head/sys: netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: netinet netinet6 X-SVN-Commit-Revision: 333968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 08:34:12 -0000 Author: mmacy Date: Mon May 21 08:34:10 2018 New Revision: 333968 URL: https://svnweb.freebsd.org/changeset/base/333968 Log: in(6)_mcast: Expand out vnet set / restore macro so that they work in a conditional block Reported by: zec at fer.hr Modified: head/sys/netinet/in_mcast.c head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Mon May 21 07:12:06 2018 (r333967) +++ head/sys/netinet/in_mcast.c Mon May 21 08:34:10 2018 (r333968) @@ -653,6 +653,7 @@ inm_release(struct in_multi *inm) { struct ifmultiaddr *ifma; struct ifnet *ifp; + struct vnet *saved_vnet; CTR2(KTR_IGMPV3, "%s: refcount is %d", __func__, inm->inm_refcount); MPASS(inm->inm_refcount == 0); @@ -663,14 +664,16 @@ inm_release(struct in_multi *inm) /* XXX this access is not covered by IF_ADDR_LOCK */ CTR2(KTR_IGMPV3, "%s: purging ifma %p", __func__, ifma); - if (ifp) - CURVNET_SET(ifp->if_vnet); + if (ifp) { + saved_vnet = curvnet; + curvnet = ifp->if_vnet; + } inm_purge(inm); free(inm, M_IPMADDR); if_delmulti_ifma_flags(ifma, 1); if (ifp) { - CURVNET_RESTORE(); + curvnet = saved_vnet; if_rele(ifp); } } @@ -1666,6 +1669,7 @@ inp_gcmoptions(epoch_context_t ctx) struct in_mfilter *imf; struct in_multi *inm; struct ifnet *ifp; + struct vnet *saved_vnet; size_t idx, nmships; imo = __containerof(ctx, struct ip_moptions, imo_epoch_ctx); @@ -1677,11 +1681,13 @@ inp_gcmoptions(epoch_context_t ctx) imf_leave(imf); inm = imo->imo_membership[idx]; ifp = inm->inm_ifp; - if (ifp) - CURVNET_SET(ifp->if_vnet); + if (ifp) { + saved_vnet = curvnet; + curvnet = ifp->if_vnet; + } (void)in_leavegroup(inm, imf); if (ifp) - CURVNET_RESTORE(); + curvnet = saved_vnet; if (imf) imf_purge(imf); } Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Mon May 21 07:12:06 2018 (r333967) +++ head/sys/netinet6/in6_mcast.c Mon May 21 08:34:10 2018 (r333968) @@ -524,6 +524,7 @@ in6m_release(struct in6_multi *inm) { struct ifmultiaddr *ifma; struct ifnet *ifp; + struct vnet *saved_vnet; CTR2(KTR_MLD, "%s: refcount is %d", __func__, inm->in6m_refcount); @@ -539,14 +540,16 @@ in6m_release(struct in6_multi *inm) KASSERT(ifma->ifma_protospec == NULL, ("%s: ifma_protospec != NULL", __func__)); - if (ifp) - CURVNET_SET(ifp->if_vnet); + if (ifp) { + saved_vnet = curvnet; + curvnet = ifp->if_vnet; + } in6m_purge(inm); free(inm, M_IP6MADDR); if_delmulti_ifma_flags(ifma, 1); if (ifp) { - CURVNET_RESTORE(); + curvnet = saved_vnet; if_rele(ifp); } } @@ -1628,6 +1631,7 @@ inp_gcmoptions(epoch_context_t ctx) struct in6_mfilter *imf; struct in6_multi *inm; struct ifnet *ifp; + struct vnet *saved_vnet; size_t idx, nmships; imo = __containerof(ctx, struct ip6_moptions, imo6_epoch_ctx); @@ -1639,11 +1643,13 @@ inp_gcmoptions(epoch_context_t ctx) im6f_leave(imf); inm = imo->im6o_membership[idx]; ifp = inm->in6m_ifp; - if (ifp) - CURVNET_SET(ifp->if_vnet); + if (ifp) { + saved_vnet = curvnet; + curvnet = ifp->if_vnet; + } (void)in6_leavegroup(inm, imf); if (ifp) - CURVNET_RESTORE(); + curvnet = saved_vnet; if (imf) im6f_purge(imf); } From owner-svn-src-head@freebsd.org Mon May 21 08:54:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2BB5EE8C9F; Mon, 21 May 2018 08:54:22 +0000 (UTC) (envelope-from zec@fer.hr) Received: from mail.fer.hr (mail.fer.hr [161.53.72.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.fer.hr", Issuer "TERENA SSL CA 3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6159F7483F; Mon, 21 May 2018 08:54:22 +0000 (UTC) (envelope-from zec@fer.hr) Received: from x23.koncar-institut.local (161.53.98.245) by MAIL.fer.hr (161.53.72.233) with Microsoft SMTP Server (TLS) id 14.3.399.0; Mon, 21 May 2018 10:54:19 +0200 Date: Mon, 21 May 2018 10:55:12 +0200 From: Marko Zec To: Matt Macy CC: , , Subject: Re: svn commit: r333968 - in head/sys: netinet netinet6 Message-ID: <20180521105512.375c8a36@x23.koncar-institut.local> In-Reply-To: <201805210834.w4L8YAcD022948@repo.freebsd.org> References: <201805210834.w4L8YAcD022948@repo.freebsd.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; amd64-portbld-freebsd11.1) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [161.53.98.245] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 08:54:23 -0000 On Mon, 21 May 2018 08:34:10 +0000 Matt Macy wrote: > Author: mmacy > Date: Mon May 21 08:34:10 2018 > New Revision: 333968 > URL: https://svnweb.freebsd.org/changeset/base/333968 > > Log: > in(6)_mcast: Expand out vnet set / restore macro so that they work > in a conditional block > Reported by: zec at fer.hr > > Modified: > head/sys/netinet/in_mcast.c > head/sys/netinet6/in6_mcast.c > > Modified: head/sys/netinet/in_mcast.c > ============================================================================== > --- head/sys/netinet/in_mcast.c Mon May 21 07:12:06 > 2018 (r333967) +++ head/sys/netinet/in_mcast.c Mon May > 21 08:34:10 2018 (r333968) @@ -653,6 +653,7 @@ > inm_release(struct in_multi *inm) { > struct ifmultiaddr *ifma; > struct ifnet *ifp; > + struct vnet *saved_vnet; > > CTR2(KTR_IGMPV3, "%s: refcount is %d", __func__, > inm->inm_refcount); MPASS(inm->inm_refcount == 0); > @@ -663,14 +664,16 @@ inm_release(struct in_multi *inm) > > /* XXX this access is not covered by IF_ADDR_LOCK */ > CTR2(KTR_IGMPV3, "%s: purging ifma %p", __func__, ifma); > - if (ifp) > - CURVNET_SET(ifp->if_vnet); > + if (ifp) { > + saved_vnet = curvnet; > + curvnet = ifp->if_vnet; > + } Uhmm... please don't do this, for at least two reasons: 1) so far we could identify all VNET context switches by tracking CURVNET_SET / _RESTORE macros. With this change a non-standard hack is introduced, opening the door for more alternative / creative variations to come, thus increasing the entropy 2) CURVNET_* macros provide elementary capability of tracking vnet recursions, and much more importantly, forgotten or missed context restores. Your change breaks this tracking chain. Is there a reason one could not extend struct in_multi with a struct vnet *inm_vnet entry, populate it on struct in_multi creation, and be done with all curvnet woes in a clean way? Marko > inm_purge(inm); > free(inm, M_IPMADDR); > > if_delmulti_ifma_flags(ifma, 1); > if (ifp) { > - CURVNET_RESTORE(); > + curvnet = saved_vnet; > if_rele(ifp); > } > } > @@ -1666,6 +1669,7 @@ inp_gcmoptions(epoch_context_t ctx) > struct in_mfilter *imf; > struct in_multi *inm; > struct ifnet *ifp; > + struct vnet *saved_vnet; > size_t idx, nmships; > > imo = __containerof(ctx, struct ip_moptions, imo_epoch_ctx); > @@ -1677,11 +1681,13 @@ inp_gcmoptions(epoch_context_t ctx) > imf_leave(imf); > inm = imo->imo_membership[idx]; > ifp = inm->inm_ifp; > - if (ifp) > - CURVNET_SET(ifp->if_vnet); > + if (ifp) { > + saved_vnet = curvnet; > + curvnet = ifp->if_vnet; > + } > (void)in_leavegroup(inm, imf); > if (ifp) > - CURVNET_RESTORE(); > + curvnet = saved_vnet; > if (imf) > imf_purge(imf); > } > > Modified: head/sys/netinet6/in6_mcast.c > ============================================================================== > --- head/sys/netinet6/in6_mcast.c Mon May 21 07:12:06 > 2018 (r333967) +++ head/sys/netinet6/in6_mcast.c Mon > May 21 08:34:10 2018 (r333968) @@ -524,6 +524,7 @@ > in6m_release(struct in6_multi *inm) { > struct ifmultiaddr *ifma; > struct ifnet *ifp; > + struct vnet *saved_vnet; > > CTR2(KTR_MLD, "%s: refcount is %d", __func__, > inm->in6m_refcount); > @@ -539,14 +540,16 @@ in6m_release(struct in6_multi *inm) > KASSERT(ifma->ifma_protospec == NULL, > ("%s: ifma_protospec != NULL", __func__)); > > - if (ifp) > - CURVNET_SET(ifp->if_vnet); > + if (ifp) { > + saved_vnet = curvnet; > + curvnet = ifp->if_vnet; > + } > in6m_purge(inm); > free(inm, M_IP6MADDR); > > if_delmulti_ifma_flags(ifma, 1); > if (ifp) { > - CURVNET_RESTORE(); > + curvnet = saved_vnet; > if_rele(ifp); > } > } > @@ -1628,6 +1631,7 @@ inp_gcmoptions(epoch_context_t ctx) > struct in6_mfilter *imf; > struct in6_multi *inm; > struct ifnet *ifp; > + struct vnet *saved_vnet; > size_t idx, nmships; > > imo = __containerof(ctx, struct ip6_moptions, > imo6_epoch_ctx); @@ -1639,11 +1643,13 @@ > inp_gcmoptions(epoch_context_t ctx) im6f_leave(imf); > inm = imo->im6o_membership[idx]; > ifp = inm->in6m_ifp; > - if (ifp) > - CURVNET_SET(ifp->if_vnet); > + if (ifp) { > + saved_vnet = curvnet; > + curvnet = ifp->if_vnet; > + } > (void)in6_leavegroup(inm, imf); > if (ifp) > - CURVNET_RESTORE(); > + curvnet = saved_vnet; > if (imf) > im6f_purge(imf); > } > From owner-svn-src-head@freebsd.org Mon May 21 08:56:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CFF6EE8D53; Mon, 21 May 2018 08:56:03 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id EFB8E749AE; Mon, 21 May 2018 08:56:01 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [IPv6:2a02:c7f:1e13:cf00:40a0:9da0:420:834b] (unknown [IPv6:2a02:c7f:1e13:cf00:40a0:9da0:420:834b]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 40D334E775; Mon, 21 May 2018 08:46:33 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: svn commit: r333959 - head/usr.bin/top From: Andrew Turner In-Reply-To: <201805210358.w4L3wFji081505@repo.freebsd.org> Date: Mon, 21 May 2018 09:46:31 +0100 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <9F97F4FF-0148-4889-8825-0237FFD09550@fubar.geek.nz> References: <201805210358.w4L3wFji081505@repo.freebsd.org> To: Eitan Adler X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 08:56:03 -0000 > On 21 May 2018, at 04:58, Eitan Adler wrote: >=20 > Author: eadler > Date: Mon May 21 03:58:15 2018 > New Revision: 333959 > URL: https://svnweb.freebsd.org/changeset/base/333959 >=20 > Log: > top(1): build with WARNS=3D3 >=20 > This fixes everything but > -Wincompatible-pointer-types-discards-qualifiers >=20 > Modified: > head/usr.bin/top/Makefile > head/usr.bin/top/display.c > head/usr.bin/top/display.h > head/usr.bin/top/machine.h > head/usr.bin/top/top.c >=20 > Modified: head/usr.bin/top/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.bin/top/Makefile Mon May 21 03:36:16 2018 = (r333958) > +++ head/usr.bin/top/Makefile Mon May 21 03:58:15 2018 = (r333959) > @@ -7,7 +7,7 @@ SRCS+=3D sigdesc.h top.local.h > CFLAGS+=3D -I ${.OBJDIR} > MAN=3D top.1 >=20 > -WARNS?=3D 2 > +WARNS?=3D 3 >=20 > LIBADD=3D ncursesw m kvm jail >=20 >=20 > Modified: head/usr.bin/top/display.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.bin/top/display.c Mon May 21 03:36:16 2018 = (r333958) > +++ head/usr.bin/top/display.c Mon May 21 03:58:15 2018 = (r333959) > @@ -32,6 +32,7 @@ >=20 > #include > #include > +#include > #include > #include > #include > @@ -1042,14 +1043,16 @@ display_header(int t) > } > } >=20 > -/*VARARGS2*/ > void > -new_message(int type, char *msgfmt, caddr_t a1, caddr_t a2, caddr_t = a3) > +new_message(int type, char *msgfmt, ...) > { > - int i; > + va_list args; > + size_t i; >=20 > + va_start(args, msgfmt); > + > /* first, format the message */ > - snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3); > + snprintf(next_msg, sizeof(next_msg), msgfmt, args); >=20 > if (msglen > 0) > { You missed the call to va_end. You need to call va_end within the same = function, and after you have finished with args. See stdarg(3): Each invocation of va_start() or va_copy() must be paired with a = corresponding invocation of va_end() in the same function. Andrew From owner-svn-src-head@freebsd.org Mon May 21 09:18:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01698EEA7D0; Mon, 21 May 2018 09:18:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A749A75582; Mon, 21 May 2018 09:18:03 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8427622F4B; Mon, 21 May 2018 09:18:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L9I3tY043216; Mon, 21 May 2018 09:18:03 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L9I1G1043208; Mon, 21 May 2018 09:18:01 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210918.w4L9I1G1043208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 09:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333969 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 09:18:04 -0000 Author: eadler Date: Mon May 21 09:18:01 2018 New Revision: 333969 URL: https://svnweb.freebsd.org/changeset/base/333969 Log: top(1): modernize a bit; reduce warnings - Replace caddr_t with "void *". This reduces the number of warnings at WARNS=6 - use "static" where possible - sprinkle const where possible This leaves at WARNS=6: 35 warnings in top.c 72 warnings in machine.c 5 warnings in commands.c all of which are either "incompatible-pointer-types-discards-qualifiers" or "cast-qual" Modified: head/usr.bin/top/Makefile head/usr.bin/top/commands.c head/usr.bin/top/display.c head/usr.bin/top/machine.c head/usr.bin/top/machine.h head/usr.bin/top/screen.c head/usr.bin/top/top.c head/usr.bin/top/top.h head/usr.bin/top/username.c Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Mon May 21 08:34:10 2018 (r333968) +++ head/usr.bin/top/Makefile Mon May 21 09:18:01 2018 (r333969) @@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h CFLAGS+= -I ${.OBJDIR} MAN= top.1 -WARNS?= 3 +WARNS?= 6 LIBADD= ncursesw m kvm jail Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Mon May 21 08:34:10 2018 (r333968) +++ head/usr.bin/top/commands.c Mon May 21 09:18:01 2018 (r333969) @@ -177,8 +177,8 @@ int *intp; static struct errs errs[ERRMAX]; static int errcnt; -static char *err_toomany = " too many errors occurred"; -static char *err_listem = +static char err_toomany[] = " too many errors occurred"; +static char err_listem[] = " Many errors occurred. Press `e' to display the list of errors."; /* These macros get used to reset and log the errors */ Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Mon May 21 08:34:10 2018 (r333968) +++ head/usr.bin/top/display.c Mon May 21 09:18:01 2018 (r333969) @@ -588,13 +588,10 @@ for (cpu = 0; cpu < num_cpus; cpu++) { * for i_memory ONLY: cursor is on the previous line */ -char memory_buffer[MAX_COLS]; +static char memory_buffer[MAX_COLS]; void -i_memory(stats) - -int *stats; - +i_memory(int *stats) { fputs("\nMem: ", stdout); lastline++; @@ -605,10 +602,7 @@ int *stats; } void -u_memory(stats) - -int *stats; - +u_memory(int *stats) { static char new[MAX_COLS]; Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 08:34:10 2018 (r333968) +++ head/usr.bin/top/machine.c Mon May 21 09:18:01 2018 (r333969) @@ -53,7 +53,6 @@ #define SMPUNAMELEN 13 #define UPUNAMELEN 15 -extern struct process_select ps; extern struct timeval timeout; static int smpmode; enum displaymodes displaymode; @@ -229,7 +228,7 @@ static int pageshift; /* log base 2 of the pagesize * /* * Sorting orders. The first element is the default. */ -char *ordernames[] = { +static const char *ordernames[] = { "cpu", "size", "res", "time", "pri", "threads", "total", "read", "write", "fault", "vcsw", "ivcsw", "jid", "swap", "pid", NULL @@ -743,7 +742,7 @@ get_io_total(struct kinfo_proc *pp) static struct handle handle; -caddr_t +void * get_process_info(struct system_info *si, struct process_select *sel, int (*compare)(const void *, const void *)) { @@ -910,13 +909,13 @@ get_process_info(struct system_info *si, struct proces /* pass back a handle */ handle.next_proc = pref; handle.remaining = active_procs; - return ((caddr_t)&handle); + return (&handle); } static char fmt[512]; /* static area where result is built */ char * -format_next_process(caddr_t xhandle, char *(*get_userid)(int), int flags) +format_next_process(void * xhandle, char *(*get_userid)(int), int flags) { struct kinfo_proc *pp; const struct kinfo_proc *oldp; Modified: head/usr.bin/top/machine.h ============================================================================== --- head/usr.bin/top/machine.h Mon May 21 08:34:10 2018 (r333968) +++ head/usr.bin/top/machine.h Mon May 21 09:18:01 2018 (r333969) @@ -75,17 +75,18 @@ struct process_select /* routines defined by the machine dependent module */ char *format_header(char *uname_field); -char *format_next_process(caddr_t handle, char *(*get_userid)(int), +char *format_next_process(void * handle, char *(*get_userid)(int), int flags); void toggle_pcpustats(void); void get_system_info(struct system_info *si); int machine_init(struct statics *statics); int proc_owner(int pid); +extern struct process_select ps; /* non-int routines typically used by the machine dependent module */ char *printable(char *string); -caddr_t +void * get_process_info(struct system_info *si, struct process_select *sel, int (*compare)(const void *, const void *)); Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Mon May 21 08:34:10 2018 (r333968) +++ head/usr.bin/top/screen.c Mon May 21 09:18:01 2018 (r333969) @@ -39,18 +39,18 @@ char ch_erase; char ch_kill; char smart_terminal; char PC; -char termcap_buf[1024]; -char string_buffer[1024]; -char home[15]; -char lower_left[15]; +static char termcap_buf[1024]; +static char string_buffer[1024]; +static char home[15]; +static char lower_left[15]; char *clear_line; -char *clear_screen; +static char *clear_screen; char *clear_to_end; char *cursor_motion; -char *start_standout; -char *end_standout; -char *terminal_init; -char *terminal_end; +static char *start_standout; +static char *end_standout; +static char *terminal_init; +static char *terminal_end; static struct termios old_settings; static struct termios new_settings; Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Mon May 21 08:34:10 2018 (r333968) +++ head/usr.bin/top/top.c Mon May 21 09:18:01 2018 (r333969) @@ -40,7 +40,7 @@ /* Size of the stdio buffer given to stdout */ #define Buffersize 2048 -char *copyright = +char copyright[] = "Copyright (c) 1984 through 1996, William LeFebvre"; typedef void sigret_t; @@ -211,7 +211,7 @@ char *argv[]; struct system_info system_info; struct statics statics; - caddr_t processes; + void * processes; static char tempbuf1[50]; static char tempbuf2[50]; Modified: head/usr.bin/top/top.h ============================================================================== --- head/usr.bin/top/top.h Mon May 21 08:34:10 2018 (r333968) +++ head/usr.bin/top/top.h Mon May 21 09:18:01 2018 (r333969) @@ -53,7 +53,7 @@ extern int (*compares[])(const void*, const void*); char* kill_procs(char *); char* renice_procs(char *); -extern char *copyright; +extern char copyright[]; /* internal routines */ void quit(int); Modified: head/usr.bin/top/username.c ============================================================================== --- head/usr.bin/top/username.c Mon May 21 08:34:10 2018 (r333968) +++ head/usr.bin/top/username.c Mon May 21 09:18:01 2018 (r333969) @@ -56,7 +56,7 @@ struct hash_el { /* K&R requires that statically declared tables be initialized to zero. */ /* We depend on that for hash_table and YOUR compiler had BETTER do it! */ -struct hash_el hash_table[Table_size]; +static struct hash_el hash_table[Table_size]; char *username(uid) From owner-svn-src-head@freebsd.org Mon May 21 09:20:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14A25EEA96B; Mon, 21 May 2018 09:20:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCF81757C1; Mon, 21 May 2018 09:20:28 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A37122F4F; Mon, 21 May 2018 09:20:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L9KSie043375; Mon, 21 May 2018 09:20:28 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L9KQPc043367; Mon, 21 May 2018 09:20:26 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210920.w4L9KQPc043367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 09:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333970 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 09:20:29 -0000 Author: eadler Date: Mon May 21 09:20:26 2018 New Revision: 333970 URL: https://svnweb.freebsd.org/changeset/base/333970 Log: Revert r333969 which contained one too many changes Modified: head/usr.bin/top/Makefile head/usr.bin/top/commands.c head/usr.bin/top/display.c head/usr.bin/top/machine.c head/usr.bin/top/machine.h head/usr.bin/top/screen.c head/usr.bin/top/top.c head/usr.bin/top/top.h head/usr.bin/top/username.c Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Mon May 21 09:18:01 2018 (r333969) +++ head/usr.bin/top/Makefile Mon May 21 09:20:26 2018 (r333970) @@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h CFLAGS+= -I ${.OBJDIR} MAN= top.1 -WARNS?= 6 +WARNS?= 3 LIBADD= ncursesw m kvm jail Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Mon May 21 09:18:01 2018 (r333969) +++ head/usr.bin/top/commands.c Mon May 21 09:20:26 2018 (r333970) @@ -177,8 +177,8 @@ int *intp; static struct errs errs[ERRMAX]; static int errcnt; -static char err_toomany[] = " too many errors occurred"; -static char err_listem[] = +static char *err_toomany = " too many errors occurred"; +static char *err_listem = " Many errors occurred. Press `e' to display the list of errors."; /* These macros get used to reset and log the errors */ Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Mon May 21 09:18:01 2018 (r333969) +++ head/usr.bin/top/display.c Mon May 21 09:20:26 2018 (r333970) @@ -588,10 +588,13 @@ for (cpu = 0; cpu < num_cpus; cpu++) { * for i_memory ONLY: cursor is on the previous line */ -static char memory_buffer[MAX_COLS]; +char memory_buffer[MAX_COLS]; void -i_memory(int *stats) +i_memory(stats) + +int *stats; + { fputs("\nMem: ", stdout); lastline++; @@ -602,7 +605,10 @@ i_memory(int *stats) } void -u_memory(int *stats) +u_memory(stats) + +int *stats; + { static char new[MAX_COLS]; Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 09:18:01 2018 (r333969) +++ head/usr.bin/top/machine.c Mon May 21 09:20:26 2018 (r333970) @@ -53,6 +53,7 @@ #define SMPUNAMELEN 13 #define UPUNAMELEN 15 +extern struct process_select ps; extern struct timeval timeout; static int smpmode; enum displaymodes displaymode; @@ -228,7 +229,7 @@ static int pageshift; /* log base 2 of the pagesize * /* * Sorting orders. The first element is the default. */ -static const char *ordernames[] = { +char *ordernames[] = { "cpu", "size", "res", "time", "pri", "threads", "total", "read", "write", "fault", "vcsw", "ivcsw", "jid", "swap", "pid", NULL @@ -742,7 +743,7 @@ get_io_total(struct kinfo_proc *pp) static struct handle handle; -void * +caddr_t get_process_info(struct system_info *si, struct process_select *sel, int (*compare)(const void *, const void *)) { @@ -909,13 +910,13 @@ get_process_info(struct system_info *si, struct proces /* pass back a handle */ handle.next_proc = pref; handle.remaining = active_procs; - return (&handle); + return ((caddr_t)&handle); } static char fmt[512]; /* static area where result is built */ char * -format_next_process(void * xhandle, char *(*get_userid)(int), int flags) +format_next_process(caddr_t xhandle, char *(*get_userid)(int), int flags) { struct kinfo_proc *pp; const struct kinfo_proc *oldp; Modified: head/usr.bin/top/machine.h ============================================================================== --- head/usr.bin/top/machine.h Mon May 21 09:18:01 2018 (r333969) +++ head/usr.bin/top/machine.h Mon May 21 09:20:26 2018 (r333970) @@ -75,18 +75,17 @@ struct process_select /* routines defined by the machine dependent module */ char *format_header(char *uname_field); -char *format_next_process(void * handle, char *(*get_userid)(int), +char *format_next_process(caddr_t handle, char *(*get_userid)(int), int flags); void toggle_pcpustats(void); void get_system_info(struct system_info *si); int machine_init(struct statics *statics); int proc_owner(int pid); -extern struct process_select ps; /* non-int routines typically used by the machine dependent module */ char *printable(char *string); -void * +caddr_t get_process_info(struct system_info *si, struct process_select *sel, int (*compare)(const void *, const void *)); Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Mon May 21 09:18:01 2018 (r333969) +++ head/usr.bin/top/screen.c Mon May 21 09:20:26 2018 (r333970) @@ -39,18 +39,18 @@ char ch_erase; char ch_kill; char smart_terminal; char PC; -static char termcap_buf[1024]; -static char string_buffer[1024]; -static char home[15]; -static char lower_left[15]; +char termcap_buf[1024]; +char string_buffer[1024]; +char home[15]; +char lower_left[15]; char *clear_line; -static char *clear_screen; +char *clear_screen; char *clear_to_end; char *cursor_motion; -static char *start_standout; -static char *end_standout; -static char *terminal_init; -static char *terminal_end; +char *start_standout; +char *end_standout; +char *terminal_init; +char *terminal_end; static struct termios old_settings; static struct termios new_settings; Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Mon May 21 09:18:01 2018 (r333969) +++ head/usr.bin/top/top.c Mon May 21 09:20:26 2018 (r333970) @@ -40,7 +40,7 @@ /* Size of the stdio buffer given to stdout */ #define Buffersize 2048 -char copyright[] = +char *copyright = "Copyright (c) 1984 through 1996, William LeFebvre"; typedef void sigret_t; @@ -211,7 +211,7 @@ char *argv[]; struct system_info system_info; struct statics statics; - void * processes; + caddr_t processes; static char tempbuf1[50]; static char tempbuf2[50]; Modified: head/usr.bin/top/top.h ============================================================================== --- head/usr.bin/top/top.h Mon May 21 09:18:01 2018 (r333969) +++ head/usr.bin/top/top.h Mon May 21 09:20:26 2018 (r333970) @@ -53,7 +53,7 @@ extern int (*compares[])(const void*, const void*); char* kill_procs(char *); char* renice_procs(char *); -extern char copyright[]; +extern char *copyright; /* internal routines */ void quit(int); Modified: head/usr.bin/top/username.c ============================================================================== --- head/usr.bin/top/username.c Mon May 21 09:18:01 2018 (r333969) +++ head/usr.bin/top/username.c Mon May 21 09:20:26 2018 (r333970) @@ -56,7 +56,7 @@ struct hash_el { /* K&R requires that statically declared tables be initialized to zero. */ /* We depend on that for hash_table and YOUR compiler had BETTER do it! */ -static struct hash_el hash_table[Table_size]; +struct hash_el hash_table[Table_size]; char *username(uid) From owner-svn-src-head@freebsd.org Mon May 21 09:21:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C6BEEEAA0D; Mon, 21 May 2018 09:21:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D66E2759C8; Mon, 21 May 2018 09:21:42 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B888B22F9F; Mon, 21 May 2018 09:21:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L9LgG5045613; Mon, 21 May 2018 09:21:42 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L9LgV0045612; Mon, 21 May 2018 09:21:42 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210921.w4L9LgV0045612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 09:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333971 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 09:21:43 -0000 Author: eadler Date: Mon May 21 09:21:42 2018 New Revision: 333971 URL: https://svnweb.freebsd.org/changeset/base/333971 Log: Add missing va_end Reported by: andrew Modified: head/usr.bin/top/display.c Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Mon May 21 09:20:26 2018 (r333970) +++ head/usr.bin/top/display.c Mon May 21 09:21:42 2018 (r333971) @@ -1020,6 +1020,8 @@ new_message(int type, char *msgfmt, ...) /* first, format the message */ snprintf(next_msg, sizeof(next_msg), msgfmt, args); + va_end(args); + if (msglen > 0) { /* message there already -- can we clear it? */ From owner-svn-src-head@freebsd.org Mon May 21 09:25:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95C5BEEAC6A; Mon, 21 May 2018 09:25:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47C1875D4C; Mon, 21 May 2018 09:25:23 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23C32230DF; Mon, 21 May 2018 09:25:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L9PMff048011; Mon, 21 May 2018 09:25:22 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L9PLjW048005; Mon, 21 May 2018 09:25:21 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210925.w4L9PLjW048005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 09:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333972 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 09:25:23 -0000 Author: eadler Date: Mon May 21 09:25:21 2018 New Revision: 333972 URL: https://svnweb.freebsd.org/changeset/base/333972 Log: top(1): modernize a bit; reduce warnings - Replace caddr_t with "void *". This reduces the number of warnings at WARNS=6 - use "static" where possible - sprinkle const where possible This leaves at WARNS=6: 35 warnings in top.c 88 warnings in machine.c 7 warnings in commands.c all of which are either "incompatible-pointer-types-discards-qualifiers" or "cast-qual" Modified: head/usr.bin/top/display.c head/usr.bin/top/machine.c head/usr.bin/top/machine.h head/usr.bin/top/screen.c head/usr.bin/top/top.c head/usr.bin/top/top.h head/usr.bin/top/username.c Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Mon May 21 09:21:42 2018 (r333971) +++ head/usr.bin/top/display.c Mon May 21 09:25:21 2018 (r333972) @@ -588,13 +588,10 @@ for (cpu = 0; cpu < num_cpus; cpu++) { * for i_memory ONLY: cursor is on the previous line */ -char memory_buffer[MAX_COLS]; +static char memory_buffer[MAX_COLS]; void -i_memory(stats) - -int *stats; - +i_memory(int *stats) { fputs("\nMem: ", stdout); lastline++; @@ -605,10 +602,7 @@ int *stats; } void -u_memory(stats) - -int *stats; - +u_memory(int *stats) { static char new[MAX_COLS]; Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 09:21:42 2018 (r333971) +++ head/usr.bin/top/machine.c Mon May 21 09:25:21 2018 (r333972) @@ -53,7 +53,6 @@ #define SMPUNAMELEN 13 #define UPUNAMELEN 15 -extern struct process_select ps; extern struct timeval timeout; static int smpmode; enum displaymodes displaymode; @@ -743,7 +742,7 @@ get_io_total(struct kinfo_proc *pp) static struct handle handle; -caddr_t +void * get_process_info(struct system_info *si, struct process_select *sel, int (*compare)(const void *, const void *)) { Modified: head/usr.bin/top/machine.h ============================================================================== --- head/usr.bin/top/machine.h Mon May 21 09:21:42 2018 (r333971) +++ head/usr.bin/top/machine.h Mon May 21 09:25:21 2018 (r333972) @@ -84,8 +84,9 @@ int proc_owner(int pid); /* non-int routines typically used by the machine dependent module */ char *printable(char *string); +extern struct process_select ps; -caddr_t +void * get_process_info(struct system_info *si, struct process_select *sel, int (*compare)(const void *, const void *)); Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Mon May 21 09:21:42 2018 (r333971) +++ head/usr.bin/top/screen.c Mon May 21 09:25:21 2018 (r333972) @@ -39,18 +39,18 @@ char ch_erase; char ch_kill; char smart_terminal; char PC; -char termcap_buf[1024]; -char string_buffer[1024]; -char home[15]; -char lower_left[15]; +static char termcap_buf[1024]; +static char string_buffer[1024]; +static char home[15]; +static char lower_left[15]; char *clear_line; -char *clear_screen; +static char *clear_screen; char *clear_to_end; char *cursor_motion; -char *start_standout; -char *end_standout; -char *terminal_init; -char *terminal_end; +static char *start_standout; +static char *end_standout; +static char *terminal_init; +static char *terminal_end; static struct termios old_settings; static struct termios new_settings; Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Mon May 21 09:21:42 2018 (r333971) +++ head/usr.bin/top/top.c Mon May 21 09:25:21 2018 (r333972) @@ -40,7 +40,7 @@ /* Size of the stdio buffer given to stdout */ #define Buffersize 2048 -char *copyright = +char copyright[] = "Copyright (c) 1984 through 1996, William LeFebvre"; typedef void sigret_t; @@ -211,7 +211,7 @@ char *argv[]; struct system_info system_info; struct statics statics; - caddr_t processes; + void * processes; static char tempbuf1[50]; static char tempbuf2[50]; Modified: head/usr.bin/top/top.h ============================================================================== --- head/usr.bin/top/top.h Mon May 21 09:21:42 2018 (r333971) +++ head/usr.bin/top/top.h Mon May 21 09:25:21 2018 (r333972) @@ -53,7 +53,7 @@ extern int (*compares[])(const void*, const void*); char* kill_procs(char *); char* renice_procs(char *); -extern char *copyright; +extern char copyright[]; /* internal routines */ void quit(int); Modified: head/usr.bin/top/username.c ============================================================================== --- head/usr.bin/top/username.c Mon May 21 09:21:42 2018 (r333971) +++ head/usr.bin/top/username.c Mon May 21 09:25:21 2018 (r333972) @@ -56,7 +56,7 @@ struct hash_el { /* K&R requires that statically declared tables be initialized to zero. */ /* We depend on that for hash_table and YOUR compiler had BETTER do it! */ -struct hash_el hash_table[Table_size]; +static struct hash_el hash_table[Table_size]; char *username(uid) From owner-svn-src-head@freebsd.org Mon May 21 09:32:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F10A9EEAFAA; Mon, 21 May 2018 09:32:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0C7F764EC; Mon, 21 May 2018 09:32:52 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8202623271; Mon, 21 May 2018 09:32:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L9WqGB053940; Mon, 21 May 2018 09:32:52 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L9WqJZ053939; Mon, 21 May 2018 09:32:52 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210932.w4L9WqJZ053939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 09:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333973 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 09:32:53 -0000 Author: eadler Date: Mon May 21 09:32:52 2018 New Revision: 333973 URL: https://svnweb.freebsd.org/changeset/base/333973 Log: top(1): clean up some "const" related warnings This leaves at WARNS=6: 35 warnings in top.c 88 warnings in machine.c all of which are either "incompatible-pointer-types-discards-qualifiers" or "cast-qual" Modified: head/usr.bin/top/commands.c Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Mon May 21 09:25:21 2018 (r333972) +++ head/usr.bin/top/commands.c Mon May 21 09:32:52 2018 (r333973) @@ -177,8 +177,8 @@ int *intp; static struct errs errs[ERRMAX]; static int errcnt; -static char *err_toomany = " too many errors occurred"; -static char *err_listem = +static char err_toomany[] = " too many errors occurred"; +static char err_listem[] = " Many errors occurred. Press `e' to display the list of errors."; /* These macros get used to reset and log the errors */ @@ -364,6 +364,11 @@ show_errors() } } +static char no_proc_specified[] = " no processes specified"; +static char invalid_signal_number[] = " invalid_signal_number"; +static char bad_signal_name[] = " bad signal name"; +static char bad_pri_value[] = " bad priority value"; + /* * kill_procs(str) - send signals to processes, much like the "kill" * command does; invoked in response to 'k'. @@ -392,7 +397,7 @@ kill_procs(char *str) /* explicit signal specified */ if ((nptr = next_field(str)) == NULL) { - return(" kill: no processes specified"); + return(no_proc_specified); } if (isdigit(str[1])) @@ -400,7 +405,7 @@ kill_procs(char *str) scanint(str + 1, &signum); if (signum <= 0 || signum >= NSIG) { - return(" invalid signal number"); + return(invalid_signal_number); } } else @@ -418,7 +423,7 @@ kill_procs(char *str) /* was it ever found */ if (sigp->name == NULL) { - return(" bad signal name"); + return(bad_signal_name); } } /* put the new pointer in place */ @@ -487,13 +492,13 @@ renice_procs(char *str) /* check for validity */ if (procnum == -1 || prio < PRIO_MIN || prio > PRIO_MAX) { - return(" bad priority value"); + return(bad_pri_value); } /* move to the first process number */ if ((str = next_field(str)) == NULL) { - return(" no processes specified"); + return(no_proc_specified); } /* loop thru the process numbers, renicing each one */ From owner-svn-src-head@freebsd.org Mon May 21 09:43:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66D81EEB54D; Mon, 21 May 2018 09:43:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 099A076B34; Mon, 21 May 2018 09:43:52 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D95B723419; Mon, 21 May 2018 09:43:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L9hp8d058864; Mon, 21 May 2018 09:43:51 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L9hpXl058860; Mon, 21 May 2018 09:43:51 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210943.w4L9hpXl058860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 09:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333974 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 09:43:52 -0000 Author: eadler Date: Mon May 21 09:43:50 2018 New Revision: 333974 URL: https://svnweb.freebsd.org/changeset/base/333974 Log: top(1): fix build Remove 'top.local.hs'. This was not noticed since /srv/obj/fbsd/srv/src/freebsd/svn/head/amd64.amd64/usr.bin/top/top.local.h existed locally on my machine despite "make clean". Only fully removing the objdir allowed me to observe the error directly. Pointyhat to: me Modified: head/usr.bin/top/Makefile head/usr.bin/top/display.c head/usr.bin/top/top.c head/usr.bin/top/username.c Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Mon May 21 09:32:52 2018 (r333973) +++ head/usr.bin/top/Makefile Mon May 21 09:43:50 2018 (r333974) @@ -2,8 +2,7 @@ PROG= top SRCS= commands.c display.c machine.c screen.c top.c \ - username.c utils.c -SRCS+= sigdesc.h top.local.h + username.c utils.c sigdesc.h CFLAGS+= -I ${.OBJDIR} MAN= top.1 Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Mon May 21 09:32:52 2018 (r333973) +++ head/usr.bin/top/display.c Mon May 21 09:43:50 2018 (r333974) @@ -44,7 +44,6 @@ #include "layout.h" /* defines for screen position layout */ #include "display.h" #include "top.h" -#include "top.local.h" #include "boolean.h" #include "machine.h" /* we should eliminate this!!! */ #include "utils.h" Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Mon May 21 09:32:52 2018 (r333973) +++ head/usr.bin/top/top.c Mon May 21 09:43:50 2018 (r333974) @@ -31,7 +31,6 @@ #include "display.h" /* interface to display package */ #include "screen.h" /* interface to screen package */ #include "top.h" -#include "top.local.h" #include "boolean.h" #include "machine.h" #include "utils.h" Modified: head/usr.bin/top/username.c ============================================================================== --- head/usr.bin/top/username.c Mon May 21 09:32:52 2018 (r333973) +++ head/usr.bin/top/username.c Mon May 21 09:43:50 2018 (r333974) @@ -37,7 +37,6 @@ #include #include -#include "top.local.h" #include "utils.h" #include "username.h" From owner-svn-src-head@freebsd.org Mon May 21 11:49:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91FC4EEDD75; Mon, 21 May 2018 11:49:22 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FFA079EB8; Mon, 21 May 2018 11:49:22 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x236.google.com with SMTP id e20-v6so13953072iof.4; Mon, 21 May 2018 04:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=AkrVJeDcN7VAhF6AaNZ54P7OCYewaradIhF/s5I01U8=; b=l1YTOXK04Q5ydI3HO3Og3PSajcYLUav3cOpssbc1hH9mbfeF0aQfwC638f5BkXKG+6 G/OEWhJj78oGKvvxInGwQWA6tYhKCA74IET76xdhz9EpncNiMYSHbHSSgT71mojLSYMm O4yehWmO3RPfLnFm8MTPa3xcGdZe78HB04AMYrChy9XENHPnekt0TF9Q3qYD3n69lMRy sgrYrE4Dj2CJjtG1ARuqD+naLV74wL4OjJHdg0VPv3eOWrG5tXu1qt0hvNKlXNsM6sIt ZgNlrRtIuOgr7AFgHvbVhQoyGqwUlWbaH+9rORHseYWyrDHpKe6GZWLtjCnCieWj8R41 KXnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=AkrVJeDcN7VAhF6AaNZ54P7OCYewaradIhF/s5I01U8=; b=Xkmi0WU1xC9vX8L9TjsG0YtteKmnqqM3lQ4IxyNkGfhynZDGAcBa2u0/3uOupeQCrp GnqWVAAuCmD6qF/1IxXzBWv9VYhoqU7rbWSwOJxlfxg+OhosyRO1uBpjMvyMS5yRoC1d Gg1q3ImJvoKwQ0QUrBE4ViFh4oqtu4dDSwmjx4dzx4Yz6slNkJn3AdHqCokkka95WZcQ 8cL2lDtQV+Hw39gS8guG6XU2EwPRYMwPqKAzJiyf1/3ONjmiDeaLb91udn1wKhvojeNV lcR0l520K3ydXa0amUSqpU/WVZhvYMws3LhaN3rTh6axtBg5WHgGXFzk478ooVMaADy2 rXvQ== X-Gm-Message-State: ALKqPwd5P4cH/awMbH1Sn/AeUCCavk3sSqT8I9Fq/ZuV2fw35MErFL6V SW1zW9Tp/sdqkQzAGbnRR3dYRX8s2kz94EWcgA0u5Q== X-Google-Smtp-Source: AB8JxZpkUSr7fkn64iNtNSEDiXWt8Cggs2+UFkQ/jRd3mvEPUUddtdq7+nFcEzcHZhMFqXiI54pn0osO0NYxGoHB3B4= X-Received: by 2002:a6b:2f95:: with SMTP id v21-v6mr7093019iov.239.1526903361419; Mon, 21 May 2018 04:49:21 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.130.167 with HTTP; Mon, 21 May 2018 04:49:01 -0700 (PDT) In-Reply-To: <20180521105512.375c8a36@x23.koncar-institut.local> References: <201805210834.w4L8YAcD022948@repo.freebsd.org> <20180521105512.375c8a36@x23.koncar-institut.local> From: Ed Maste Date: Mon, 21 May 2018 07:49:01 -0400 X-Google-Sender-Auth: XQ3cmNBd9fr5MQAQs8RMKADLbPQ Message-ID: Subject: Re: svn commit: r333968 - in head/sys: netinet netinet6 To: Marko Zec Cc: Matt Macy , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 11:49:22 -0000 On 21 May 2018 at 04:55, Marko Zec wrote: > On Mon, 21 May 2018 08:34:10 +0000 > Matt Macy wrote: > >> Author: mmacy >> Date: Mon May 21 08:34:10 2018 >> New Revision: 333968 >> URL: https://svnweb.freebsd.org/changeset/base/333968 >> >> Log: >> in(6)_mcast: Expand out vnet set / restore macro so that they work >> in a conditional block >> Reported by: zec at fer.hr >> > > Uhmm... please don't do this, for at least two reasons: After r333968 the build is also broken on all archs but amd64 and i386. From owner-svn-src-head@freebsd.org Mon May 21 11:56:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39D9BEEE00D; Mon, 21 May 2018 11:56:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEF407A42D; Mon, 21 May 2018 11:56:07 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAF44248D4; Mon, 21 May 2018 11:56:07 +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 w4LBu7Au024668; Mon, 21 May 2018 11:56:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LBu7Th024666; Mon, 21 May 2018 11:56:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805211156.w4LBu7Th024666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 21 May 2018 11:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333975 - in head/sys: netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: netinet netinet6 X-SVN-Commit-Revision: 333975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 11:56:08 -0000 Author: emaste Date: Mon May 21 11:56:07 2018 New Revision: 333975 URL: https://svnweb.freebsd.org/changeset/base/333975 Log: Revert r333968, it broke all archs but i386 and amd64 Modified: head/sys/netinet/in_mcast.c head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Mon May 21 09:43:50 2018 (r333974) +++ head/sys/netinet/in_mcast.c Mon May 21 11:56:07 2018 (r333975) @@ -653,7 +653,6 @@ inm_release(struct in_multi *inm) { struct ifmultiaddr *ifma; struct ifnet *ifp; - struct vnet *saved_vnet; CTR2(KTR_IGMPV3, "%s: refcount is %d", __func__, inm->inm_refcount); MPASS(inm->inm_refcount == 0); @@ -664,16 +663,14 @@ inm_release(struct in_multi *inm) /* XXX this access is not covered by IF_ADDR_LOCK */ CTR2(KTR_IGMPV3, "%s: purging ifma %p", __func__, ifma); - if (ifp) { - saved_vnet = curvnet; - curvnet = ifp->if_vnet; - } + if (ifp) + CURVNET_SET(ifp->if_vnet); inm_purge(inm); free(inm, M_IPMADDR); if_delmulti_ifma_flags(ifma, 1); if (ifp) { - curvnet = saved_vnet; + CURVNET_RESTORE(); if_rele(ifp); } } @@ -1669,7 +1666,6 @@ inp_gcmoptions(epoch_context_t ctx) struct in_mfilter *imf; struct in_multi *inm; struct ifnet *ifp; - struct vnet *saved_vnet; size_t idx, nmships; imo = __containerof(ctx, struct ip_moptions, imo_epoch_ctx); @@ -1681,13 +1677,11 @@ inp_gcmoptions(epoch_context_t ctx) imf_leave(imf); inm = imo->imo_membership[idx]; ifp = inm->inm_ifp; - if (ifp) { - saved_vnet = curvnet; - curvnet = ifp->if_vnet; - } + if (ifp) + CURVNET_SET(ifp->if_vnet); (void)in_leavegroup(inm, imf); if (ifp) - curvnet = saved_vnet; + CURVNET_RESTORE(); if (imf) imf_purge(imf); } Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Mon May 21 09:43:50 2018 (r333974) +++ head/sys/netinet6/in6_mcast.c Mon May 21 11:56:07 2018 (r333975) @@ -524,7 +524,6 @@ in6m_release(struct in6_multi *inm) { struct ifmultiaddr *ifma; struct ifnet *ifp; - struct vnet *saved_vnet; CTR2(KTR_MLD, "%s: refcount is %d", __func__, inm->in6m_refcount); @@ -540,16 +539,14 @@ in6m_release(struct in6_multi *inm) KASSERT(ifma->ifma_protospec == NULL, ("%s: ifma_protospec != NULL", __func__)); - if (ifp) { - saved_vnet = curvnet; - curvnet = ifp->if_vnet; - } + if (ifp) + CURVNET_SET(ifp->if_vnet); in6m_purge(inm); free(inm, M_IP6MADDR); if_delmulti_ifma_flags(ifma, 1); if (ifp) { - curvnet = saved_vnet; + CURVNET_RESTORE(); if_rele(ifp); } } @@ -1631,7 +1628,6 @@ inp_gcmoptions(epoch_context_t ctx) struct in6_mfilter *imf; struct in6_multi *inm; struct ifnet *ifp; - struct vnet *saved_vnet; size_t idx, nmships; imo = __containerof(ctx, struct ip6_moptions, imo6_epoch_ctx); @@ -1643,13 +1639,11 @@ inp_gcmoptions(epoch_context_t ctx) im6f_leave(imf); inm = imo->im6o_membership[idx]; ifp = inm->in6m_ifp; - if (ifp) { - saved_vnet = curvnet; - curvnet = ifp->if_vnet; - } + if (ifp) + CURVNET_SET(ifp->if_vnet); (void)in6_leavegroup(inm, imf); if (ifp) - curvnet = saved_vnet; + CURVNET_RESTORE(); if (imf) im6f_purge(imf); } From owner-svn-src-head@freebsd.org Mon May 21 11:58:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C928EEE0EA; Mon, 21 May 2018 11:58:03 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DF207A5AF; Mon, 21 May 2018 11:58:03 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE9D3248D5; Mon, 21 May 2018 11:58:02 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LBw22I024796; Mon, 21 May 2018 11:58:02 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LBw27E024795; Mon, 21 May 2018 11:58:02 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201805211158.w4LBw27E024795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 21 May 2018 11:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333976 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 333976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 11:58:03 -0000 Author: manu Date: Mon May 21 11:58:02 2018 New Revision: 333976 URL: https://svnweb.freebsd.org/changeset/base/333976 Log: release: arm64: Use loader.efi as bootaa64.efi for RPI3 and PINE64 boot1.efi have some trouble to read MBR partitions, it needs them to be aligned a certain way while loader.efi can cope with them either way. We want to switch to loader.efi as the main efi loader everywhere, it seems that arm64 using MBR partition will be the guinea pig. Tested On: RPI3, Pine64 Reviewed by: imp Approved by: gjb Modified: head/release/arm64/PINE64.conf head/release/arm64/RPI3.conf Modified: head/release/arm64/PINE64.conf ============================================================================== --- head/release/arm64/PINE64.conf Mon May 21 11:56:07 2018 (r333975) +++ head/release/arm64/PINE64.conf Mon May 21 11:58:02 2018 (r333976) @@ -34,7 +34,7 @@ arm_install_uboot() { BOOTFILES="$(chroot ${CHROOTDIR} realpath ${BOOTFILES})" chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT - chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/boot1/boot1.efi \ + chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/loader/loader.efi \ ${FATMOUNT}/EFI/BOOT/bootaa64.efi chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Mon May 21 11:56:07 2018 (r333975) +++ head/release/arm64/RPI3.conf Mon May 21 11:58:02 2018 (r333976) @@ -54,7 +54,7 @@ arm_install_uboot() { BOOTFILES="$(chroot ${CHROOTDIR} realpath ${BOOTFILES})" chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT - chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/boot1/boot1.efi \ + chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/loader/loader.efi \ ${FATMOUNT}/EFI/BOOT/bootaa64.efi chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync From owner-svn-src-head@freebsd.org Mon May 21 11:59:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A0A9EEE1C7; Mon, 21 May 2018 11:59:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C87C7A775; Mon, 21 May 2018 11:59:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 44745260112; Mon, 21 May 2018 13:59:26 +0200 (CEST) Subject: Re: svn commit: r333968 - in head/sys: netinet netinet6 To: Ed Maste , Marko Zec Cc: Matt Macy , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805210834.w4L8YAcD022948@repo.freebsd.org> <20180521105512.375c8a36@x23.koncar-institut.local> From: Hans Petter Selasky Message-ID: Date: Mon, 21 May 2018 13:59:15 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 11:59:28 -0000 On 05/21/18 13:49, Ed Maste wrote: > After r333968 the build is also broken on all archs but amd64 and i386. It looks like amd64 and i386 build with VIMAGE enabled by default, while the others not. 12-current. So both VIMAGE and non-VIMAGE should be tested. --HPS From owner-svn-src-head@freebsd.org Mon May 21 13:08:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEC8DEF0938; Mon, 21 May 2018 13:08:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BDD97D337; Mon, 21 May 2018 13:08:45 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 52453253F0; Mon, 21 May 2018 13:08:45 +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 w4LD8jOT061277; Mon, 21 May 2018 13:08:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LD8jQT061276; Mon, 21 May 2018 13:08:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805211308.w4LD8jQT061276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 21 May 2018 13:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333978 - in head/sys: netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: netinet netinet6 X-SVN-Commit-Revision: 333978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 13:08:46 -0000 Author: emaste Date: Mon May 21 13:08:44 2018 New Revision: 333978 URL: https://svnweb.freebsd.org/changeset/base/333978 Log: Pair CURVNET_SET and CURVNET_RESTORE in a block Per vnet(9), CURVNET_SET and CURVNET_RESTORE cannot be used as a single statement for a conditional and CURVNET_RESTORE must be in the same block as CURVNET_SET (or a subblock). Reviewed by: andrew Sponsored by: The FreeBSD Foundation Modified: head/sys/netinet/in_mcast.c head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Mon May 21 13:08:18 2018 (r333977) +++ head/sys/netinet/in_mcast.c Mon May 21 13:08:44 2018 (r333978) @@ -663,15 +663,17 @@ inm_release(struct in_multi *inm) /* XXX this access is not covered by IF_ADDR_LOCK */ CTR2(KTR_IGMPV3, "%s: purging ifma %p", __func__, ifma); - if (ifp) + if (ifp != NULL) { CURVNET_SET(ifp->if_vnet); - inm_purge(inm); - free(inm, M_IPMADDR); - - if_delmulti_ifma_flags(ifma, 1); - if (ifp) { + inm_purge(inm); + free(inm, M_IPMADDR); + if_delmulti_ifma_flags(ifma, 1); CURVNET_RESTORE(); if_rele(ifp); + } else { + inm_purge(inm); + free(inm, M_IPMADDR); + if_delmulti_ifma_flags(ifma, 1); } } @@ -1677,11 +1679,13 @@ inp_gcmoptions(epoch_context_t ctx) imf_leave(imf); inm = imo->imo_membership[idx]; ifp = inm->inm_ifp; - if (ifp) + if (ifp != NULL) { CURVNET_SET(ifp->if_vnet); - (void)in_leavegroup(inm, imf); - if (ifp) + (void)in_leavegroup(inm, imf); CURVNET_RESTORE(); + } else { + (void)in_leavegroup(inm, imf); + } if (imf) imf_purge(imf); } Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Mon May 21 13:08:18 2018 (r333977) +++ head/sys/netinet6/in6_mcast.c Mon May 21 13:08:44 2018 (r333978) @@ -539,15 +539,17 @@ in6m_release(struct in6_multi *inm) KASSERT(ifma->ifma_protospec == NULL, ("%s: ifma_protospec != NULL", __func__)); - if (ifp) + if (ifp != NULL) { CURVNET_SET(ifp->if_vnet); - in6m_purge(inm); - free(inm, M_IP6MADDR); - - if_delmulti_ifma_flags(ifma, 1); - if (ifp) { + in6m_purge(inm); + free(inm, M_IP6MADDR); + if_delmulti_ifma_flags(ifma, 1); CURVNET_RESTORE(); if_rele(ifp); + } else { + in6m_purge(inm); + free(inm, M_IP6MADDR); + if_delmulti_ifma_flags(ifma, 1); } } @@ -1639,11 +1641,13 @@ inp_gcmoptions(epoch_context_t ctx) im6f_leave(imf); inm = imo->im6o_membership[idx]; ifp = inm->in6m_ifp; - if (ifp) + if (ifp != NULL) { CURVNET_SET(ifp->if_vnet); - (void)in6_leavegroup(inm, imf); - if (ifp) + (void)in6_leavegroup(inm, imf); CURVNET_RESTORE(); + } else { + (void)in6_leavegroup(inm, imf); + } if (imf) im6f_purge(imf); } From owner-svn-src-head@freebsd.org Mon May 21 13:15:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46293EF0E96; Mon, 21 May 2018 13:15:45 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B390C7D858; Mon, 21 May 2018 13:15:44 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wm0-x235.google.com with SMTP id a8-v6so25246546wmg.5; Mon, 21 May 2018 06:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wfZhKmfUFVBzb1gzVlMPqiuCBFvPXBD4DMd9VkgZ2r8=; b=XRlG+PnooAao6Iq4Xuyq++9vTKHC8U0rGgCjW4ddiTXh8lKPIr9xchswHPKgKhxo2t 78m8eJpXwRZtQxbNENVh3p9CcHSwnUHZO2nUcGxXzovhdinFFONfptNe0V5e6ieHoXRl QSTE0tBVolnKsftwKO1bnxlKVcdryaun6Mc3M743Gd9PwGEeMDj+WkiIVc73bbwVvhzA xF3em/miTUJFlwiQyEuNOsuTU9STEB0RqabBuxI9SvPJOBVvMwgUhxtlQ9gT98MHRhJy 5bRZX15B3qBXLGzBYtJM/KfbxdkvZo7Ct5Pz/l3nlvhZKOCHlRbGfTqOmtorExAOXiWl stYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wfZhKmfUFVBzb1gzVlMPqiuCBFvPXBD4DMd9VkgZ2r8=; b=hK7v1gDjx3KSWpVqf2+Fe8kES8S6TW3cPPJqBN2OVN2D2bUCKJWfa9sR6kXjeObj1/ VA7T1aWWPiUiJf+A0niz3jDOb4T7c/VFVpUfZ6xs9uBpTnqkdzOtAHLyGXV3HEKch9sS mGQQxEfMK1+Cg36+SRROeIVN20zrXjp/yzklPHoKCEeLTmlChEQE/mVFEPB3+D0TDmFO TsZxbNk/ejki87u7RS5BLiNJqFk13eZFyFZJLFaPprzefnl5JNt1Q0hIk5zyOw5KYInE sLrvSFDC9MoeXakg+bcLIhFh5UVwI+gtPlWWkXkXiXCakM/4NYMrHDa91Fzr80mb79BU P5VA== X-Gm-Message-State: ALKqPweZFadyKnntsw8ln4iPkipdj/yOA1/haW+4F1c+6XuUCMK8GQvo a3pZ6im4DgTIwxsKbKA7HoaoLmE2JcraImDsB0F8Yg== X-Google-Smtp-Source: AB8JxZo6u/RisNvhDHTEYQbArUPHchIp0Yzr8VxTU+d8eqQvSrIRF64tlSWto+ozxoi97ZKo4japStf3LJA4lX6Z9dw= X-Received: by 2002:a1c:3b87:: with SMTP id i129-v6mr11480495wma.51.1526908543502; Mon, 21 May 2018 06:15:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.197.4 with HTTP; Mon, 21 May 2018 06:15:42 -0700 (PDT) In-Reply-To: <201805200227.w4K2Rwhh007423@repo.freebsd.org> References: <201805200227.w4K2Rwhh007423@repo.freebsd.org> From: Jonathan Looney Date: Mon, 21 May 2018 09:15:42 -0400 Message-ID: Subject: Re: svn commit: r333911 - head/sys/netinet To: Matt Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 13:15:45 -0000 On Sat, May 19, 2018 at 10:27 PM, Matt Macy wrote: > + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb > *), M_TEMP, M_WAITOK|M_ZERO); > + inp_list = il->il_inp_list; > Why does this need M_ZERO? Jonathan From owner-svn-src-head@freebsd.org Mon May 21 13:54:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6966EF1A48; Mon, 21 May 2018 13:54:50 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5137EA15; Mon, 21 May 2018 13:54:49 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wm0-f52.google.com with SMTP id a67-v6so25352552wmf.3; Mon, 21 May 2018 06:54:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8id7mhg7Rh873030XhOfVYKAuW/VRt2gt4DFQfv6Ew4=; b=kUWDr3RQJfk5b8XsNOyOQlFTaNc8uehCZH/es7CvaoEurfPWsrWjN1+oq4Ibzr8vXh ORfDq7wUEMkHxorqXM8GoFJQwcEyGuIi/CN0396MLUq1LqIZYMsVX9IbYh0zvT0vQ8hl 1xCxIz7whODWxz5ESoASkNb/FzhK4k2v3tBRxeO8q0bofteTaFkwpUemmxzMsARW0YyW kymLvIIyGBxxqPDnznpuDe+aXOgCdwhHmB90qr/qJBs9GE1dUu3TuUpAIm8vuP02nbya whcVFbjEVc0aGBpaDLa8hn7XHKAHGFCrbxMHlsa6Ee13uXiwFVbVtUHOXL3HIOwox33+ +zGg== X-Gm-Message-State: ALKqPwe5X68hMbauRo5dYkCjx0NPwABZivVHdZsqZzvWwHFQ/MmRSj3N l2FERFGnIFyezWf67EakVpgS2nFC X-Google-Smtp-Source: AB8JxZrZvLzz9teyu7f1yerqbOC4rwls03y24eeNH5qHDKDGY2G8G4EBe/aTwNFllof5KkbH0nx8Ew== X-Received: by 2002:a50:9ea3:: with SMTP id a32-v6mr24500798edf.78.1526910882695; Mon, 21 May 2018 06:54:42 -0700 (PDT) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com. [74.125.82.41]) by smtp.gmail.com with ESMTPSA id c10-v6sm7265331edq.13.2018.05.21.06.54.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 06:54:42 -0700 (PDT) Received: by mail-wm0-f41.google.com with SMTP id o78-v6so26856957wmg.0; Mon, 21 May 2018 06:54:42 -0700 (PDT) X-Received: by 2002:a1c:618b:: with SMTP id v133-v6mr10883675wmb.75.1526910882377; Mon, 21 May 2018 06:54:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.197.4 with HTTP; Mon, 21 May 2018 06:54:41 -0700 (PDT) In-Reply-To: <201805200438.w4K4c4BQ073120@repo.freebsd.org> References: <201805200438.w4K4c4BQ073120@repo.freebsd.org> From: "Jonathan T. Looney" Date: Mon, 21 May 2018 09:54:41 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333915 - head/sys/netinet To: Matt Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 13:54:51 -0000 Summary: I'm not sure this addresses all the subtleties of INPCB destruction. I think it would benefit from wider review. I suggest it be reverted in the meantime. On Sun, May 20, 2018 at 12:38 AM, Matt Macy wrote: > + > +/* > + * Unconditionally schedule an inpcb to be freed by decrementing its > + * reference count, which should occur only after the inpcb has been > detached > + * from its socket. If another thread holds a temporary reference > (acquired > + * using in_pcbref()) then the free is deferred until that reference is > + * released using in_pcbrele(), but the inpcb is still unlocked. Almost > all > + * work, including removal from global lists, is done in this context, > where > + * the pcbinfo lock is held. > + */ > +void > +in_pcbfree(struct inpcb *inp) > +{ > + struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; > + > + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", > __func__)); > + KASSERT((inp->inp_flags2 & INP_FREED) == 0, > + ("%s: called twice for pcb %p", __func__, inp)); > + if (inp->inp_flags2 & INP_FREED) { > INP_WUNLOCK(inp); > + return; > + } > This check no longer serves its purpose; however, I believe it points to a deeper problem: INP_FREED is not set until the deferred epoch context. So, other threads may not know that another thread has already called in_pcbfree. This changes things, such as the behavior of in_pcbrele_[rw]locked(). In the worst case, if someone calls in_pcbfree() twice, the two calls to in_pcbremlists() will result in running `LIST_REMOVE(inp, inp_list)` twice, resulting in memory corruption. I haven't undertaken to audit all the code. However, the fact that in_pcbrele_[rw]locked() will no longer immediately return 1 may change logic such that this is now possible. > + > +#ifdef INVARIANTS > + if (pcbinfo == &V_tcbinfo) { > + INP_INFO_LOCK_ASSERT(pcbinfo); > + } else { > + INP_INFO_WLOCK_ASSERT(pcbinfo); > + } > +#endif > + INP_WLOCK_ASSERT(inp); > + /* Remove first from list */ > + INP_LIST_WLOCK(pcbinfo); > + inp->inp_gencnt = ++pcbinfo->ipi_gencnt; > + in_pcbremlists(inp); > in_pcbremlists() also increments inp->inp_gencnt(); therefore, it is not necessary to increment it above. > + INP_LIST_WUNLOCK(pcbinfo); > + RO_INVALIDATE_CACHE(&inp->inp_route); > + INP_WUNLOCK(inp); > + epoch_call(net_epoch_preempt, &inp->inp_epoch_ctx, > in_pcbfree_deferred); > } > > /* > > Modified: head/sys/netinet/in_pcb.h > ============================================================ > ================== > --- head/sys/netinet/in_pcb.h Sun May 20 04:32:48 2018 (r333914) > +++ head/sys/netinet/in_pcb.h Sun May 20 04:38:04 2018 (r333915) > @@ -328,6 +328,7 @@ struct inpcb { > LIST_ENTRY(inpcb) inp_list; /* (p/l) list for all PCBs for > proto */ > /* (p[w]) for list iteration */ > /* (p[r]/l) for addition/removal */ > + struct epoch_context inp_epoch_ctx; > }; > #endif /* _KERNEL */ > > > From owner-svn-src-head@freebsd.org Mon May 21 14:01:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 246C1EF1D56 for ; Mon, 21 May 2018 14:01:24 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A11297EE46 for ; Mon, 21 May 2018 14:01:23 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6fb703f3-5cff-11e8-8837-614b7c574d04 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 6fb703f3-5cff-11e8-8837-614b7c574d04; Mon, 21 May 2018 14:01:20 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w4LE1J0A095057; Mon, 21 May 2018 08:01:19 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1526911279.32688.67.camel@freebsd.org> Subject: Re: svn commit: r333959 - head/usr.bin/top From: Ian Lepore To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 21 May 2018 08:01:19 -0600 In-Reply-To: <9F97F4FF-0148-4889-8825-0237FFD09550@fubar.geek.nz> References: <201805210358.w4L3wFji081505@repo.freebsd.org> <9F97F4FF-0148-4889-8825-0237FFD09550@fubar.geek.nz> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 14:01:24 -0000 On Mon, 2018-05-21 at 09:46 +0100, Andrew Turner wrote: > > > > > On 21 May 2018, at 04:58, Eitan Adler wrote: > > > > Author: eadler > > Date: Mon May 21 03:58:15 2018 > > New Revision: 333959 > > URL: https://svnweb.freebsd.org/changeset/base/333959 > > > > Log: > >  top(1): build with WARNS=3 > > > >  This fixes everything but > >  -Wincompatible-pointer-types-discards-qualifiers > > > > Modified: > >  head/usr.bin/top/Makefile > >  head/usr.bin/top/display.c > >  head/usr.bin/top/display.h > >  head/usr.bin/top/machine.h > >  head/usr.bin/top/top.c > > > > Modified: head/usr.bin/top/Makefile > > ============================================================================== > > --- head/usr.bin/top/Makefile Mon May 21 03:36:16 2018 (r333958) > > +++ head/usr.bin/top/Makefile Mon May 21 03:58:15 2018 (r333959) > > @@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h > > CFLAGS+= -I ${.OBJDIR} > > MAN= top.1 > > > > -WARNS?= 2 > > +WARNS?= 3 > > > > LIBADD= ncursesw m kvm jail > > > > > > Modified: head/usr.bin/top/display.c > > ============================================================================== > > --- head/usr.bin/top/display.c Mon May 21 03:36:16 2018 (r333958) > > +++ head/usr.bin/top/display.c Mon May 21 03:58:15 2018 (r333959) > > @@ -32,6 +32,7 @@ > > > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -1042,14 +1043,16 @@ display_header(int t) > >     } > > } > > > > -/*VARARGS2*/ > > void > > -new_message(int type, char *msgfmt, caddr_t a1, caddr_t a2, caddr_t a3) > > +new_message(int type, char *msgfmt, ...) > > { > > -    int i; > > +    va_list args; > > +    size_t i; > > > > +    va_start(args, msgfmt); > > + > >     /* first, format the message */ > > -    snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3); > > +    snprintf(next_msg, sizeof(next_msg), msgfmt, args); > > > >     if (msglen > 0) > >     { > You missed the call to va_end. You need to call va_end within the same function, and after you have finished with args. See stdarg(3): > > Each invocation of va_start() or va_copy() must be paired with a corresponding invocation of va_end() in the same function. > > Andrew Also, you can't pass a va_list to snprintf(), it needs to be vsnprintf(). And new_message() should now have a __printf_like attribute. -- Ian From owner-svn-src-head@freebsd.org Mon May 21 14:51:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AEFAEF3058; Mon, 21 May 2018 14:51:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 307B880700; Mon, 21 May 2018 14:51:21 +0000 (UTC) (envelope-from tuexen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12D432642A; Mon, 21 May 2018 14:51:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LEpKUg016806; Mon, 21 May 2018 14:51:20 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LEpKah016805; Mon, 21 May 2018 14:51:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201805211451.w4LEpKah016805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 21 May 2018 14:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333979 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 333979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 14:51:21 -0000 Author: tuexen Date: Mon May 21 14:51:20 2018 New Revision: 333979 URL: https://svnweb.freebsd.org/changeset/base/333979 Log: Make clear why there is an assignment, which is not necessary. Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Mon May 21 13:08:44 2018 (r333978) +++ head/sys/netinet/sctp_indata.c Mon May 21 14:51:20 2018 (r333979) @@ -1671,8 +1671,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc struct sctp_nets *net, uint32_t *high_tsn, int *abort_flag, int *break_flag, int last_chunk, uint8_t chk_type) { - /* Process a data chunk */ - struct sctp_tmit_chunk *chk = NULL; + struct sctp_tmit_chunk *chk = NULL; /* make gcc happy */ uint32_t tsn, fsn, gap, mid; struct mbuf *dmbuf; int the_len; From owner-svn-src-head@freebsd.org Mon May 21 14:52:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 362E3EF30E1; Mon, 21 May 2018 14:52:19 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8BFC80A04; Mon, 21 May 2018 14:52:18 +0000 (UTC) (envelope-from tuexen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA28826581; Mon, 21 May 2018 14:52:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LEqIE6016883; Mon, 21 May 2018 14:52:18 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LEqIWp016882; Mon, 21 May 2018 14:52:18 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201805211452.w4LEqIWp016882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 21 May 2018 14:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333980 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 333980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 14:52:19 -0000 Author: tuexen Date: Mon May 21 14:52:18 2018 New Revision: 333980 URL: https://svnweb.freebsd.org/changeset/base/333980 Log: Do the appropriate accounting when ip_output() fails. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon May 21 14:51:20 2018 (r333979) +++ head/sys/netinet/sctp_output.c Mon May 21 14:52:18 2018 (r333980) @@ -11030,9 +11030,8 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad struct sctp_chunkhdr *ch; #if defined(INET) || defined(INET6) struct udphdr *udp; - int ret __unused; #endif - int len, cause_len, padding_len; + int ret, len, cause_len, padding_len; #ifdef INET struct sockaddr_in *src_sin, *dst_sin; struct ip *ip; @@ -11259,9 +11258,13 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad SCTP_LTRACE_ERR_RET_PKT(mout, NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT); return; } + SCTPDBG(SCTP_DEBUG_OUTPUT3, "return from send is %d\n", ret); SCTP_STAT_INCR(sctps_sendpackets); SCTP_STAT_INCR_COUNTER64(sctps_outpackets); SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks); + if (ret) { + SCTP_STAT_INCR(sctps_senderrors); + } return; } From owner-svn-src-head@freebsd.org Mon May 21 14:53:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74F6AEF319C; Mon, 21 May 2018 14:53:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2169A80BA4; Mon, 21 May 2018 14:53:23 +0000 (UTC) (envelope-from tuexen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01F8E26595; Mon, 21 May 2018 14:53:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LErMTu016969; Mon, 21 May 2018 14:53:22 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LErMoW016968; Mon, 21 May 2018 14:53:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201805211453.w4LErMoW016968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 21 May 2018 14:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333981 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 333981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 14:53:23 -0000 Author: tuexen Date: Mon May 21 14:53:22 2018 New Revision: 333981 URL: https://svnweb.freebsd.org/changeset/base/333981 Log: Only fillin data srucuture when actually stored. Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon May 21 14:52:18 2018 (r333980) +++ head/sys/netinet/sctputil.c Mon May 21 14:53:22 2018 (r333981) @@ -72,7 +72,8 @@ extern const struct sctp_ss_functions sctp_ss_function void sctp_sblog(struct sockbuf *sb, struct sctp_tcb *stcb, int from, int incr) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.sb.stcb = stcb; sctp_clog.x.sb.so_sbcc = sb->sb_cc; @@ -88,12 +89,14 @@ sctp_sblog(struct sockbuf *sb, struct sctp_tcb *stcb, sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_closing(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int16_t loc) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.close.inp = (void *)inp; sctp_clog.x.close.sctp_flags = inp->sctp_flags; @@ -112,12 +115,14 @@ sctp_log_closing(struct sctp_inpcb *inp, struct sctp_t sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void rto_logging(struct sctp_nets *net, int from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; memset(&sctp_clog, 0, sizeof(sctp_clog)); sctp_clog.x.rto.net = (void *)net; @@ -129,12 +134,14 @@ rto_logging(struct sctp_nets *net, int from) sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t tsn, uint16_t sseq, uint16_t stream, int from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.strlog.stcb = stcb; sctp_clog.x.strlog.n_tsn = tsn; @@ -149,12 +156,14 @@ sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_nagle_event(struct sctp_tcb *stcb, int action) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.nagle.stcb = (void *)stcb; sctp_clog.x.nagle.total_flight = stcb->asoc.total_flight; @@ -168,12 +177,14 @@ sctp_log_nagle_event(struct sctp_tcb *stcb, int action sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_sack(uint32_t old_cumack, uint32_t cumack, uint32_t tsn, uint16_t gaps, uint16_t dups, int from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.sack.cumack = cumack; sctp_clog.x.sack.oldcumack = old_cumack; @@ -187,12 +198,14 @@ sctp_log_sack(uint32_t old_cumack, uint32_t cumack, ui sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_map(uint32_t map, uint32_t cum, uint32_t high, int from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; memset(&sctp_clog, 0, sizeof(sctp_clog)); sctp_clog.x.map.base = map; @@ -205,12 +218,14 @@ sctp_log_map(uint32_t map, uint32_t cum, uint32_t high sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn, int from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; memset(&sctp_clog, 0, sizeof(sctp_clog)); sctp_clog.x.fr.largest_tsn = biggest_tsn; @@ -223,13 +238,15 @@ sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } #ifdef SCTP_MBUF_LOGGING void sctp_log_mb(struct mbuf *m, int from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.mb.mp = m; sctp_clog.x.mb.mbuf_flags = (uint8_t)(SCTP_BUF_GET_FLAGS(m)); @@ -249,6 +266,7 @@ sctp_log_mb(struct mbuf *m, int from) sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void @@ -265,7 +283,8 @@ sctp_log_mbc(struct mbuf *m, int from) void sctp_log_strm_del(struct sctp_queued_to_read *control, struct sctp_queued_to_read *poschk, int from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; if (control == NULL) { SCTP_PRINTF("Gak log of NULL?\n"); @@ -289,12 +308,14 @@ sctp_log_strm_del(struct sctp_queued_to_read *control, sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net, int augment, uint8_t from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.cwnd.net = net; if (stcb->asoc.send_queue_cnt > 255) @@ -324,12 +345,14 @@ sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; memset(&sctp_clog, 0, sizeof(sctp_clog)); if (inp) { @@ -368,12 +391,14 @@ sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *net, int error, int burst, uint8_t from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; memset(&sctp_clog, 0, sizeof(sctp_clog)); sctp_clog.x.cwnd.net = net; @@ -395,12 +420,14 @@ sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_n sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_rwnd(uint8_t from, uint32_t peers_rwnd, uint32_t snd_size, uint32_t overhead) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.rwnd.rwnd = peers_rwnd; sctp_clog.x.rwnd.send_size = snd_size; @@ -413,12 +440,14 @@ sctp_log_rwnd(uint8_t from, uint32_t peers_rwnd, uint3 sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_rwnd_set(uint8_t from, uint32_t peers_rwnd, uint32_t flight_size, uint32_t overhead, uint32_t a_rwndval) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.rwnd.rwnd = peers_rwnd; sctp_clog.x.rwnd.send_size = flight_size; @@ -431,13 +460,15 @@ sctp_log_rwnd_set(uint8_t from, uint32_t peers_rwnd, u sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } #ifdef SCTP_MBCNT_LOGGING static void sctp_log_mbcnt(uint8_t from, uint32_t total_oq, uint32_t book, uint32_t total_mbcnt_q, uint32_t mbcnt) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.mbcnt.total_queue_size = total_oq; sctp_clog.x.mbcnt.size_change = book; @@ -450,22 +481,26 @@ sctp_log_mbcnt(uint8_t from, uint32_t total_oq, uint32 sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } #endif void sctp_misc_ints(uint8_t from, uint32_t a, uint32_t b, uint32_t c, uint32_t d) { +#if defined(SCTP_LOCAL_TRACE_BUF) SCTP_CTR6(KTR_SCTP, "SCTP:%d[%d]:%x-%x-%x-%x", SCTP_LOG_MISC_EVENT, from, a, b, c, d); +#endif } void sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t wake_cnt, int from) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.wake.stcb = (void *)stcb; sctp_clog.x.wake.wake_cnt = wake_cnt; @@ -506,12 +541,14 @@ sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t wake_c sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } void sctp_log_block(uint8_t from, struct sctp_association *asoc, size_t sendlen) { - struct sctp_cwnd_log sctp_clog __unused; +#if defined(SCTP_LOCAL_TRACE_BUF) + struct sctp_cwnd_log sctp_clog; sctp_clog.x.blk.onsb = asoc->total_output_queue_size; sctp_clog.x.blk.send_sent_qcnt = (uint16_t)(asoc->send_queue_cnt + asoc->sent_queue_cnt); @@ -527,6 +564,7 @@ sctp_log_block(uint8_t from, struct sctp_association * sctp_clog.x.misc.log2, sctp_clog.x.misc.log3, sctp_clog.x.misc.log4); +#endif } int From owner-svn-src-head@freebsd.org Mon May 21 15:06:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2418EF3712; Mon, 21 May 2018 15:06:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 774CE818B0; Mon, 21 May 2018 15:06:22 +0000 (UTC) (envelope-from trasz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5885C2673F; Mon, 21 May 2018 15:06:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LF6MKI023236; Mon, 21 May 2018 15:06:22 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LF6JeQ023224; Mon, 21 May 2018 15:06:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201805211506.w4LF6JeQ023224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 21 May 2018 15:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333982 - head/sys/dev/usb/template X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/dev/usb/template X-SVN-Commit-Revision: 333982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 15:06:23 -0000 Author: trasz Date: Mon May 21 15:06:19 2018 New Revision: 333982 URL: https://svnweb.freebsd.org/changeset/base/333982 Log: Use USB Vendor Identifiers and Product Identifiers provided by V-USB (https://github.com/obdev/v-usb/blob/master/usbdrv/USB-IDs-for-free.txt). Previously we were using an invalid (not assigned to us) VID. Reviewed by: hselasky@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/template/usb_template.h head/sys/dev/usb/template/usb_template_audio.c head/sys/dev/usb/template/usb_template_cdce.c head/sys/dev/usb/template/usb_template_kbd.c head/sys/dev/usb/template/usb_template_midi.c head/sys/dev/usb/template/usb_template_modem.c head/sys/dev/usb/template/usb_template_mouse.c head/sys/dev/usb/template/usb_template_msc.c head/sys/dev/usb/template/usb_template_mtp.c head/sys/dev/usb/template/usb_template_multi.c head/sys/dev/usb/template/usb_template_phone.c head/sys/dev/usb/template/usb_template_serialnet.c Modified: head/sys/dev/usb/template/usb_template.h ============================================================================== --- head/sys/dev/usb/template/usb_template.h Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template.h Mon May 21 15:06:19 2018 (r333982) @@ -33,7 +33,12 @@ #define _USB_TEMPLATE_H_ #ifndef USB_TEMPLATE_VENDOR -#define USB_TEMPLATE_VENDOR 0x0001 +/* + * https://github.com/obdev/v-usb/blob/master/usbdrv/USB-IDs-for-free.txt + */ +#define USB_TEMPLATE_VENDOR 0x16c0 +#define USB_TEMPLATE_MANUFACTURER \ + "The FreeBSD Project (https://www.FreeBSD.org)" #endif typedef const void *(usb_temp_get_string_desc_t)(uint16_t lang_id, uint8_t string_index); Modified: head/sys/dev/usb/template/usb_template_audio.c ============================================================================== --- head/sys/dev/usb/template/usb_template_audio.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_audio.c Mon May 21 15:06:19 2018 (r333982) @@ -79,11 +79,11 @@ enum { }; #define AUDIO_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define AUDIO_DEFAULT_PRODUCT_ID 0x000A +#define AUDIO_DEFAULT_PRODUCT_ID 0x05dc #define AUDIO_DEFAULT_MIXER "Mixer interface" #define AUDIO_DEFAULT_RECORD "Record interface" #define AUDIO_DEFAULT_PLAYBACK "Playback interface" -#define AUDIO_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define AUDIO_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define AUDIO_DEFAULT_PRODUCT "Audio Test Device" #define AUDIO_DEFAULT_SERIAL_NUMBER "March 2008" Modified: head/sys/dev/usb/template/usb_template_cdce.c ============================================================================== --- head/sys/dev/usb/template/usb_template_cdce.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_cdce.c Mon May 21 15:06:19 2018 (r333982) @@ -80,12 +80,12 @@ enum { }; #define ETH_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define ETH_DEFAULT_PRODUCT_ID 0x0001 +#define ETH_DEFAULT_PRODUCT_ID 0x05dc #define ETH_DEFAULT_MAC "2A02030405060789AB" #define ETH_DEFAULT_CONTROL "USB Ethernet Comm Interface" #define ETH_DEFAULT_DATA "USB Ethernet Data Interface" #define ETH_DEFAULT_CONFIG "Default Config" -#define ETH_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define ETH_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define ETH_DEFAULT_PRODUCT "USB Ethernet Adapter" #define ETH_DEFAULT_SERIAL_NUMBER "December 2007" Modified: head/sys/dev/usb/template/usb_template_kbd.c ============================================================================== --- head/sys/dev/usb/template/usb_template_kbd.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_kbd.c Mon May 21 15:06:19 2018 (r333982) @@ -77,9 +77,9 @@ enum { }; #define KBD_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define KBD_DEFAULT_PRODUCT_ID 0x00CB +#define KBD_DEFAULT_PRODUCT_ID 0x27db #define KBD_DEFAULT_INTERFACE "Keyboard Interface" -#define KBD_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define KBD_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define KBD_DEFAULT_PRODUCT "Keyboard Test Device" #define KBD_DEFAULT_SERIAL_NUMBER "March 2008" Modified: head/sys/dev/usb/template/usb_template_midi.c ============================================================================== --- head/sys/dev/usb/template/usb_template_midi.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_midi.c Mon May 21 15:06:19 2018 (r333982) @@ -76,9 +76,9 @@ enum { }; #define MIDI_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define MIDI_DEFAULT_PRODUCT_ID 0x00BB +#define MIDI_DEFAULT_PRODUCT_ID 0x27de #define MIDI_DEFAULT_INTERFACE "MIDI interface" -#define MIDI_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define MIDI_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define MIDI_DEFAULT_PRODUCT "MIDI Test Device" #define MIDI_DEFAULT_SERIAL_NUMBER "March 2008" Modified: head/sys/dev/usb/template/usb_template_modem.c ============================================================================== --- head/sys/dev/usb/template/usb_template_modem.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_modem.c Mon May 21 15:06:19 2018 (r333982) @@ -77,9 +77,9 @@ enum { }; #define MODEM_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define MODEM_DEFAULT_PRODUCT_ID 0x000E +#define MODEM_DEFAULT_PRODUCT_ID 0x27dd #define MODEM_DEFAULT_INTERFACE "Modem interface" -#define MODEM_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define MODEM_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define MODEM_DEFAULT_PRODUCT "Modem Test Device" #define MODEM_DEFAULT_SERIAL_NUMBER "March 2008" Modified: head/sys/dev/usb/template/usb_template_mouse.c ============================================================================== --- head/sys/dev/usb/template/usb_template_mouse.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_mouse.c Mon May 21 15:06:19 2018 (r333982) @@ -77,9 +77,9 @@ enum { }; #define MOUSE_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define MOUSE_DEFAULT_PRODUCT_ID 0x00AE +#define MOUSE_DEFAULT_PRODUCT_ID 0x27da #define MOUSE_DEFAULT_INTERFACE "Mouse interface" -#define MOUSE_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define MOUSE_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define MOUSE_DEFAULT_PRODUCT "Mouse Test Interface" #define MOUSE_DEFAULT_SERIAL_NUMBER "March 2008" Modified: head/sys/dev/usb/template/usb_template_msc.c ============================================================================== --- head/sys/dev/usb/template/usb_template_msc.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_msc.c Mon May 21 15:06:19 2018 (r333982) @@ -77,10 +77,10 @@ enum { }; #define MSC_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define MSC_DEFAULT_PRODUCT_ID 0x0012 +#define MSC_DEFAULT_PRODUCT_ID 0x05dc #define MSC_DEFAULT_INTERFACE "USB Mass Storage Interface" #define MSC_DEFAULT_CONFIGURATION "Default Config" -#define MSC_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define MSC_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define MSC_DEFAULT_PRODUCT "USB Memory Stick" #define MSC_DEFAULT_SERIAL_NUMBER "March 2008" Modified: head/sys/dev/usb/template/usb_template_mtp.c ============================================================================== --- head/sys/dev/usb/template/usb_template_mtp.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_mtp.c Mon May 21 15:06:19 2018 (r333982) @@ -86,10 +86,10 @@ enum { }; #define MTP_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define MTP_DEFAULT_PRODUCT_ID 0x0011 +#define MTP_DEFAULT_PRODUCT_ID 0x05dc #define MTP_DEFAULT_INTERFACE "USB MTP Interface" #define MTP_DEFAULT_CONFIGURATION "Default Config" -#define MTP_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define MTP_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define MTP_DEFAULT_PRODUCT "USB MTP" #define MTP_DEFAULT_SERIAL_NUMBER "June 2008" Modified: head/sys/dev/usb/template/usb_template_multi.c ============================================================================== --- head/sys/dev/usb/template/usb_template_multi.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_multi.c Mon May 21 15:06:19 2018 (r333982) @@ -90,14 +90,14 @@ enum { }; #define MULTI_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define MULTI_DEFAULT_PRODUCT_ID 0x0001 +#define MULTI_DEFAULT_PRODUCT_ID 0x05dc #define MULTI_DEFAULT_MODEM "Virtual serial console" #define MULTI_DEFAULT_ETH_MAC "2A02030405060789AB" #define MULTI_DEFAULT_ETH_CONTROL "Ethernet Comm Interface" #define MULTI_DEFAULT_ETH_DATA "Ethernet Data Interface" #define MULTI_DEFAULT_STORAGE "Mass Storage Interface" #define MULTI_DEFAULT_CONFIGURATION "Default configuration" -#define MULTI_DEFAULT_MANUFACTURER "The FreeBSD Project" +#define MULTI_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define MULTI_DEFAULT_PRODUCT "Multifunction Device" #define MULTI_DEFAULT_SERIAL_NUMBER "May 2018" Modified: head/sys/dev/usb/template/usb_template_phone.c ============================================================================== --- head/sys/dev/usb/template/usb_template_phone.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_phone.c Mon May 21 15:06:19 2018 (r333982) @@ -80,12 +80,12 @@ enum { }; #define PHONE_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define PHONE_DEFAULT_PRODUCT_ID 0xb001 +#define PHONE_DEFAULT_PRODUCT_ID 0x05dc #define PHONE_DEFAULT_MIXER "Mixer interface" #define PHONE_DEFAULT_RECORD "Record interface" #define PHONE_DEFAULT_PLAYBACK "Playback interface" #define PHONE_DEFAULT_HID "HID interface" -#define PHONE_DEFAULT_MANUFACTURER "FreeBSD foundation" +#define PHONE_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define PHONE_DEFAULT_PRODUCT "USB Phone Device" #define PHONE_DEFAULT_SERIAL_NUMBER "March 2008" Modified: head/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- head/sys/dev/usb/template/usb_template_serialnet.c Mon May 21 14:53:22 2018 (r333981) +++ head/sys/dev/usb/template/usb_template_serialnet.c Mon May 21 15:06:19 2018 (r333982) @@ -89,13 +89,13 @@ enum { }; #define SERIALNET_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define SERIALNET_DEFAULT_PRODUCT_ID 0x0001 +#define SERIALNET_DEFAULT_PRODUCT_ID 0x05dc #define SERIALNET_DEFAULT_MODEM "USB Modem Interface" #define SERIALNET_DEFAULT_ETH_MAC "2A02030405060789AB" #define SERIALNET_DEFAULT_ETH_CONTROL "USB Ethernet Comm Interface" #define SERIALNET_DEFAULT_ETH_DATA "USB Ethernet Data Interface" #define SERIALNET_DEFAULT_CONFIGURATION "Default configuration" -#define SERIALNET_DEFAULT_MANUFACTURER "The FreeBSD Project" +#define SERIALNET_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define SERIALNET_DEFAULT_PRODUCT "SERIALNET" #define SERIALNET_DEFAULT_SERIAL_NUMBER "January 2015" From owner-svn-src-head@freebsd.org Mon May 21 16:00:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C31EEEF59E3; Mon, 21 May 2018 16:00:15 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D74C83A62; Mon, 21 May 2018 16:00:15 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 344BF16F48; Mon, 21 May 2018 16:00:15 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f169.google.com with SMTP id a10-v6so14886154ioc.9; Mon, 21 May 2018 09:00:15 -0700 (PDT) X-Gm-Message-State: ALKqPwdb4BWJKj8CY0oefuOCAnSXvSiPByJm6XHvkxy0rT2S1MrX3CiW tYkq8mXr72w+PhbO+brhp3ukDUeHoSLzASFnCNA= X-Google-Smtp-Source: AB8JxZrGxSoJxfKaFRGOPT6pkBaBx7/yNRnIo43baeBDa+PyjLJTtqInOww8M++Py8AJu5ENeDbd06lpdNiwBL3eNAE= X-Received: by 2002:a6b:a712:: with SMTP id q18-v6mr21733117ioe.237.1526918414555; Mon, 21 May 2018 09:00:14 -0700 (PDT) MIME-Version: 1.0 References: <201805210834.w4L8YAcD022948@repo.freebsd.org> <20180521105512.375c8a36@x23.koncar-institut.local> In-Reply-To: From: Matthew Macy Date: Mon, 21 May 2018 09:00:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333968 - in head/sys: netinet netinet6 To: Hans Petter Selasky Cc: Ed Maste , Marko Zec , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 16:00:15 -0000 Sorry about that On Mon, May 21, 2018 at 04:59 Hans Petter Selasky wrote: > On 05/21/18 13:49, Ed Maste wrote: > > After r333968 the build is also broken on all archs but amd64 and i386. > > It looks like amd64 and i386 build with VIMAGE enabled by default, while > the others not. 12-current. So both VIMAGE and non-VIMAGE should be tested. > > --HPS > From owner-svn-src-head@freebsd.org Mon May 21 16:03:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B62EF5CE5; Mon, 21 May 2018 16:03:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F65F84096; Mon, 21 May 2018 16:03:52 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 619D9270C5; Mon, 21 May 2018 16:03:52 +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 w4LG3q87054462; Mon, 21 May 2018 16:03:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LG3qJb054461; Mon, 21 May 2018 16:03:52 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805211603.w4LG3qJb054461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 21 May 2018 16:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333983 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 333983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 16:03:53 -0000 Author: markj Date: Mon May 21 16:03:51 2018 New Revision: 333983 URL: https://svnweb.freebsd.org/changeset/base/333983 Log: Don't pass a section cookie to CK for non-preemptible epoch sections. They're only useful when multiple threads may share an epoch record, and that can't happen with non-preemptible sections. Reviewed by: mmacy Differential Revision: https://reviews.freebsd.org/D15507 Modified: head/sys/kern/subr_epoch.c Modified: head/sys/kern/subr_epoch.c ============================================================================== --- head/sys/kern/subr_epoch.c Mon May 21 15:06:19 2018 (r333982) +++ head/sys/kern/subr_epoch.c Mon May 21 16:03:51 2018 (r333983) @@ -298,18 +298,15 @@ void epoch_enter(epoch_t epoch) { ck_epoch_record_t *record; - ck_epoch_section_t *section; struct thread *td; MPASS(cold || epoch != NULL); - section = NULL; td = curthread; - critical_enter(); - if (__predict_true(td->td_epochnest++ == 0)) - section = (ck_epoch_section_t*)&td->td_epoch_section; + critical_enter(); + td->td_epochnest++; record = &epoch->e_pcpu[curcpu]->eps_record.er_record; - ck_epoch_begin(record, section); + ck_epoch_begin(record, NULL); } void @@ -339,16 +336,12 @@ void epoch_exit(epoch_t epoch) { ck_epoch_record_t *record; - ck_epoch_section_t *section; struct thread *td; - section = NULL; td = curthread; - MPASS(td->td_critnest); - if (__predict_true(td->td_epochnest-- == 1)) - section = (ck_epoch_section_t*)&td->td_epoch_section; + td->td_epochnest--; record = &epoch->e_pcpu[curcpu]->eps_record.er_record; - ck_epoch_end(record, section); + ck_epoch_end(record, NULL); critical_exit(); } From owner-svn-src-head@freebsd.org Mon May 21 16:05:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B64B9EF5DAB; Mon, 21 May 2018 16:05:10 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66394842CE; Mon, 21 May 2018 16:05:10 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 2CF7217043; Mon, 21 May 2018 16:05:10 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f172.google.com with SMTP id g14-v6so14892826ioc.7; Mon, 21 May 2018 09:05:10 -0700 (PDT) X-Gm-Message-State: ALKqPwc5hoFpW0bNE6E0e3u2apVmoQ3dNDxYZhL+btM+97U5EYa86rZN wxwLVzgp1HjAx/QewD1ZYmCTf4y0fd2I/ytsQMU= X-Google-Smtp-Source: AB8JxZrS7/CDfUk2D3N0FolNQxeIr3s93UAYH98FyjovIM/PyPAjgpPXE9FRwbDZ1zruEj3YWD1m3CsbEsOKyy8RYF4= X-Received: by 2002:a6b:a712:: with SMTP id q18-v6mr21759241ioe.237.1526918709700; Mon, 21 May 2018 09:05:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ae:0:0:0:0:0 with HTTP; Mon, 21 May 2018 09:05:09 -0700 (PDT) In-Reply-To: <20180521105512.375c8a36@x23.koncar-institut.local> References: <201805210834.w4L8YAcD022948@repo.freebsd.org> <20180521105512.375c8a36@x23.koncar-institut.local> From: Matthew Macy Date: Mon, 21 May 2018 09:05:09 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333968 - in head/sys: netinet netinet6 To: Marko Zec Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 16:05:11 -0000 Looking closer I think the ifp should always be set. I'll just add an assert to that effect and make it non-conditional. -M On Mon, May 21, 2018 at 1:55 AM, Marko Zec wrote: > On Mon, 21 May 2018 08:34:10 +0000 > Matt Macy wrote: > >> Author: mmacy >> Date: Mon May 21 08:34:10 2018 >> New Revision: 333968 >> URL: https://svnweb.freebsd.org/changeset/base/333968 >> >> Log: >> in(6)_mcast: Expand out vnet set / restore macro so that they work >> in a conditional block >> Reported by: zec at fer.hr >> >> Modified: >> head/sys/netinet/in_mcast.c >> head/sys/netinet6/in6_mcast.c >> >> Modified: head/sys/netinet/in_mcast.c >> ============================================================================== >> --- head/sys/netinet/in_mcast.c Mon May 21 07:12:06 >> 2018 (r333967) +++ head/sys/netinet/in_mcast.c Mon May >> 21 08:34:10 2018 (r333968) @@ -653,6 +653,7 @@ >> inm_release(struct in_multi *inm) { >> struct ifmultiaddr *ifma; >> struct ifnet *ifp; >> + struct vnet *saved_vnet; >> >> CTR2(KTR_IGMPV3, "%s: refcount is %d", __func__, >> inm->inm_refcount); MPASS(inm->inm_refcount == 0); >> @@ -663,14 +664,16 @@ inm_release(struct in_multi *inm) >> >> /* XXX this access is not covered by IF_ADDR_LOCK */ >> CTR2(KTR_IGMPV3, "%s: purging ifma %p", __func__, ifma); >> - if (ifp) >> - CURVNET_SET(ifp->if_vnet); >> + if (ifp) { >> + saved_vnet = curvnet; >> + curvnet = ifp->if_vnet; >> + } > > Uhmm... please don't do this, for at least two reasons: > > 1) so far we could identify all VNET context switches by tracking > CURVNET_SET / _RESTORE macros. With this change a non-standard hack is > introduced, opening the door for more alternative / creative variations > to come, thus increasing the entropy > > 2) CURVNET_* macros provide elementary capability of tracking vnet > recursions, and much more importantly, forgotten or missed context > restores. Your change breaks this tracking chain. > > Is there a reason one could not extend struct in_multi with a struct > vnet *inm_vnet entry, populate it on struct in_multi creation, and be > done with all curvnet woes in a clean way? > > Marko > > >> inm_purge(inm); >> free(inm, M_IPMADDR); >> >> if_delmulti_ifma_flags(ifma, 1); >> if (ifp) { >> - CURVNET_RESTORE(); >> + curvnet = saved_vnet; >> if_rele(ifp); >> } >> } >> @@ -1666,6 +1669,7 @@ inp_gcmoptions(epoch_context_t ctx) >> struct in_mfilter *imf; >> struct in_multi *inm; >> struct ifnet *ifp; >> + struct vnet *saved_vnet; >> size_t idx, nmships; >> >> imo = __containerof(ctx, struct ip_moptions, imo_epoch_ctx); >> @@ -1677,11 +1681,13 @@ inp_gcmoptions(epoch_context_t ctx) >> imf_leave(imf); >> inm = imo->imo_membership[idx]; >> ifp = inm->inm_ifp; >> - if (ifp) >> - CURVNET_SET(ifp->if_vnet); >> + if (ifp) { >> + saved_vnet = curvnet; >> + curvnet = ifp->if_vnet; >> + } >> (void)in_leavegroup(inm, imf); >> if (ifp) >> - CURVNET_RESTORE(); >> + curvnet = saved_vnet; >> if (imf) >> imf_purge(imf); >> } >> >> Modified: head/sys/netinet6/in6_mcast.c >> ============================================================================== >> --- head/sys/netinet6/in6_mcast.c Mon May 21 07:12:06 >> 2018 (r333967) +++ head/sys/netinet6/in6_mcast.c Mon >> May 21 08:34:10 2018 (r333968) @@ -524,6 +524,7 @@ >> in6m_release(struct in6_multi *inm) { >> struct ifmultiaddr *ifma; >> struct ifnet *ifp; >> + struct vnet *saved_vnet; >> >> CTR2(KTR_MLD, "%s: refcount is %d", __func__, >> inm->in6m_refcount); >> @@ -539,14 +540,16 @@ in6m_release(struct in6_multi *inm) >> KASSERT(ifma->ifma_protospec == NULL, >> ("%s: ifma_protospec != NULL", __func__)); >> >> - if (ifp) >> - CURVNET_SET(ifp->if_vnet); >> + if (ifp) { >> + saved_vnet = curvnet; >> + curvnet = ifp->if_vnet; >> + } >> in6m_purge(inm); >> free(inm, M_IP6MADDR); >> >> if_delmulti_ifma_flags(ifma, 1); >> if (ifp) { >> - CURVNET_RESTORE(); >> + curvnet = saved_vnet; >> if_rele(ifp); >> } >> } >> @@ -1628,6 +1631,7 @@ inp_gcmoptions(epoch_context_t ctx) >> struct in6_mfilter *imf; >> struct in6_multi *inm; >> struct ifnet *ifp; >> + struct vnet *saved_vnet; >> size_t idx, nmships; >> >> imo = __containerof(ctx, struct ip6_moptions, >> imo6_epoch_ctx); @@ -1639,11 +1643,13 @@ >> inp_gcmoptions(epoch_context_t ctx) im6f_leave(imf); >> inm = imo->im6o_membership[idx]; >> ifp = inm->in6m_ifp; >> - if (ifp) >> - CURVNET_SET(ifp->if_vnet); >> + if (ifp) { >> + saved_vnet = curvnet; >> + curvnet = ifp->if_vnet; >> + } >> (void)in6_leavegroup(inm, imf); >> if (ifp) >> - CURVNET_RESTORE(); >> + curvnet = saved_vnet; >> if (imf) >> im6f_purge(imf); >> } >> > From owner-svn-src-head@freebsd.org Mon May 21 16:13:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73284EF6142; Mon, 21 May 2018 16:13:44 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 212368487E; Mon, 21 May 2018 16:13:44 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02DF42727C; Mon, 21 May 2018 16:13:44 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LGDhOt059594; Mon, 21 May 2018 16:13:43 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LGDh03059592; Mon, 21 May 2018 16:13:43 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805211613.w4LGDh03059592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Mon, 21 May 2018 16:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333984 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 333984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 16:13:44 -0000 Author: mmacy Date: Mon May 21 16:13:43 2018 New Revision: 333984 URL: https://svnweb.freebsd.org/changeset/base/333984 Log: inpcb: revert deferred inpcb free pending further review Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Mon May 21 16:03:51 2018 (r333983) +++ head/sys/netinet/in_pcb.c Mon May 21 16:13:43 2018 (r333984) @@ -1336,34 +1336,6 @@ in_pcblist_rele_rlocked(epoch_context_t ctx) free(il, M_TEMP); } -static void -in_pcbfree_deferred(epoch_context_t ctx) -{ - struct inpcb *inp; - struct inpcbinfo *pcbinfo; - - inp = __containerof(ctx, struct inpcb, inp_epoch_ctx); - pcbinfo = inp->inp_pcbinfo; - - INP_WLOCK(inp); - /* XXXRW: Do as much as possible here. */ -#if defined(IPSEC) || defined(IPSEC_SUPPORT) - if (inp->inp_sp != NULL) - ipsec_delete_pcbpolicy(inp); -#endif - if (inp->inp_options) - (void)m_free(inp->inp_options); - - inp->inp_vflag = 0; - inp->inp_flags2 |= INP_FREED; - crfree(inp->inp_cred); -#ifdef MAC - mac_inpcb_destroy(inp); -#endif - if (!in_pcbrele_wlocked(inp)) - INP_WUNLOCK(inp); -} - /* * Unconditionally schedule an inpcb to be freed by decrementing its * reference count, which should occur only after the inpcb has been detached @@ -1376,15 +1348,16 @@ in_pcbfree_deferred(epoch_context_t ctx) void in_pcbfree(struct inpcb *inp) { + struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; + #ifdef INET6 struct ip6_moptions *im6o = NULL; #endif #ifdef INET struct ip_moptions *imo = NULL; #endif - struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; - KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); + KASSERT((inp->inp_flags2 & INP_FREED) == 0, ("%s: called twice for pcb %p", __func__, inp)); if (inp->inp_flags2 & INP_FREED) { @@ -1400,27 +1373,45 @@ in_pcbfree(struct inpcb *inp) } #endif INP_WLOCK_ASSERT(inp); + #ifdef INET imo = inp->inp_moptions; inp->inp_moptions = NULL; - inp_freemoptions(imo); #endif + /* XXXRW: Do as much as possible here. */ +#if defined(IPSEC) || defined(IPSEC_SUPPORT) + if (inp->inp_sp != NULL) + ipsec_delete_pcbpolicy(inp); +#endif + INP_LIST_WLOCK(pcbinfo); + inp->inp_gencnt = ++pcbinfo->ipi_gencnt; + in_pcbremlists(inp); + INP_LIST_WUNLOCK(pcbinfo); #ifdef INET6 if (inp->inp_vflag & INP_IPV6PROTO) { ip6_freepcbopts(inp->in6p_outputopts); im6o = inp->in6p_moptions; inp->in6p_moptions = NULL; - ip6_freemoptions(im6o); } #endif - /* Remove first from list */ - INP_LIST_WLOCK(pcbinfo); - inp->inp_gencnt = ++pcbinfo->ipi_gencnt; - in_pcbremlists(inp); - INP_LIST_WUNLOCK(pcbinfo); + if (inp->inp_options) + (void)m_free(inp->inp_options); RO_INVALIDATE_CACHE(&inp->inp_route); - INP_WUNLOCK(inp); - epoch_call(net_epoch_preempt, &inp->inp_epoch_ctx, in_pcbfree_deferred); + + inp->inp_vflag = 0; + inp->inp_flags2 |= INP_FREED; + crfree(inp->inp_cred); +#ifdef MAC + mac_inpcb_destroy(inp); +#endif +#ifdef INET6 + ip6_freemoptions(im6o); +#endif +#ifdef INET + inp_freemoptions(imo); +#endif + if (!in_pcbrele_wlocked(inp)) + INP_WUNLOCK(inp); } /* Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Mon May 21 16:03:51 2018 (r333983) +++ head/sys/netinet/in_pcb.h Mon May 21 16:13:43 2018 (r333984) @@ -328,7 +328,6 @@ struct inpcb { LIST_ENTRY(inpcb) inp_list; /* (p/l) list for all PCBs for proto */ /* (p[w]) for list iteration */ /* (p[r]/l) for addition/removal */ - struct epoch_context inp_epoch_ctx; }; #endif /* _KERNEL */ From owner-svn-src-head@freebsd.org Mon May 21 16:14:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37B0CEF61DA; Mon, 21 May 2018 16:14:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD93E84A0D; Mon, 21 May 2018 16:14:53 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE6692727D; Mon, 21 May 2018 16:14:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LGErV2059678; Mon, 21 May 2018 16:14:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LGErKQ059677; Mon, 21 May 2018 16:14:53 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805211614.w4LGErKQ059677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 May 2018 16:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333985 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 333985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 16:14:54 -0000 Author: andrew Date: Mon May 21 16:14:53 2018 New Revision: 333985 URL: https://svnweb.freebsd.org/changeset/base/333985 Log: Restrict the faulting addresses we call pmap_fault from to just those that may fault due to superpage mappings being changed. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Mon May 21 16:13:43 2018 (r333984) +++ head/sys/arm64/arm64/trap.c Mon May 21 16:14:53 2018 (r333985) @@ -189,8 +189,16 @@ data_abort(struct thread *td, struct trapframe *frame, } } - if (pmap_fault(map->pmap, esr, far) == KERN_SUCCESS) - return; + /* + * We may fault from userspace or when in a DMAP region due to + * a superpage being unmapped when the access took place. In these + * cases we need to wait for the pmap to be unlocked and check + * if the translation is still invalid. + */ + if (map != kernel_map || VIRT_IN_DMAP(far)) { + if (pmap_fault(map->pmap, esr, far) == KERN_SUCCESS) + return; + } KASSERT(td->td_md.md_spinlock_count == 0, ("data abort with spinlock held")); From owner-svn-src-head@freebsd.org Mon May 21 16:19:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87D3BEF62C7; Mon, 21 May 2018 16:19:01 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F9D884BDA; Mon, 21 May 2018 16:19:01 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E74127284; Mon, 21 May 2018 16:19:01 +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 w4LGJ0bq059885; Mon, 21 May 2018 16:19:00 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LGJ0D7059884; Mon, 21 May 2018 16:19:00 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201805211619.w4LGJ0D7059884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 21 May 2018 16:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333986 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 333986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 16:19:01 -0000 Author: ae Date: Mon May 21 16:19:00 2018 New Revision: 333986 URL: https://svnweb.freebsd.org/changeset/base/333986 Log: Remove check for matching the rulenum, ruleid and rule pointer from dyn_lookup_ipv[46]_state_locked(). These checks are remnants of not ready to be committed code, and they are there by accident. Due to the race these checks can lead to creating of duplicate states when concurrent threads in the same time will try to add state for two packets of the same flow, but in reverse directions and matched by different parent rules. Reported by: lev MFC after: 3 days Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Mon May 21 16:14:53 2018 (r333985) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Mon May 21 16:19:00 2018 (r333986) @@ -490,8 +490,7 @@ static struct dyn_ipv6_state *dyn_lookup_ipv6_state( const struct ipfw_flow_id *, uint32_t, const void *, struct ipfw_dyn_info *, int); static int dyn_lookup_ipv6_state_locked(const struct ipfw_flow_id *, - uint32_t, const void *, int, const void *, uint32_t, uint16_t, uint32_t, - uint16_t); + uint32_t, const void *, int, uint32_t, uint16_t); static struct dyn_ipv6_state *dyn_alloc_ipv6_state( const struct ipfw_flow_id *, uint32_t, uint16_t, uint8_t); static int dyn_add_ipv6_state(void *, uint32_t, uint16_t, uint8_t, @@ -547,7 +546,7 @@ static void dyn_update_proto_state(struct dyn_data *, struct dyn_ipv4_state *dyn_lookup_ipv4_state(const struct ipfw_flow_id *, const void *, struct ipfw_dyn_info *, int); static int dyn_lookup_ipv4_state_locked(const struct ipfw_flow_id *, - const void *, int, const void *, uint32_t, uint16_t, uint32_t, uint16_t); + const void *, int, uint32_t, uint16_t); static struct dyn_ipv4_state *dyn_alloc_ipv4_state( const struct ipfw_flow_id *, uint16_t, uint8_t); static int dyn_add_ipv4_state(void *, uint32_t, uint16_t, uint8_t, @@ -1066,8 +1065,7 @@ restart: */ static int dyn_lookup_ipv4_state_locked(const struct ipfw_flow_id *pkt, - const void *ulp, int pktlen, const void *parent, uint32_t ruleid, - uint16_t rulenum, uint32_t bucket, uint16_t kidx) + const void *ulp, int pktlen, uint32_t bucket, uint16_t kidx) { struct dyn_ipv4_state *s; int dir; @@ -1078,15 +1076,6 @@ dyn_lookup_ipv4_state_locked(const struct ipfw_flow_id if (s->proto != pkt->proto || s->kidx != kidx) continue; - /* - * XXXAE: Install synchronized state only when there are - * no matching states. - */ - if (pktlen != 0 && ( - s->data->parent != parent || - s->data->ruleid != ruleid || - s->data->rulenum != rulenum)) - continue; if (s->sport == pkt->src_port && s->dport == pkt->dst_port && s->src == pkt->src_ip && s->dst == pkt->dst_ip) { @@ -1228,8 +1217,7 @@ restart: */ static int dyn_lookup_ipv6_state_locked(const struct ipfw_flow_id *pkt, uint32_t zoneid, - const void *ulp, int pktlen, const void *parent, uint32_t ruleid, - uint16_t rulenum, uint32_t bucket, uint16_t kidx) + const void *ulp, int pktlen, uint32_t bucket, uint16_t kidx) { struct dyn_ipv6_state *s; int dir; @@ -1240,15 +1228,6 @@ dyn_lookup_ipv6_state_locked(const struct ipfw_flow_id if (s->proto != pkt->proto || s->kidx != kidx || s->zoneid != zoneid) continue; - /* - * XXXAE: Install synchronized state only when there are - * no matching states. - */ - if (pktlen != 0 && ( - s->data->parent != parent || - s->data->ruleid != ruleid || - s->data->rulenum != rulenum)) - continue; if (s->sport == pkt->src_port && s->dport == pkt->dst_port && IN6_ARE_ADDR_EQUAL(&s->src, &pkt->src_ip6) && IN6_ARE_ADDR_EQUAL(&s->dst, &pkt->dst_ip6)) { @@ -1595,8 +1574,8 @@ dyn_add_ipv4_state(void *parent, uint32_t ruleid, uint * Bucket version has been changed since last lookup, * do lookup again to be sure that state does not exist. */ - if (dyn_lookup_ipv4_state_locked(pkt, ulp, pktlen, parent, - ruleid, rulenum, bucket, kidx) != 0) { + if (dyn_lookup_ipv4_state_locked(pkt, ulp, pktlen, + bucket, kidx) != 0) { DYN_BUCKET_UNLOCK(bucket); return (EEXIST); } @@ -1727,7 +1706,7 @@ dyn_add_ipv6_state(void *parent, uint32_t ruleid, uint * do lookup again to be sure that state does not exist. */ if (dyn_lookup_ipv6_state_locked(pkt, zoneid, ulp, pktlen, - parent, ruleid, rulenum, bucket, kidx) != 0) { + bucket, kidx) != 0) { DYN_BUCKET_UNLOCK(bucket); return (EEXIST); } From owner-svn-src-head@freebsd.org Mon May 21 16:33:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52159EF69FF; Mon, 21 May 2018 16:33:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0732385758; Mon, 21 May 2018 16:33:14 +0000 (UTC) (envelope-from trasz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD744275A3; Mon, 21 May 2018 16:33:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LGXDwA069673; Mon, 21 May 2018 16:33:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LGXDQn069671; Mon, 21 May 2018 16:33:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201805211633.w4LGXDQn069671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 21 May 2018 16:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333987 - head/sys/dev/usb/template X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/dev/usb/template X-SVN-Commit-Revision: 333987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 16:33:14 -0000 Author: trasz Date: Mon May 21 16:33:13 2018 New Revision: 333987 URL: https://svnweb.freebsd.org/changeset/base/333987 Log: Improve description strings for USB device-mode serial ports. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/template/usb_template_modem.c head/sys/dev/usb/template/usb_template_multi.c head/sys/dev/usb/template/usb_template_serialnet.c Modified: head/sys/dev/usb/template/usb_template_modem.c ============================================================================== --- head/sys/dev/usb/template/usb_template_modem.c Mon May 21 16:19:00 2018 (r333986) +++ head/sys/dev/usb/template/usb_template_modem.c Mon May 21 16:33:13 2018 (r333987) @@ -78,9 +78,9 @@ enum { #define MODEM_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR #define MODEM_DEFAULT_PRODUCT_ID 0x27dd -#define MODEM_DEFAULT_INTERFACE "Modem interface" +#define MODEM_DEFAULT_INTERFACE "Virtual serial port" #define MODEM_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER -#define MODEM_DEFAULT_PRODUCT "Modem Test Device" +#define MODEM_DEFAULT_PRODUCT "Virtual serial port" #define MODEM_DEFAULT_SERIAL_NUMBER "March 2008" static struct usb_string_descriptor modem_interface; @@ -284,7 +284,7 @@ modem_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&modem_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, parent_name, CTLFLAG_RW, - 0, "USB Modem device side template"); + 0, "Virtual serial port device side template"); SYSCTL_ADD_U16(&modem_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, &usb_template_modem.idVendor, 1, "Vendor identifier"); Modified: head/sys/dev/usb/template/usb_template_multi.c ============================================================================== --- head/sys/dev/usb/template/usb_template_multi.c Mon May 21 16:19:00 2018 (r333986) +++ head/sys/dev/usb/template/usb_template_multi.c Mon May 21 16:33:13 2018 (r333987) @@ -91,7 +91,7 @@ enum { #define MULTI_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR #define MULTI_DEFAULT_PRODUCT_ID 0x05dc -#define MULTI_DEFAULT_MODEM "Virtual serial console" +#define MULTI_DEFAULT_MODEM "Virtual serial port" #define MULTI_DEFAULT_ETH_MAC "2A02030405060789AB" #define MULTI_DEFAULT_ETH_CONTROL "Ethernet Comm Interface" #define MULTI_DEFAULT_ETH_DATA "Ethernet Data Interface" Modified: head/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- head/sys/dev/usb/template/usb_template_serialnet.c Mon May 21 16:19:00 2018 (r333986) +++ head/sys/dev/usb/template/usb_template_serialnet.c Mon May 21 16:33:13 2018 (r333987) @@ -90,13 +90,13 @@ enum { #define SERIALNET_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR #define SERIALNET_DEFAULT_PRODUCT_ID 0x05dc -#define SERIALNET_DEFAULT_MODEM "USB Modem Interface" +#define SERIALNET_DEFAULT_MODEM "Virtual serial port" #define SERIALNET_DEFAULT_ETH_MAC "2A02030405060789AB" #define SERIALNET_DEFAULT_ETH_CONTROL "USB Ethernet Comm Interface" #define SERIALNET_DEFAULT_ETH_DATA "USB Ethernet Data Interface" #define SERIALNET_DEFAULT_CONFIGURATION "Default configuration" #define SERIALNET_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER -#define SERIALNET_DEFAULT_PRODUCT "SERIALNET" +#define SERIALNET_DEFAULT_PRODUCT "Serial/Ethernet device" #define SERIALNET_DEFAULT_SERIAL_NUMBER "January 2015" static struct usb_string_descriptor serialnet_modem; From owner-svn-src-head@freebsd.org Mon May 21 16:50:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B82CFEF7BEB; Mon, 21 May 2018 16:50:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63D66861C4; Mon, 21 May 2018 16:50:28 +0000 (UTC) (envelope-from trasz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4323427777; Mon, 21 May 2018 16:50:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LGoS0J074861; Mon, 21 May 2018 16:50:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LGoSXK074860; Mon, 21 May 2018 16:50:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201805211650.w4LGoSXK074860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 21 May 2018 16:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333988 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 333988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 16:50:28 -0000 Author: trasz Date: Mon May 21 16:50:27 2018 New Revision: 333988 URL: https://svnweb.freebsd.org/changeset/base/333988 Log: Fix typo. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/cdce.4 Modified: head/share/man/man4/cdce.4 ============================================================================== --- head/share/man/man4/cdce.4 Mon May 21 16:33:13 2018 (r333987) +++ head/share/man/man4/cdce.4 Mon May 21 16:50:27 2018 (r333988) @@ -28,7 +28,7 @@ .\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $ .\" $FreeBSD$ .\" -.Dd April 26, 2018 +.Dd May 21, 2018 .Dt CDCE 4 .Os .Sh NAME @@ -60,7 +60,7 @@ driver provides support for USB Host-to-Host (aka USB- USB-to-Ethernet bridges based on the USB Communication Device Class Ethernet Control Model (CDC ECM) and Network Control Model (CDC NCM) specifications. -It also provides device-level CDC ECM support. +It also provides device-side CDC ECM support. .Pp The USB bridge appears as a regular network interface on both sides, transporting Ethernet frames. From owner-svn-src-head@freebsd.org Mon May 21 17:00:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B552EF8810; Mon, 21 May 2018 17:00:53 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 2D90C86C44; Mon, 21 May 2018 17:00:52 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 20C495646B; Mon, 21 May 2018 11:54:20 -0500 (CDT) Subject: Re: svn commit: r333859 - head/sys/kern To: Matt Macy , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805190509.w4J59Atx053545@repo.freebsd.org> From: Eric van Gyzen Openpgp: preference=signencrypt Message-ID: Date: Mon, 21 May 2018 11:54:14 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201805190509.w4J59Atx053545@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 17:00:53 -0000 On 05/19/2018 00:09, Matt Macy wrote: > @@ -1663,16 +1655,18 @@ static int > umtxq_sleep_pi(struct umtx_q *uq, struct umtx_pi *pi, uint32_t owner, > const char *wmesg, struct abs_timeout *timo, bool shared) > { > - struct umtxq_chain *uc; > struct thread *td, *td1; > struct umtx_q *uq1; > int error, pri; > +#ifdef INVARIANTS > + struct umtxq_chain *uc; > > + uc = umtxq_getchain(&pi->pi_key); > +#endif > error = 0; > td = uq->uq_thread; > KASSERT(td == curthread, ("inconsistent uq_thread")); > - uc = umtxq_getchain(&uq->uq_key); > - UMTXQ_LOCKED_ASSERT(uc); > + UMTXQ_LOCKED_ASSERT(umtxq_getchain(&uq->uq_key)); Couldn't this line stay as it was? UMTXQ_LOCKED_ASSERT(uc); With the current code, we're calling umtxq_getchain() once more than necessary. Also, the casual reader might be confused by calling it with two different arguments. Eric From owner-svn-src-head@freebsd.org Mon May 21 17:24:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A856DEFA02D; Mon, 21 May 2018 17:24:13 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C87168455; Mon, 21 May 2018 17:24:13 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 2265617841; Mon, 21 May 2018 17:24:13 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f51.google.com with SMTP id c3-v6so22002000itj.4; Mon, 21 May 2018 10:24:13 -0700 (PDT) X-Gm-Message-State: ALKqPweC0hixMfe6L900yGJ2GoJAQ5K5UXzKnTiav01wxSthdiZjGBLT mCef3wRjTPMXfxizzXoQq8N2CnDmrUtNmKDeQS4= X-Google-Smtp-Source: AB8JxZq3TQv1DzxnyTlRSsQ8tePGu6bU4FvnyAA2k02tneNGF8lmtq1PqFyYTlr9ovrB/gGWriK8DEm6P6+9fk5+Rmc= X-Received: by 2002:a24:f9cc:: with SMTP id l195-v6mr18069533ith.132.1526923452586; Mon, 21 May 2018 10:24:12 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ae:0:0:0:0:0 with HTTP; Mon, 21 May 2018 10:24:12 -0700 (PDT) In-Reply-To: References: <201805190509.w4J59Atx053545@repo.freebsd.org> From: Matthew Macy Date: Mon, 21 May 2018 10:24:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333859 - head/sys/kern To: Eric van Gyzen Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 17:24:13 -0000 Good point. Will fix. On Mon, May 21, 2018 at 9:54 AM, Eric van Gyzen wrote: > On 05/19/2018 00:09, Matt Macy wrote: >> @@ -1663,16 +1655,18 @@ static int >> umtxq_sleep_pi(struct umtx_q *uq, struct umtx_pi *pi, uint32_t owner, >> const char *wmesg, struct abs_timeout *timo, bool shared) >> { >> - struct umtxq_chain *uc; >> struct thread *td, *td1; >> struct umtx_q *uq1; >> int error, pri; >> +#ifdef INVARIANTS >> + struct umtxq_chain *uc; >> >> + uc = umtxq_getchain(&pi->pi_key); >> +#endif >> error = 0; >> td = uq->uq_thread; >> KASSERT(td == curthread, ("inconsistent uq_thread")); >> - uc = umtxq_getchain(&uq->uq_key); >> - UMTXQ_LOCKED_ASSERT(uc); >> + UMTXQ_LOCKED_ASSERT(umtxq_getchain(&uq->uq_key)); > > Couldn't this line stay as it was? > > UMTXQ_LOCKED_ASSERT(uc); > > With the current code, we're calling umtxq_getchain() once more than > necessary. Also, the casual reader might be confused by calling it with > two different arguments. > > Eric From owner-svn-src-head@freebsd.org Mon May 21 17:33:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08745EFA809; Mon, 21 May 2018 17:33:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABE9168F3A; Mon, 21 May 2018 17:33:53 +0000 (UTC) (envelope-from trasz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CD9827F9C; Mon, 21 May 2018 17:33:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LHXriX099964; Mon, 21 May 2018 17:33:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LHXrM1099962; Mon, 21 May 2018 17:33:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201805211733.w4LHXrM1099962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 21 May 2018 17:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333989 - head/sys/dev/usb/template X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/dev/usb/template X-SVN-Commit-Revision: 333989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 17:33:54 -0000 Author: trasz Date: Mon May 21 17:33:52 2018 New Revision: 333989 URL: https://svnweb.freebsd.org/changeset/base/333989 Log: Add a somewhat ugly hack that makes OSX serial device node names human-readable. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/template/usb_template_modem.c head/sys/dev/usb/template/usb_template_multi.c head/sys/dev/usb/template/usb_template_serialnet.c Modified: head/sys/dev/usb/template/usb_template_modem.c ============================================================================== --- head/sys/dev/usb/template/usb_template_modem.c Mon May 21 16:50:27 2018 (r333988) +++ head/sys/dev/usb/template/usb_template_modem.c Mon May 21 17:33:52 2018 (r333989) @@ -81,7 +81,13 @@ enum { #define MODEM_DEFAULT_INTERFACE "Virtual serial port" #define MODEM_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define MODEM_DEFAULT_PRODUCT "Virtual serial port" -#define MODEM_DEFAULT_SERIAL_NUMBER "March 2008" +/* + * The reason for this being called like this is that OSX + * derives the device node name from it, resulting in a somewhat + * user-friendly "/dev/cu.usbmodemFreeBSD1". And yes, the "1" + * needs to be there, otherwise OSX will mangle it. + */ +#define MODEM_DEFAULT_SERIAL_NUMBER "FreeBSD1" static struct usb_string_descriptor modem_interface; static struct usb_string_descriptor modem_manufacturer; Modified: head/sys/dev/usb/template/usb_template_multi.c ============================================================================== --- head/sys/dev/usb/template/usb_template_multi.c Mon May 21 16:50:27 2018 (r333988) +++ head/sys/dev/usb/template/usb_template_multi.c Mon May 21 17:33:52 2018 (r333989) @@ -99,7 +99,13 @@ enum { #define MULTI_DEFAULT_CONFIGURATION "Default configuration" #define MULTI_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define MULTI_DEFAULT_PRODUCT "Multifunction Device" -#define MULTI_DEFAULT_SERIAL_NUMBER "May 2018" +/* + * The reason for this being called like this is that OSX + * derives the device node name from it, resulting in a somewhat + * user-friendly "/dev/cu.usbmodemFreeBSD1". And yes, the "1" + * needs to be there, otherwise OSX will mangle it. + */ +#define MULTI_DEFAULT_SERIAL_NUMBER "FreeBSD1" static struct usb_string_descriptor multi_modem; static struct usb_string_descriptor multi_eth_mac; Modified: head/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- head/sys/dev/usb/template/usb_template_serialnet.c Mon May 21 16:50:27 2018 (r333988) +++ head/sys/dev/usb/template/usb_template_serialnet.c Mon May 21 17:33:52 2018 (r333989) @@ -97,7 +97,13 @@ enum { #define SERIALNET_DEFAULT_CONFIGURATION "Default configuration" #define SERIALNET_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER #define SERIALNET_DEFAULT_PRODUCT "Serial/Ethernet device" -#define SERIALNET_DEFAULT_SERIAL_NUMBER "January 2015" +/* + * The reason for this being called like this is that OSX + * derives the device node name from it, resulting in a somewhat + * user-friendly "/dev/cu.usbmodemFreeBSD1". And yes, the "1" + * needs to be there, otherwise OSX will mangle it. + */ +#define SERIALNET_DEFAULT_SERIAL_NUMBER "FreeBSD1" static struct usb_string_descriptor serialnet_modem; static struct usb_string_descriptor serialnet_eth_mac; From owner-svn-src-head@freebsd.org Mon May 21 18:00:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43B01EFB014; Mon, 21 May 2018 18:00:33 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFD6369DB2; Mon, 21 May 2018 18:00:32 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 938165A9F09; Mon, 21 May 2018 18:00:26 +0000 (UTC) Date: Mon, 21 May 2018 18:00:26 +0000 From: Brooks Davis To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333929 - head/usr.bin/top Message-ID: <20180521180026.GA72453@spindle.one-eyed-alien.net> References: <201805201759.w4KHxxWS074470@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <201805201759.w4KHxxWS074470@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 18:00:33 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 20, 2018 at 05:59:59PM +0000, Eitan Adler wrote: > Author: eadler > Date: Sun May 20 17:59:59 2018 > New Revision: 333929 > URL: https://svnweb.freebsd.org/changeset/base/333929 >=20 > Log: > top(1): Make lack of "percent" information explicit > =20 > When count is 1, no delta information can be produced. Make this > explicit. > =20 > PR: 195717 > Submitted by: fernape >=20 > Modified: > head/usr.bin/top/top.1 >=20 > Modified: head/usr.bin/top/top.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/top/top.1 Sun May 20 17:58:22 2018 (r333928) > +++ head/usr.bin/top/top.1 Sun May 20 17:59:59 2018 (r333929) > @@ -162,7 +162,10 @@ screen. This option allows the user to select the n= um > wants to see before > .I top > automatically exits. For intelligent terminals, no upper limit > -is set. The default is 1 for dumb terminals. > +is set. The default is 1 for dumb terminals. Please, note that for > +.I count > +=3D 1 > +no information is available about the percentage of time spent by the CP= U in every state. When you're done clearing old PRs, it might be worth making this file follow FreeBSD mandoc conventions (particularly line breaks after end of sentence.) -- Brooks P.S. thanks for cleaning up top! --DocE+STaALJfprDB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbAwk5AAoJEKzQXbSebgfASE4H/i2LjywAZH4IGW1Yt+uxpNFk /Fm9JQWwOXoDllb6vkZbR/RMWLMPn9YDuJL+aHbiSqmK77/SQpKrYzig6LQO8kJE DCBClSnoiUnxF1VB80y99S65LM7vnzaiq5i+1FySujyjkfSd9vIFCWNQq0mSxnlw yyqeTLSWAZfxNSundIt3jSlWEqg6L8f9af4jnpODnAN0KuX9xBsr86efztZEppH7 bh8u2a1Zvu9amRO124AV5t8eqxHY4cm+Nk4CtcQUOT9aH7CBcIiJdXEMTPKpZJLj 5HKum133kxjfFRK2nTrZAECJkWpoqcT6slM8PfqWshw92U/2jGsfQg817sWL024= =CkSc -----END PGP SIGNATURE----- --DocE+STaALJfprDB-- From owner-svn-src-head@freebsd.org Mon May 21 18:41:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66FB5EFBED2; Mon, 21 May 2018 18:41:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17B9C6B751; Mon, 21 May 2018 18:41:17 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE5A5AF7; Mon, 21 May 2018 18:41:16 +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 w4LIfGvl031701; Mon, 21 May 2018 18:41:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LIfGVG031700; Mon, 21 May 2018 18:41:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805211841.w4LIfGVG031700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 21 May 2018 18:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333990 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 333990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 18:41:17 -0000 Author: kib Date: Mon May 21 18:41:16 2018 New Revision: 333990 URL: https://svnweb.freebsd.org/changeset/base/333990 Log: Add missed barrier for pm_gen/pm_active interaction. When we issue shootdown IPIs, we first assign zero to pm_gens to indicate the need to flush on the next context switch in case our IPI misses the context, next we read pm_active. On context switch we set our bit in pm_active, then we read pm_gen. It is crucial that both threads see the memory in the program order, otherwise invalidation thread might read pm_active bit as zero and the context switching thread might read pm_gen as zero. IA32 allows CPU for both reads to see zero. We must use the barriers between write and read. The pm_active bit set is already locked, so only the invalidation functions need it. I never saw it in real life, or at least I do not have a good reproduction case. I found this during code inspection when hunting for the Xen TLB issue reported by cperciva. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D15506 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon May 21 17:33:52 2018 (r333989) +++ head/sys/amd64/amd64/pmap.c Mon May 21 18:41:16 2018 (r333990) @@ -1721,6 +1721,18 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) if (cpuid != i) pmap->pm_pcids[i].pm_gen = 0; } + + /* + * The fence is between stores to pm_gen and the read of + * the pm_active mask. We need to ensure that it is + * impossible for us to miss the bit update in pm_active + * and simultaneously observe a non-zero pm_gen in + * pmap_activate_sw(), otherwise TLB update is missed. + * Without the fence, IA32 allows such an outcome. + * Note that pm_active is updated by a locked operation, + * which provides the reciprocal fence. + */ + atomic_thread_fence_seq_cst(); } mask = &pmap->pm_active; } @@ -1792,6 +1804,8 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm if (cpuid != i) pmap->pm_pcids[i].pm_gen = 0; } + /* See comment int pmap_invalidate_page(). */ + atomic_thread_fence_seq_cst(); } mask = &pmap->pm_active; } @@ -1863,6 +1877,8 @@ pmap_invalidate_all(pmap_t pmap) if (cpuid != i) pmap->pm_pcids[i].pm_gen = 0; } + /* See comment int pmap_invalidate_page(). */ + atomic_thread_fence_seq_cst(); } mask = &pmap->pm_active; } From owner-svn-src-head@freebsd.org Mon May 21 19:15:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73ECEEFC905; Mon, 21 May 2018 19:15:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 153E86CBA4; Mon, 21 May 2018 19:15:06 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4B5A107C; Mon, 21 May 2018 19:15:05 +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 w4LJF5VU051416; Mon, 21 May 2018 19:15:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LJF51Y051415; Mon, 21 May 2018 19:15:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805211915.w4LJF51Y051415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 21 May 2018 19:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333992 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 333992 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 19:15:06 -0000 Author: kib Date: Mon May 21 19:15:05 2018 New Revision: 333992 URL: https://svnweb.freebsd.org/changeset/base/333992 Log: Fix grammar. Submitted by: alc MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon May 21 18:59:34 2018 (r333991) +++ head/sys/amd64/amd64/pmap.c Mon May 21 19:15:05 2018 (r333992) @@ -1804,7 +1804,7 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm if (cpuid != i) pmap->pm_pcids[i].pm_gen = 0; } - /* See comment int pmap_invalidate_page(). */ + /* See the comment in pmap_invalidate_page(). */ atomic_thread_fence_seq_cst(); } mask = &pmap->pm_active; @@ -1877,7 +1877,7 @@ pmap_invalidate_all(pmap_t pmap) if (cpuid != i) pmap->pm_pcids[i].pm_gen = 0; } - /* See comment int pmap_invalidate_page(). */ + /* See the comment in pmap_invalidate_page(). */ atomic_thread_fence_seq_cst(); } mask = &pmap->pm_active; From owner-svn-src-head@freebsd.org Mon May 21 20:22:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A4B7EFD7DE; Mon, 21 May 2018 20:22:17 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD7B06EB27; Mon, 21 May 2018 20:22:16 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-10-49.flashcable.ch [91.190.10.49]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 681FCC189C; Mon, 21 May 2018 22:22:14 +0200 (CEST) Subject: Re: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805200506.w4K56gps088300@repo.freebsd.org> From: Andreas Tobler Message-ID: <079e7e34-3f1e-b6bf-5d63-ff560d13fa62@FreeBSD.org> Date: Mon, 21 May 2018 22:22:14 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201805200506.w4K56gps088300@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit X-Scanned-By: Asterix Submit on 127.0.1.1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 20:22:17 -0000 Hi Eitan, On 20.05.18 07:06, Eitan Adler wrote: > Author: eadler > Date: Sun May 20 05:06:42 2018 > New Revision: 333919 > URL: https://svnweb.freebsd.org/changeset/base/333919 > > Log: > MFV: file 5.33 > > Merge the latest file(1) in. > > Relevent Changelog: > - extend the support for ${x?:} expansions for magic descriptions > - add support for ${x?:} in mime types to handle pie binaries. > - add support for negative offsets (offsets from the end of file) > - close the file on error when writing magic > > Relnotes: yes I bissected this commit as the one which breaks my ports build. The one before, 333916 lets me build ports w/o problems. This and the following one (333922) which fixed compilation leaves me with a weird situation. For example, when I try to build x11-servers/xorg-server I do not find the libpciaccess.so lib, then the build tries to build the missing library and complains about the library is already there. Force installing it doesn't help, the configure step still complains about a libpciaccess.so which was not found. Another example is a gccX build where it complains about libgmp.so not found. This happens on amd64, two different machines, and also on armv7. I didn't try on other archs. Stepping between the two revisions solves/exposes the issue. Do you have an idea what happens here? TIA, Andreas From owner-svn-src-head@freebsd.org Mon May 21 20:23:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72443EFD835; Mon, 21 May 2018 20:23:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F9C86EC9A; Mon, 21 May 2018 20:23:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB5861BE8; Mon, 21 May 2018 20:23:04 +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 w4LKN4Ia086420; Mon, 21 May 2018 20:23:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LKN4vj086415; Mon, 21 May 2018 20:23:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201805212023.w4LKN4vj086415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 21 May 2018 20:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333994 - in head/sys: dev/acpica kern sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys: dev/acpica kern sys X-SVN-Commit-Revision: 333994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 20:23:05 -0000 Author: avg Date: Mon May 21 20:23:04 2018 New Revision: 333994 URL: https://svnweb.freebsd.org/changeset/base/333994 Log: stop and restart kernel event timers in the suspend / resume cycle I have a system that is very unstable after resuming from suspend-to-RAM but only if HPET is used as the event timer. The theory is that SMM code / firmware could be enabling HPET for its own uses and unexpected interrupts cause a trouble for it. Originally I wanted to solve the problem in hpet_suspend() method, but that was insufficient as the event timer could get reprogrammed again. So, it's better, for my case and in general, to stop the event timer(s) before entering the hardware suspend. MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D15413 Modified: head/sys/dev/acpica/acpi.c head/sys/kern/kern_clocksource.c head/sys/sys/systm.h Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Mon May 21 20:20:28 2018 (r333993) +++ head/sys/dev/acpica/acpi.c Mon May 21 20:23:04 2018 (r333994) @@ -2958,6 +2958,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) if (sc->acpi_sleep_delay > 0) DELAY(sc->acpi_sleep_delay * 1000000); + suspendclock(); intr = intr_disable(); if (state != ACPI_STATE_S1) { sleep_result = acpi_sleep_machdep(sc, state); @@ -3028,6 +3029,8 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) * process. This handles both the error and success cases. */ backout: + if (slp_state >= ACPI_SS_SLP_PREP) + resumeclock(); if (slp_state >= ACPI_SS_GPE_SET) { acpi_wake_prep_walk(state); sc->acpi_sstate = ACPI_STATE_S0; Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Mon May 21 20:20:28 2018 (r333993) +++ head/sys/kern/kern_clocksource.c Mon May 21 20:23:04 2018 (r333994) @@ -698,6 +698,22 @@ cpu_initclocks_ap(void) spinlock_exit(); } +void +suspendclock(void) +{ + ET_LOCK(); + configtimer(0); + ET_UNLOCK(); +} + +void +resumeclock(void) +{ + ET_LOCK(); + configtimer(1); + ET_UNLOCK(); +} + /* * Switch to profiling clock rates. */ Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Mon May 21 20:20:28 2018 (r333993) +++ head/sys/sys/systm.h Mon May 21 20:23:04 2018 (r333994) @@ -333,6 +333,8 @@ void startprofclock(struct proc *); void stopprofclock(struct proc *); void cpu_startprofclock(void); void cpu_stopprofclock(void); +void suspendclock(void); +void resumeclock(void); sbintime_t cpu_idleclock(void); void cpu_activeclock(void); void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt); From owner-svn-src-head@freebsd.org Mon May 21 20:35:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E88DAEFDB13; Mon, 21 May 2018 20:35:17 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E9BE6F293; Mon, 21 May 2018 20:35:17 +0000 (UTC) (envelope-from dumbbell@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8143C1D7F; Mon, 21 May 2018 20:35:17 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LKZHit091651; Mon, 21 May 2018 20:35:17 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LKZH0e091649; Mon, 21 May 2018 20:35:17 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201805212035.w4LKZH0e091649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Date: Mon, 21 May 2018 20:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333995 - head/sys/teken X-SVN-Group: head X-SVN-Commit-Author: dumbbell X-SVN-Commit-Paths: head/sys/teken X-SVN-Commit-Revision: 333995 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 20:35:18 -0000 Author: dumbbell Date: Mon May 21 20:35:16 2018 New Revision: 333995 URL: https://svnweb.freebsd.org/changeset/base/333995 Log: teken: Rename the "Set Cursor Style" sequence to match vt100.net docs This fixes inconsistencies with the rest of the `sequences` file. No functional changes. Requested by: ed Modified: head/sys/teken/sequences head/sys/teken/teken_subr.h Modified: head/sys/teken/sequences ============================================================================== --- head/sys/teken/sequences Mon May 21 20:23:04 2018 (r333994) +++ head/sys/teken/sequences Mon May 21 20:35:16 2018 (r333995) @@ -48,7 +48,7 @@ CUF Cursor Forward ^[ [ a n CUP Cursor Position ^[ [ H n n CUP Cursor Position ^[ [ f n n CUU Cursor Up ^[ [ A n -CS Cursor style ^[ [ SP q r +DECSCUSR Set Cursor Style ^[ [ SP q r DA1 Primary Device Attributes ^[ [ c r DA2 Secondary Device Attributes ^[ [ > c r DC Delete character ^[ [ P n Modified: head/sys/teken/teken_subr.h ============================================================================== --- head/sys/teken/teken_subr.h Mon May 21 20:23:04 2018 (r333994) +++ head/sys/teken/teken_subr.h Mon May 21 20:35:16 2018 (r333995) @@ -372,7 +372,7 @@ teken_subr_cursor_up(teken_t *t, unsigned int nrows) } static void -teken_subr_cursor_style(teken_t *t, unsigned int style) +teken_subr_set_cursor_style(teken_t *t, unsigned int style) { /* TODO */ From owner-svn-src-head@freebsd.org Mon May 21 20:45:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16B18EFDE78; Mon, 21 May 2018 20:45:17 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B807A6F8FC; Mon, 21 May 2018 20:45:16 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 7E7B418C43; Mon, 21 May 2018 20:45:16 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f173.google.com with SMTP id e20-v6so15865307iof.4; Mon, 21 May 2018 13:45:16 -0700 (PDT) X-Gm-Message-State: ALKqPwd0PCoIHkuOiEdVacNwkgf0JW2OeP8nftaRqNlAA/zKk4TCnhCz BiBHK7fphkMH1MmJMj+TqpQCdQ2q+/t+cfnAHFY= X-Google-Smtp-Source: AB8JxZpmryqIBQYkKWs3hnnWYUEA154fF3jVdnjPQq20aSIagwoDYRluIvzbYDbJqBct/n7c9tGYyxh4QLXdLdMjYIA= X-Received: by 2002:a6b:b7c6:: with SMTP id h189-v6mr22151844iof.94.1526935515972; Mon, 21 May 2018 13:45:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ae:0:0:0:0:0 with HTTP; Mon, 21 May 2018 13:45:15 -0700 (PDT) In-Reply-To: References: <201805190509.w4J59Atx053545@repo.freebsd.org> From: Matthew Macy Date: Mon, 21 May 2018 13:45:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333859 - head/sys/kern To: Eric van Gyzen Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 20:45:17 -0000 Bear in mind that prior to my change most functions would call it without ever using it on non-debug builds. On Mon, May 21, 2018 at 9:54 AM, Eric van Gyzen wrote: > On 05/19/2018 00:09, Matt Macy wrote: >> @@ -1663,16 +1655,18 @@ static int >> umtxq_sleep_pi(struct umtx_q *uq, struct umtx_pi *pi, uint32_t owner, >> const char *wmesg, struct abs_timeout *timo, bool shared) >> { >> - struct umtxq_chain *uc; >> struct thread *td, *td1; >> struct umtx_q *uq1; >> int error, pri; >> +#ifdef INVARIANTS >> + struct umtxq_chain *uc; >> >> + uc = umtxq_getchain(&pi->pi_key); >> +#endif >> error = 0; >> td = uq->uq_thread; >> KASSERT(td == curthread, ("inconsistent uq_thread")); >> - uc = umtxq_getchain(&uq->uq_key); >> - UMTXQ_LOCKED_ASSERT(uc); >> + UMTXQ_LOCKED_ASSERT(umtxq_getchain(&uq->uq_key)); > > Couldn't this line stay as it was? > > UMTXQ_LOCKED_ASSERT(uc); > > With the current code, we're calling umtxq_getchain() once more than > necessary. Also, the casual reader might be confused by calling it with > two different arguments. > > Eric From owner-svn-src-head@freebsd.org Mon May 21 20:49:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AF32EFDEFF; Mon, 21 May 2018 20:49:26 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDDE46FAC4; Mon, 21 May 2018 20:49:25 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 833C218C45; Mon, 21 May 2018 20:49:25 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f44.google.com with SMTP id n64-v6so22638738itb.3; Mon, 21 May 2018 13:49:25 -0700 (PDT) X-Gm-Message-State: ALKqPwdmcGXoyWPG9V3gjhD+tdHo30hBQ5uTvxC70I3KPYB3NTpKjlfX xM5VwJ+ZtbnDska98xVlFSmp6o7pzGK5KhO1Rfw= X-Google-Smtp-Source: AB8JxZqJAO775xEkzlxBOmDdyawxD+96tXHo7Ub4Fl9hI4Bx2hQy/4+FlDhENNoGisHr8jz1jOCRr5ITSoTX+K2ta7Q= X-Received: by 2002:a24:5b54:: with SMTP id g81-v6mr367900itb.7.1526935764934; Mon, 21 May 2018 13:49:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ae:0:0:0:0:0 with HTTP; Mon, 21 May 2018 13:49:24 -0700 (PDT) In-Reply-To: References: <201805200227.w4K2Rwhh007423@repo.freebsd.org> From: Matthew Macy Date: Mon, 21 May 2018 13:49:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333911 - head/sys/netinet To: Jonathan Looney Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 20:49:26 -0000 On Mon, May 21, 2018 at 6:15 AM, Jonathan Looney wrote: > On Sat, May 19, 2018 at 10:27 PM, Matt Macy wrote: >> >> + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb >> *), M_TEMP, M_WAITOK|M_ZERO); >> + inp_list = il->il_inp_list; > > > Why does this need M_ZERO? It allows me to assert that it hasn't already been passed to epoch_call. However, it doesn't make sense to pass it on non-INVARIANTS builds. -M From owner-svn-src-head@freebsd.org Mon May 21 20:57:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE863EFE161; Mon, 21 May 2018 20:57:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2D270138; Mon, 21 May 2018 20:57:15 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 677FE20C0; Mon, 21 May 2018 20:57:15 +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 w4LKvFJE002122; Mon, 21 May 2018 20:57:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LKvFMH002121; Mon, 21 May 2018 20:57:15 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201805212057.w4LKvFMH002121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 21 May 2018 20:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333997 - head/sys/dev/usb/serial X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/usb/serial X-SVN-Commit-Revision: 333997 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 20:57:16 -0000 Author: avg Date: Mon May 21 20:57:14 2018 New Revision: 333997 URL: https://svnweb.freebsd.org/changeset/base/333997 Log: uchcom: report detected product based on USB product ID Product IDs are specified in vendor documents. The previously used device ID is not. This is a cosmetic change. No functionality depends on those IDs. Reviewed by: hselasky MFC after: 2 weeks Modified: head/sys/dev/usb/serial/uchcom.c Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon May 21 20:54:54 2018 (r333996) +++ head/sys/dev/usb/serial/uchcom.c Mon May 21 20:57:14 2018 (r333997) @@ -322,12 +322,16 @@ uchcom_attach(device_t dev) sc->sc_udev = uaa->device; - switch (uaa->info.bcdDevice) { - case UCHCOM_REV_CH340: + switch (uaa->info.idProduct) { + case USB_PRODUCT_WCH2_CH341SER: device_printf(dev, "CH340 detected\n"); break; - default: + case USB_PRODUCT_WCH2_CH341SER_2: device_printf(dev, "CH341 detected\n"); + break; + default: + device_printf(dev, "New CH340/CH341 product 0x%04x detected\n", + uaa->info.idProduct); break; } From owner-svn-src-head@freebsd.org Mon May 21 20:58:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C19B7EFE1BF; Mon, 21 May 2018 20:58:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 709E27029A; Mon, 21 May 2018 20:58:07 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51B8C20C1; Mon, 21 May 2018 20:58:07 +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 w4LKw7SZ002199; Mon, 21 May 2018 20:58:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LKw7qJ002198; Mon, 21 May 2018 20:58:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201805212058.w4LKw7qJ002198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 21 May 2018 20:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333998 - head/sys/dev/usb/serial X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/usb/serial X-SVN-Commit-Revision: 333998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 20:58:07 -0000 Author: avg Date: Mon May 21 20:58:06 2018 New Revision: 333998 URL: https://svnweb.freebsd.org/changeset/base/333998 Log: uchcom: add DPRINTF-s to aid debugging of the driver Reviewed by: hselasky MFC after: 2 weeks Modified: head/sys/dev/usb/serial/uchcom.c Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon May 21 20:57:14 2018 (r333997) +++ head/sys/dev/usb/serial/uchcom.c Mon May 21 20:58:06 2018 (r333998) @@ -416,6 +416,8 @@ uchcom_ctrl_write(struct uchcom_softc *sc, uint8_t req USETW(req.wIndex, index); USETW(req.wLength, 0); + DPRINTF("WR REQ 0x%02X VAL 0x%04X IDX 0x%04X\n", + reqno, value, index); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); } @@ -432,6 +434,8 @@ uchcom_ctrl_read(struct uchcom_softc *sc, uint8_t reqn USETW(req.wIndex, index); USETW(req.wLength, buflen); + DPRINTF("RD REQ 0x%02X VAL 0x%04X IDX 0x%04X LEN %d\n", + reqno, value, index, buflen); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, buf, USB_SHORT_XFER_OK, 1000); } @@ -506,6 +510,7 @@ static void uchcom_update_version(struct uchcom_softc *sc) { uchcom_get_version(sc, &sc->sc_version); + DPRINTF("Chip version: 0x%02x\n", sc->sc_version); } static void From owner-svn-src-head@freebsd.org Mon May 21 20:59:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C6F8EFE220; Mon, 21 May 2018 20:59:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E3F0703F3; Mon, 21 May 2018 20:59:16 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E385720C2; Mon, 21 May 2018 20:59:15 +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 w4LKxFRY002289; Mon, 21 May 2018 20:59:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LKxFLY002288; Mon, 21 May 2018 20:59:15 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201805212059.w4LKxFLY002288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 21 May 2018 20:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333999 - head/sys/dev/usb/serial X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/usb/serial X-SVN-Commit-Revision: 333999 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 20:59:16 -0000 Author: avg Date: Mon May 21 20:59:15 2018 New Revision: 333999 URL: https://svnweb.freebsd.org/changeset/base/333999 Log: uchcom: add a hardware configuration tweak seen in Linux code Reviewed by: hselasky MFC after: 2 weeks Modified: head/sys/dev/usb/serial/uchcom.c Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon May 21 20:58:06 2018 (r333998) +++ head/sys/dev/usb/serial/uchcom.c Mon May 21 20:59:15 2018 (r333999) @@ -618,8 +618,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t if (uchcom_calc_divider_settings(&dv, rate)) return; + /* + * According to linux code we need to set bit 7 of UCHCOM_REG_BPS_PRE, + * otherwise the chip will buffer data. + */ uchcom_write_reg(sc, - UCHCOM_REG_BPS_PRE, dv.dv_prescaler, + UCHCOM_REG_BPS_PRE, dv.dv_prescaler | 0x80, UCHCOM_REG_BPS_DIV, dv.dv_div); uchcom_write_reg(sc, UCHCOM_REG_BPS_MOD, dv.dv_mod, From owner-svn-src-head@freebsd.org Mon May 21 21:00:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6024EFE299; Mon, 21 May 2018 21:00:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BEE87054E; Mon, 21 May 2018 21:00:13 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D0BE20C6; Mon, 21 May 2018 21:00:13 +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 w4LL0Du2002433; Mon, 21 May 2018 21:00:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LL0DRT002432; Mon, 21 May 2018 21:00:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201805212100.w4LL0DRT002432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 21 May 2018 21:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334000 - head/sys/dev/usb/serial X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/usb/serial X-SVN-Commit-Revision: 334000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 21:00:14 -0000 Author: avg Date: Mon May 21 21:00:13 2018 New Revision: 334000 URL: https://svnweb.freebsd.org/changeset/base/334000 Log: uchcom: reject parity and double stop bits as unsupported Reviewed by: hselasky MFC after: 2 weeks Modified: head/sys/dev/usb/serial/uchcom.c Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon May 21 20:59:15 2018 (r333999) +++ head/sys/dev/usb/serial/uchcom.c Mon May 21 21:00:13 2018 (r334000) @@ -689,6 +689,10 @@ uchcom_pre_param(struct ucom_softc *ucom, struct termi default: return (EIO); } + if ((t->c_cflag & CSTOPB) != 0) + return (EIO); + if ((t->c_cflag & PARENB) != 0) + return (EIO); if (uchcom_calc_divider_settings(&dv, t->c_ospeed)) { return (EIO); From owner-svn-src-head@freebsd.org Mon May 21 21:02:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 031FDEFE45E; Mon, 21 May 2018 21:02:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADE7670917; Mon, 21 May 2018 21:02:10 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F0612237; Mon, 21 May 2018 21:02:10 +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 w4LL2A89006408; Mon, 21 May 2018 21:02:10 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LL2A2c006407; Mon, 21 May 2018 21:02:10 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201805212102.w4LL2A2c006407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 21 May 2018 21:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334001 - head/sys/dev/usb/serial X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/usb/serial X-SVN-Commit-Revision: 334001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 21:02:11 -0000 Author: avg Date: Mon May 21 21:02:10 2018 New Revision: 334001 URL: https://svnweb.freebsd.org/changeset/base/334001 Log: uchcom: remove UCHCOM_REG_BREAK2 alias of UCHCOM_REG_LCR1 Also, add definitions for more bits of UCHCOM_REG_LCR1 as seen in the Linux driver. UCHCOM_LCR1_PARENB definition was different from that in the Linux driver and clashed with newly added UCHCOM_LCR1_RX. I took a liberty to change UCHCOM_LCR1_PARENB to the Linux definition as it was unused in the driver anyway. This change should make uchcom_cfg_set_break() easier to understand. Approved by: hselasky MFC after: 2 weeks Modified: head/sys/dev/usb/serial/uchcom.c Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon May 21 21:00:13 2018 (r334000) +++ head/sys/dev/usb/serial/uchcom.c Mon May 21 21:02:10 2018 (r334001) @@ -122,7 +122,6 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_BPS_MOD 0x14 #define UCHCOM_REG_BPS_PAD 0x0F #define UCHCOM_REG_BREAK1 0x05 -#define UCHCOM_REG_BREAK2 0x18 #define UCHCOM_REG_LCR1 0x18 #define UCHCOM_REG_LCR2 0x25 @@ -135,12 +134,14 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_DTR_MASK 0x20 #define UCHCOM_RTS_MASK 0x40 -#define UCHCOM_BRK1_MASK 0x01 -#define UCHCOM_BRK2_MASK 0x40 +#define UCHCOM_BRK_MASK 0x01 #define UCHCOM_LCR1_MASK 0xAF #define UCHCOM_LCR2_MASK 0x07 -#define UCHCOM_LCR1_PARENB 0x80 +#define UCHCOM_LCR1_RX 0x80 +#define UCHCOM_LCR1_TX 0x40 +#define UCHCOM_LCR1_PARENB 0x08 +#define UCHCOM_LCR1_CS8 0x03 #define UCHCOM_LCR2_PAREVEN 0x07 #define UCHCOM_LCR2_PARODD 0x06 #define UCHCOM_LCR2_PARMARK 0x05 @@ -556,17 +557,17 @@ uchcom_cfg_set_break(struct ucom_softc *ucom, uint8_t uint8_t brk1; uint8_t brk2; - uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_BREAK2, &brk2); + uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_LCR1, &brk2); if (onoff) { /* on - clear bits */ - brk1 &= ~UCHCOM_BRK1_MASK; - brk2 &= ~UCHCOM_BRK2_MASK; + brk1 &= ~UCHCOM_BRK_MASK; + brk2 &= ~UCHCOM_LCR1_TX; } else { /* off - set bits */ - brk1 |= UCHCOM_BRK1_MASK; - brk2 |= UCHCOM_BRK2_MASK; + brk1 |= UCHCOM_BRK_MASK; + brk2 |= UCHCOM_LCR1_TX; } - uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_BREAK2, brk2); + uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_LCR1, brk2); } static int From owner-svn-src-head@freebsd.org Mon May 21 21:04:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62257EFE530; Mon, 21 May 2018 21:04:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 123E970B8F; Mon, 21 May 2018 21:04:32 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E77BF227C; Mon, 21 May 2018 21:04:31 +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 w4LL4Vsx007234; Mon, 21 May 2018 21:04:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LL4Ve7007233; Mon, 21 May 2018 21:04:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201805212104.w4LL4Ve7007233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 21 May 2018 21:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334002 - head/sys/dev/usb/serial X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/usb/serial X-SVN-Commit-Revision: 334002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 21:04:32 -0000 Author: avg Date: Mon May 21 21:04:31 2018 New Revision: 334002 URL: https://svnweb.freebsd.org/changeset/base/334002 Log: uchcom: extend hardware support to version 0x30 This change adds support for a UBS<->RS232 adapter based on CH340 (or an analogue) that I own. The device seems to have a newer internal version (0x30) and the existing code incorrectly configures line control for it resulting in garbled transmission. The changes are based on what I learned in Linux drivers for the same hardware. Additional changes: - use UCHCOM_REG_LCR1 / UCHCOM_REG_LCR2 instead of explicit 0x18 and 0x25 - use NULL instead of 0 where a pointer is expected Reviewed by: hselasky MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D15498 Modified: head/sys/dev/usb/serial/uchcom.c Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon May 21 21:02:10 2018 (r334001) +++ head/sys/dev/usb/serial/uchcom.c Mon May 21 21:04:31 2018 (r334002) @@ -126,6 +126,7 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_LCR2 0x25 #define UCHCOM_VER_20 0x20 +#define UCHCOM_VER_30 0x30 #define UCHCOM_BASE_UNKNOWN 0 #define UCHCOM_BPS_MOD_BASE 20000000 @@ -706,11 +707,26 @@ uchcom_cfg_param(struct ucom_softc *ucom, struct termi { struct uchcom_softc *sc = ucom->sc_parent; - uchcom_get_version(sc, 0); + uchcom_get_version(sc, NULL); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0, 0); uchcom_set_baudrate(sc, t->c_ospeed); - uchcom_read_reg(sc, 0x18, 0, 0x25, 0); - uchcom_write_reg(sc, 0x18, 0x50, 0x25, 0x00); + if (sc->sc_version < UCHCOM_VER_30) { + uchcom_read_reg(sc, UCHCOM_REG_LCR1, NULL, + UCHCOM_REG_LCR2, NULL); + uchcom_write_reg(sc, UCHCOM_REG_LCR1, 0x50, + UCHCOM_REG_LCR2, 0x00); + } else { + /* + * Set up line control: + * - enable transmit and receive + * - set 8n1 mode + * To do: support other sizes, parity, stop bits. + */ + uchcom_write_reg(sc, + UCHCOM_REG_LCR1, + UCHCOM_LCR1_RX | UCHCOM_LCR1_TX | UCHCOM_LCR1_CS8, + UCHCOM_REG_LCR2, 0x00); + } uchcom_update_status(sc); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0x501f, 0xd90a); uchcom_set_baudrate(sc, t->c_ospeed); From owner-svn-src-head@freebsd.org Mon May 21 21:05:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98B77EFE5B3; Mon, 21 May 2018 21:05:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4156370D0A; Mon, 21 May 2018 21:05:56 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B9A5227F; Mon, 21 May 2018 21:05:56 +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 w4LL5ttB007345; Mon, 21 May 2018 21:05:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LL5tGD007344; Mon, 21 May 2018 21:05:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805212105.w4LL5tGD007344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 21 May 2018 21:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334003 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 334003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 21:05:56 -0000 Author: kib Date: Mon May 21 21:05:55 2018 New Revision: 334003 URL: https://svnweb.freebsd.org/changeset/base/334003 Log: Preserve other bits in IA32_SPEC_CTL MSR when changing the IBRS and STIBP states. Tested by: emaste (previous version) Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Mon May 21 21:04:31 2018 (r334002) +++ head/sys/amd64/amd64/support.S Mon May 21 21:05:55 2018 (r334003) @@ -958,8 +958,9 @@ ENTRY(handle_ibrs_entry) cmpb $0,hw_ibrs_active(%rip) je 1f movl $MSR_IA32_SPEC_CTRL,%ecx - movl $(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP),%eax - movl $(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP)>>32,%edx + rdmsr + orl $(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP),%eax + orl $(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP)>>32,%edx wrmsr movb $1,PCPU(IBPB_SET) testl $CPUID_STDEXT_SMEP,cpu_stdext_feature(%rip) @@ -972,8 +973,9 @@ ENTRY(handle_ibrs_exit) cmpb $0,PCPU(IBPB_SET) je 1f movl $MSR_IA32_SPEC_CTRL,%ecx - xorl %eax,%eax - xorl %edx,%edx + rdmsr + andl $~(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP),%eax + andl $~((IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP)>>32),%edx wrmsr movb $0,PCPU(IBPB_SET) 1: ret @@ -987,8 +989,9 @@ ENTRY(handle_ibrs_exit_rs) pushq %rdx pushq %rcx movl $MSR_IA32_SPEC_CTRL,%ecx - xorl %eax,%eax - xorl %edx,%edx + rdmsr + andl $~(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP),%eax + andl $~((IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP)>>32),%edx wrmsr popq %rcx popq %rdx From owner-svn-src-head@freebsd.org Mon May 21 21:07:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB1AEEFE627; Mon, 21 May 2018 21:07:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87A2370E82; Mon, 21 May 2018 21:07:14 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 683D12280; Mon, 21 May 2018 21:07:14 +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 w4LL7EPW007442; Mon, 21 May 2018 21:07:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LL7Ew1007440; Mon, 21 May 2018 21:07:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805212107.w4LL7Ew1007440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 21 May 2018 21:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334004 - in head/sys/x86: include x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/x86: include x86 X-SVN-Commit-Revision: 334004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 21:07:15 -0000 Author: kib Date: Mon May 21 21:07:13 2018 New Revision: 334004 URL: https://svnweb.freebsd.org/changeset/base/334004 Log: Add definition for Intel Speculative Store Bypass Disable MSR bits Security: CVE-2018-3639 Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/x86/include/specialreg.h head/sys/x86/x86/identcpu.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Mon May 21 21:05:55 2018 (r334003) +++ head/sys/x86/include/specialreg.h Mon May 21 21:07:13 2018 (r334004) @@ -428,10 +428,12 @@ #define CPUID_STDEXT3_IBPB 0x04000000 #define CPUID_STDEXT3_STIBP 0x08000000 #define CPUID_STDEXT3_ARCH_CAP 0x20000000 +#define CPUID_STDEXT3_SSBD 0x80000000 /* MSR IA32_ARCH_CAP(ABILITIES) bits */ #define IA32_ARCH_CAP_RDCL_NO 0x00000001 #define IA32_ARCH_CAP_IBRS_ALL 0x00000002 +#define IA32_ARCH_CAP_SSBD_NO 0x00000004 /* * CPUID manufacturers identifiers @@ -704,6 +706,7 @@ /* MSR IA32_SPEC_CTRL */ #define IA32_SPEC_CTRL_IBRS 0x00000001 #define IA32_SPEC_CTRL_STIBP 0x00000002 +#define IA32_SPEC_CTRL_SSBD 0x00000004 /* MSR IA32_PRED_CMD */ #define IA32_PRED_CMD_IBPB_BARRIER 0x0000000000000001ULL Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Mon May 21 21:05:55 2018 (r334003) +++ head/sys/x86/x86/identcpu.c Mon May 21 21:07:13 2018 (r334004) @@ -990,6 +990,7 @@ printcpuinfo(void) "\033IBPB" "\034STIBP" "\036ARCH_CAP" + "\040SSBD" ); } From owner-svn-src-head@freebsd.org Mon May 21 21:08:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C6D1EFE693; Mon, 21 May 2018 21:08:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FE3671007; Mon, 21 May 2018 21:08:21 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10C902281; Mon, 21 May 2018 21:08:21 +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 w4LL8KxA007570; Mon, 21 May 2018 21:08:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LL8J8J007563; Mon, 21 May 2018 21:08:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805212108.w4LL8J8J007563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 21 May 2018 21:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334005 - in head/sys: amd64/amd64 amd64/include dev/cpuctl x86/acpica x86/include x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include dev/cpuctl x86/acpica x86/include x86/x86 X-SVN-Commit-Revision: 334005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 21:08:21 -0000 Author: kib Date: Mon May 21 21:08:19 2018 New Revision: 334005 URL: https://svnweb.freebsd.org/changeset/base/334005 Log: Add Intel Spec Store Bypass Disable control. Speculative Store Bypass (SSB) is a speculative execution side channel vulnerability identified by Jann Horn of Google Project Zero (GPZ) and Ken Johnson of the Microsoft Security Response Center (MSRC) https://bugs.chromium.org/p/project-zero/issues/detail?id=1528. Updated Intel microcode introduces a MSR bit to disable SSB as a mitigation for the vulnerability. Introduce a sysctl hw.spec_store_bypass_disable to provide global control over the SSBD bit, akin to the existing sysctl that controls IBRS. The sysctl can be set to one of three values: 0: off 1: on 2: auto Future work will enable applications to control SSBD on a per-process basis (when it is not enabled globally). SSBD bit detection and control was verified with prerelease microcode. Security: CVE-2018-3639 Tested by: emaste (previous version, without updated microcode) Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/amd64/amd64/initcpu.c head/sys/amd64/amd64/machdep.c head/sys/amd64/include/md_var.h head/sys/dev/cpuctl/cpuctl.c head/sys/x86/acpica/acpi_wakeup.c head/sys/x86/include/x86_var.h head/sys/x86/x86/cpu_machdep.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Mon May 21 21:07:13 2018 (r334004) +++ head/sys/amd64/amd64/initcpu.c Mon May 21 21:08:19 2018 (r334005) @@ -224,6 +224,7 @@ initializecpu(void) pg_nx = PG_NX; } hw_ibrs_recalculate(); + hw_ssb_recalculate(false); switch (cpu_vendor_id) { case CPU_VENDOR_AMD: init_amd(); Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon May 21 21:07:13 2018 (r334004) +++ head/sys/amd64/amd64/machdep.c Mon May 21 21:08:19 2018 (r334005) @@ -1843,6 +1843,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) thread0.td_critnest = 0; TUNABLE_INT_FETCH("hw.ibrs_disable", &hw_ibrs_disable); + TUNABLE_INT_FETCH("hw.spec_store_bypass_disable", &hw_ssb_disable); TSEXIT(); Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Mon May 21 21:07:13 2018 (r334004) +++ head/sys/amd64/include/md_var.h Mon May 21 21:08:19 2018 (r334005) @@ -39,6 +39,7 @@ extern uint64_t *vm_page_dump; extern int hw_lower_amd64_sharedpage; extern int hw_ibrs_disable; +extern int hw_ssb_disable; /* * The file "conf/ldscript.amd64" defines the symbol "kernphys". Its Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Mon May 21 21:07:13 2018 (r334004) +++ head/sys/dev/cpuctl/cpuctl.c Mon May 21 21:08:19 2018 (r334005) @@ -529,6 +529,7 @@ cpuctl_do_eval_cpu_features(int cpu, struct thread *td identify_cpu2(); hw_ibrs_recalculate(); restore_cpu(oldcpu, is_bound, td); + hw_ssb_recalculate(true); printcpuinfo(); return (0); } Modified: head/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- head/sys/x86/acpica/acpi_wakeup.c Mon May 21 21:07:13 2018 (r334004) +++ head/sys/x86/acpica/acpi_wakeup.c Mon May 21 21:08:19 2018 (r334005) @@ -244,6 +244,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) #endif #ifdef __amd64__ hw_ibrs_active = 0; + hw_ssb_active = 0; cpu_stdext_feature3 = 0; CPU_FOREACH(i) { pc = pcpu_find(i); Modified: head/sys/x86/include/x86_var.h ============================================================================== --- head/sys/x86/include/x86_var.h Mon May 21 21:07:13 2018 (r334004) +++ head/sys/x86/include/x86_var.h Mon May 21 21:08:19 2018 (r334005) @@ -85,6 +85,7 @@ extern uint64_t xsave_mask; extern u_int max_apic_id; extern int pti; extern int hw_ibrs_active; +extern int hw_ssb_active; struct pcb; struct thread; @@ -137,6 +138,7 @@ int isa_nmi(int cd); void handle_ibrs_entry(void); void handle_ibrs_exit(void); void hw_ibrs_recalculate(void); +void hw_ssb_recalculate(bool all_cpus); void nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame); void nmi_call_kdb_smp(u_int type, struct trapframe *frame); void nmi_handle_intr(u_int type, struct trapframe *frame); Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Mon May 21 21:07:13 2018 (r334004) +++ head/sys/x86/x86/cpu_machdep.c Mon May 21 21:08:19 2018 (r334005) @@ -150,6 +150,7 @@ void acpi_cpu_idle_mwait(uint32_t mwait_hint) { int *state; + uint64_t v; /* * A comment in Linux patch claims that 'CPUs run faster with @@ -166,13 +167,26 @@ acpi_cpu_idle_mwait(uint32_t mwait_hint) KASSERT(atomic_load_int(state) == STATE_SLEEPING, ("cpu_mwait_cx: wrong monitorbuf state")); atomic_store_int(state, STATE_MWAIT); - handle_ibrs_exit(); + if (PCPU_GET(ibpb_set) || hw_ssb_active) { + v = rdmsr(MSR_IA32_SPEC_CTRL); + wrmsr(MSR_IA32_SPEC_CTRL, v & ~(IA32_SPEC_CTRL_IBRS | + IA32_SPEC_CTRL_STIBP | IA32_SPEC_CTRL_SSBD)); + } else { + v = 0; + } cpu_monitor(state, 0, 0); if (atomic_load_int(state) == STATE_MWAIT) cpu_mwait(MWAIT_INTRBREAK, mwait_hint); - handle_ibrs_entry(); /* + * SSB cannot be disabled while we sleep, or rather, if it was + * disabled, the sysctl thread will bind to our cpu to tweak + * MSR. + */ + if (v != 0) + wrmsr(MSR_IA32_SPEC_CTRL, v); + + /* * We should exit on any event that interrupts mwait, because * that event might be a wanted interrupt. */ @@ -803,6 +817,95 @@ hw_ibrs_disable_handler(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_hw, OID_AUTO, ibrs_disable, CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, NULL, 0, hw_ibrs_disable_handler, "I", "Disable Indirect Branch Restricted Speculation"); + +int hw_ssb_active; +int hw_ssb_disable; + +SYSCTL_INT(_hw, OID_AUTO, spec_store_bypass_disable_active, CTLFLAG_RD, + &hw_ssb_active, 0, + "Speculative Store Bypass Disable active"); + +static void +hw_ssb_set_one(bool enable) +{ + uint64_t v; + + v = rdmsr(MSR_IA32_SPEC_CTRL); + if (enable) + v |= (uint64_t)IA32_SPEC_CTRL_SSBD; + else + v &= ~(uint64_t)IA32_SPEC_CTRL_SSBD; + wrmsr(MSR_IA32_SPEC_CTRL, v); +} + +static void +hw_ssb_set(bool enable, bool for_all_cpus) +{ + struct thread *td; + int bound_cpu, i, is_bound; + + if ((cpu_stdext_feature3 & CPUID_STDEXT3_SSBD) == 0) { + hw_ssb_active = 0; + return; + } + hw_ssb_active = enable; + if (for_all_cpus) { + td = curthread; + thread_lock(td); + is_bound = sched_is_bound(td); + bound_cpu = td->td_oncpu; + CPU_FOREACH(i) { + sched_bind(td, i); + hw_ssb_set_one(enable); + } + if (is_bound) + sched_bind(td, bound_cpu); + else + sched_unbind(td); + thread_unlock(td); + } else { + hw_ssb_set_one(enable); + } +} + +void +hw_ssb_recalculate(bool all_cpus) +{ + + switch (hw_ssb_disable) { + default: + hw_ssb_disable = 0; + /* FALLTHROUGH */ + case 0: /* off */ + hw_ssb_set(false, all_cpus); + break; + case 1: /* on */ + hw_ssb_set(true, all_cpus); + break; + case 2: /* auto */ + hw_ssb_set((cpu_ia32_arch_caps & IA32_ARCH_CAP_SSBD_NO) != 0 ? + false : true, all_cpus); + break; + } +} + +static int +hw_ssb_disable_handler(SYSCTL_HANDLER_ARGS) +{ + int error, val; + + val = hw_ssb_disable; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + hw_ssb_disable = val; + hw_ssb_recalculate(true); + return (0); +} +SYSCTL_PROC(_hw, OID_AUTO, spec_store_bypass_disable, CTLTYPE_INT | + CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, NULL, 0, + hw_ssb_disable_handler, "I", + "Speculative Store Bypass Disable (0 - off, 1 - on, 2 - auto"); /* * Enable and restore kernel text write permissions. From owner-svn-src-head@freebsd.org Mon May 21 21:15:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2165EFE97C; Mon, 21 May 2018 21:15:47 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7351E71842; Mon, 21 May 2018 21:15:47 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A5FA243B; Mon, 21 May 2018 21:15:47 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LLFlwC013357; Mon, 21 May 2018 21:15:47 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LLFkRA013356; Mon, 21 May 2018 21:15:46 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201805212115.w4LLFkRA013356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 21 May 2018 21:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334006 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 334006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 21:15:48 -0000 Author: manu Date: Mon May 21 21:15:46 2018 New Revision: 334006 URL: https://svnweb.freebsd.org/changeset/base/334006 Log: aw_mmc: Correctly reset the mmc controller Always disable FIFO access as we don't use it. Rename some register bits so they are in sync with the register name. While here add my copyright as I've probably wrote 70% of the code here. Modified: head/sys/arm/allwinner/aw_mmc.c head/sys/arm/allwinner/aw_mmc.h Modified: head/sys/arm/allwinner/aw_mmc.c ============================================================================== --- head/sys/arm/allwinner/aw_mmc.c Mon May 21 21:08:19 2018 (r334005) +++ head/sys/arm/allwinner/aw_mmc.c Mon May 21 21:15:46 2018 (r334006) @@ -1,4 +1,7 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot * Copyright (c) 2013 Alexander Fedorov * All rights reserved. * @@ -431,12 +434,12 @@ aw_mmc_prepare_dma(struct aw_mmc_softc *sc) /* Enable DMA */ val = AW_MMC_READ_4(sc, AW_MMC_GCTL); - val &= ~AW_MMC_CTRL_FIFO_AC_MOD; - val |= AW_MMC_CTRL_DMA_ENB; + val &= ~AW_MMC_GCTL_FIFO_AC_MOD; + val |= AW_MMC_GCTL_DMA_ENB; AW_MMC_WRITE_4(sc, AW_MMC_GCTL, val); /* Reset DMA */ - val |= AW_MMC_CTRL_DMA_RST; + val |= AW_MMC_GCTL_DMA_RST; AW_MMC_WRITE_4(sc, AW_MMC_GCTL, val); AW_MMC_WRITE_4(sc, AW_MMC_DMAC, AW_MMC_DMAC_IDMAC_SOFT_RST); @@ -463,12 +466,15 @@ aw_mmc_prepare_dma(struct aw_mmc_softc *sc) static int aw_mmc_reset(struct aw_mmc_softc *sc) { + uint32_t reg; int timeout; - AW_MMC_WRITE_4(sc, AW_MMC_GCTL, AW_MMC_RESET); + reg = AW_MMC_READ_4(sc, AW_MMC_GCTL); + reg |= AW_MMC_GCTL_RESET; + AW_MMC_WRITE_4(sc, AW_MMC_GCTL, reg); timeout = 1000; while (--timeout > 0) { - if ((AW_MMC_READ_4(sc, AW_MMC_GCTL) & AW_MMC_RESET) == 0) + if ((AW_MMC_READ_4(sc, AW_MMC_GCTL) & AW_MMC_GCTL_RESET) == 0) break; DELAY(100); } @@ -481,6 +487,7 @@ aw_mmc_reset(struct aw_mmc_softc *sc) static int aw_mmc_init(struct aw_mmc_softc *sc) { + uint32_t reg; int ret; ret = aw_mmc_reset(sc); @@ -506,9 +513,12 @@ aw_mmc_init(struct aw_mmc_softc *sc) AW_MMC_WRITE_4(sc, AW_MMC_IDST, 0xffffffff); - /* Enable interrupts and AHB access. */ - AW_MMC_WRITE_4(sc, AW_MMC_GCTL, - AW_MMC_READ_4(sc, AW_MMC_GCTL) | AW_MMC_CTRL_INT_ENB); + /* Enable interrupts and disable AHB access. */ + reg = AW_MMC_READ_4(sc, AW_MMC_GCTL); + reg |= AW_MMC_GCTL_INT_ENB; + reg &= ~AW_MMC_GCTL_FIFO_AC_MOD; + reg &= ~AW_MMC_GCTL_WAIT_MEM_ACCESS; + AW_MMC_WRITE_4(sc, AW_MMC_GCTL, reg); return (0); } @@ -524,7 +534,7 @@ aw_mmc_req_done(struct aw_mmc_softc *sc) cmd = sc->aw_req->cmd; if (cmd->error != MMC_ERR_NONE) { /* Reset the FIFO and DMA engines. */ - mask = AW_MMC_CTRL_FIFO_RST | AW_MMC_CTRL_DMA_RST; + mask = AW_MMC_GCTL_FIFO_RST | AW_MMC_GCTL_DMA_RST; val = AW_MMC_READ_4(sc, AW_MMC_GCTL); AW_MMC_WRITE_4(sc, AW_MMC_GCTL, val | mask); @@ -998,9 +1008,9 @@ aw_mmc_update_ios(device_t bus, device_t child) reg = AW_MMC_READ_4(sc, AW_MMC_GCTL); if (ios->timing == bus_timing_uhs_ddr50 || ios->timing == bus_timing_mmc_ddr52) - reg |= AW_MMC_CTRL_DDR_MOD_SEL; + reg |= AW_MMC_GCTL_DDR_MOD_SEL; else - reg &= ~AW_MMC_CTRL_DDR_MOD_SEL; + reg &= ~AW_MMC_GCTL_DDR_MOD_SEL; AW_MMC_WRITE_4(sc, AW_MMC_GCTL, reg); if (ios->clock && ios->clock != sc->aw_clock) { Modified: head/sys/arm/allwinner/aw_mmc.h ============================================================================== --- head/sys/arm/allwinner/aw_mmc.h Mon May 21 21:08:19 2018 (r334005) +++ head/sys/arm/allwinner/aw_mmc.h Mon May 21 21:15:46 2018 (r334006) @@ -1,4 +1,7 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot * Copyright (c) 2013 Alexander Fedorov * All rights reserved. * @@ -66,16 +69,17 @@ #define A31_MMC_FIFO 0x200 /* FIFO Access Address (A31) */ /* AW_MMC_GCTL */ -#define AW_MMC_CTRL_SOFT_RST (1U << 0) -#define AW_MMC_CTRL_FIFO_RST (1U << 1) -#define AW_MMC_CTRL_DMA_RST (1U << 2) -#define AW_MMC_CTRL_INT_ENB (1U << 4) -#define AW_MMC_CTRL_DMA_ENB (1U << 5) -#define AW_MMC_CTRL_CD_DBC_ENB (1U << 8) -#define AW_MMC_CTRL_DDR_MOD_SEL (1U << 10) -#define AW_MMC_CTRL_FIFO_AC_MOD (1U << 31) -#define AW_MMC_RESET \ - (AW_MMC_CTRL_SOFT_RST | AW_MMC_CTRL_FIFO_RST | AW_MMC_CTRL_DMA_RST) +#define AW_MMC_GCTL_SOFT_RST (1U << 0) +#define AW_MMC_GCTL_FIFO_RST (1U << 1) +#define AW_MMC_GCTL_DMA_RST (1U << 2) +#define AW_MMC_GCTL_INT_ENB (1U << 4) +#define AW_MMC_GCTL_DMA_ENB (1U << 5) +#define AW_MMC_GCTL_CD_DBC_ENB (1U << 8) +#define AW_MMC_GCTL_DDR_MOD_SEL (1U << 10) +#define AW_MMC_GCTL_WAIT_MEM_ACCESS (1U << 30) +#define AW_MMC_GCTL_FIFO_AC_MOD (1U << 31) +#define AW_MMC_GCTL_RESET \ + (AW_MMC_GCTL_SOFT_RST | AW_MMC_GCTL_FIFO_RST | AW_MMC_GCTL_DMA_RST) /* AW_MMC_CKCR */ #define AW_MMC_CKCR_CCLK_ENB (1U << 16) From owner-svn-src-head@freebsd.org Mon May 21 21:44:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B43CEFF326; Mon, 21 May 2018 21:44:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21115729F2; Mon, 21 May 2018 21:44:48 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3CC62904; Mon, 21 May 2018 21:44:47 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LLil7D028199; Mon, 21 May 2018 21:44:47 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LLilqb028198; Mon, 21 May 2018 21:44:47 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201805212144.w4LLilqb028198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 21 May 2018 21:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334007 - head/etc/devd X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/etc/devd X-SVN-Commit-Revision: 334007 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 21:44:48 -0000 Author: manu Date: Mon May 21 21:44:47 2018 New Revision: 334007 URL: https://svnweb.freebsd.org/changeset/base/334007 Log: devd: Always install devmatch.conf It allows devd to run devmatch to find the correct driver based on pnp info. No Objection from: imp Modified: head/etc/devd/Makefile Modified: head/etc/devd/Makefile ============================================================================== --- head/etc/devd/Makefile Mon May 21 21:15:46 2018 (r334006) +++ head/etc/devd/Makefile Mon May 21 21:44:47 2018 (r334007) @@ -4,6 +4,8 @@ FILEGROUPS= FILES +FILES+= devmatch.conf + .if ${MACHINE} == "powerpc" FILES+= apple.conf .endif @@ -12,7 +14,6 @@ FILES+= apple.conf .if ${MK_ACPI} != "no" FILES+= asus.conf .endif -FILES+= devmatch.conf .if ${MK_HYPERV} != "no" FILES+= hyperv.conf .endif From owner-svn-src-head@freebsd.org Mon May 21 21:52:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D4DCEFF58F; Mon, 21 May 2018 21:52:49 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E95F172FBD; Mon, 21 May 2018 21:52:48 +0000 (UTC) (envelope-from jilles@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA7572A9E; Mon, 21 May 2018 21:52:48 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4LLqmc0033240; Mon, 21 May 2018 21:52:48 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4LLqmOi033238; Mon, 21 May 2018 21:52:48 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201805212152.w4LLqmOi033238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Mon, 21 May 2018 21:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334008 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 334008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 21:52:49 -0000 Author: jilles Date: Mon May 21 21:52:48 2018 New Revision: 334008 URL: https://svnweb.freebsd.org/changeset/base/334008 Log: sh: Split CNL syntax category to avoid a check on state[level].syntax No functional change is intended. Modified: head/bin/sh/mksyntax.c head/bin/sh/parser.c Modified: head/bin/sh/mksyntax.c ============================================================================== --- head/bin/sh/mksyntax.c Mon May 21 21:44:47 2018 (r334007) +++ head/bin/sh/mksyntax.c Mon May 21 21:52:48 2018 (r334008) @@ -65,6 +65,7 @@ struct synclass { static const struct synclass synclass[] = { { "CWORD", "character is nothing special" }, { "CNL", "newline character" }, + { "CQNL", "newline character in quotes" }, { "CBACK", "a backslash character" }, { "CSBACK", "a backslash character in single quotes" }, { "CSQUOTE", "single quote" }, @@ -185,7 +186,7 @@ main(int argc __unused, char **argv __unused) fputs("\n/* syntax table used when in double quotes */\n", cfile); init("dqsyntax"); add_default(); - add("\n", "CNL"); + add("\n", "CQNL"); add("\\", "CBACK"); add("\"", "CENDQUOTE"); add("`", "CBQUOTE"); @@ -198,7 +199,7 @@ main(int argc __unused, char **argv __unused) fputs("\n/* syntax table used when in single quotes */\n", cfile); init("sqsyntax"); add_default(); - add("\n", "CNL"); + add("\n", "CQNL"); add("\\", "CSBACK"); add("'", "CENDQUOTE"); /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */ @@ -208,7 +209,7 @@ main(int argc __unused, char **argv __unused) fputs("\n/* syntax table used when in arithmetic */\n", cfile); init("arisyntax"); add_default(); - add("\n", "CNL"); + add("\n", "CQNL"); add("\\", "CBACK"); add("`", "CBQUOTE"); add("\"", "CIGN"); Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Mon May 21 21:44:47 2018 (r334007) +++ head/bin/sh/parser.c Mon May 21 21:52:48 2018 (r334008) @@ -1434,9 +1434,10 @@ readtoken1(int firstc, char const *initialsyntax, cons switch(synentry) { case CNL: /* '\n' */ - if (level == 0 && - state[level].syntax == BASESYNTAX) + if (level == 0) goto endword; /* exit outer loop */ + /* FALLTHROUGH */ + case CQNL: USTPUTC(c, out); plinno++; if (doprompt) From owner-svn-src-head@freebsd.org Mon May 21 22:34:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF4F7EA8170; Mon, 21 May 2018 22:34:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F43074583; Mon, 21 May 2018 22:34:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 5B2B719741; Mon, 21 May 2018 22:34:05 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333962 - head/usr.bin/top Date: Mon, 21 May 2018 14:53:51 -0700 Message-ID: <305462962.mZrrAP8ExE@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201805210440.w4L4eKCh001684@repo.freebsd.org> References: <201805210440.w4L4eKCh001684@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 22:34:06 -0000 On Monday, May 21, 2018 04:40:20 AM Eitan Adler wrote: > Author: eadler > Date: Mon May 21 04:40:20 2018 > New Revision: 333962 > URL: https://svnweb.freebsd.org/changeset/base/333962 > > Log: > top(1): further unconditionally assume we're on FreeBSD > > Modified: > head/usr.bin/top/loadavg.h > head/usr.bin/top/machine.c > head/usr.bin/top/machine.h > head/usr.bin/top/top.c > > Modified: head/usr.bin/top/top.c > ============================================================================== > --- head/usr.bin/top/top.c Mon May 21 04:32:14 2018 (r333961) > +++ head/usr.bin/top/top.c Mon May 21 04:40:20 2018 (r333962) > @@ -403,7 +403,7 @@ char *argv[]; > if (getuid() == 0) > { > /* be very un-nice! */ > - (void) nice(-20); > + nice(-20); FreeBSD doesn't support (void) casts? (That's the only reasoning I can infer from the log message.) I believe that using these provides hints to static analyzers to indicate that normally the return value should be checked for certain functions but it is not needed in specific cases (permitting the analyzer to warn about missing checks of return values in other cases). -- John Baldwin From owner-svn-src-head@freebsd.org Tue May 22 00:45:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C683EAABF5; Tue, 22 May 2018 00:45:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE60777EE4; Tue, 22 May 2018 00:45:02 +0000 (UTC) (envelope-from jhb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 838D74A39; Tue, 22 May 2018 00:45:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M0j2jB019031; Tue, 22 May 2018 00:45:02 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M0j0cs019021; Tue, 22 May 2018 00:45:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201805220045.w4M0j0cs019021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 22 May 2018 00:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334009 - in head/sys: amd64/amd64 amd64/include amd64/vmm/amd amd64/vmm/intel i386/i386 i386/include x86/include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include amd64/vmm/amd amd64/vmm/intel i386/i386 i386/include x86/include X-SVN-Commit-Revision: 334009 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 00:45:03 -0000 Author: jhb Date: Tue May 22 00:45:00 2018 New Revision: 334009 URL: https://svnweb.freebsd.org/changeset/base/334009 Log: Cleanups related to debug exceptions on x86. - Add constants for fields in DR6 and the reserved fields in DR7. Use these constants instead of magic numbers in most places that use DR6 and DR7. - Refer to T_TRCTRAP as "debug exception" rather than a "trace trap" as it is not just for trace exceptions. - Always read DR6 for debug exceptions and only clear TF in the flags register for user exceptions where DR6.BS is set. - Clear DR6 before returning from a debug exception handler as recommended by the SDM dating all the way back to the 386. This allows debuggers to determine the cause of each exception. For kernel traps, clear DR6 in the T_TRCTRAP case and pass DR6 by value to other parts of the handler (namely, user_dbreg_trap()). For user traps, wait until after trapsignal to clear DR6 so that userland debuggers can read DR6 via PT_GETDBREGS while the thread is stopped in trapsignal(). Reviewed by: kib, rgrimes MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D15189 Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/trap.c head/sys/amd64/include/db_machdep.h head/sys/amd64/vmm/amd/svm.c head/sys/amd64/vmm/intel/vmx.c head/sys/i386/i386/machdep.c head/sys/i386/i386/trap.c head/sys/i386/include/db_machdep.h head/sys/x86/include/reg.h head/sys/x86/include/x86_var.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon May 21 21:52:48 2018 (r334008) +++ head/sys/amd64/amd64/machdep.c Tue May 22 00:45:00 2018 (r334009) @@ -2486,14 +2486,23 @@ reset_dbregs(void) * breakpoint was in user space. Return 0, otherwise. */ int -user_dbreg_trap(void) +user_dbreg_trap(register_t dr6) { - u_int64_t dr7, dr6; /* debug registers dr6 and dr7 */ + u_int64_t dr7; u_int64_t bp; /* breakpoint bits extracted from dr6 */ int nbp; /* number of breakpoints that triggered */ caddr_t addr[4]; /* breakpoint addresses */ int i; - + + bp = dr6 & DBREG_DR6_BMASK; + if (bp == 0) { + /* + * None of the breakpoint bits are set meaning this + * trap was not caused by any of the debug registers + */ + return 0; + } + dr7 = rdr7(); if ((dr7 & 0x000000ff) == 0) { /* @@ -2505,16 +2514,6 @@ user_dbreg_trap(void) } nbp = 0; - dr6 = rdr6(); - bp = dr6 & 0x0000000f; - - if (!bp) { - /* - * None of the breakpoint bits are set meaning this - * trap was not caused by any of the debug registers - */ - return 0; - } /* * at least one of the breakpoints were hit, check to see Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon May 21 21:52:48 2018 (r334008) +++ head/sys/amd64/amd64/trap.c Tue May 22 00:45:00 2018 (r334009) @@ -126,7 +126,7 @@ static char *trap_msg[] = { "", /* 7 unused */ "", /* 8 unused */ "general protection fault", /* 9 T_PROTFLT */ - "trace trap", /* 10 T_TRCTRAP */ + "debug exception", /* 10 T_TRCTRAP */ "", /* 11 unused */ "page fault", /* 12 T_PAGEFLT */ "", /* 13 unused */ @@ -173,10 +173,7 @@ trap(struct trapframe *frame) ksiginfo_t ksi; struct thread *td; struct proc *p; - register_t addr; -#ifdef KDB - register_t dr6; -#endif + register_t addr, dr6; int signo, ucode; u_int type; @@ -185,6 +182,7 @@ trap(struct trapframe *frame) signo = 0; ucode = 0; addr = 0; + dr6 = 0; VM_CNT_INC(v_trap); type = frame->tf_trapno; @@ -272,20 +270,25 @@ trap(struct trapframe *frame) break; case T_BPTFLT: /* bpt instruction fault */ - case T_TRCTRAP: /* trace trap */ enable_intr(); #ifdef KDTRACE_HOOKS - if (type == T_BPTFLT) { - if (dtrace_pid_probe_ptr != NULL && - dtrace_pid_probe_ptr(frame) == 0) - return; - } + if (dtrace_pid_probe_ptr != NULL && + dtrace_pid_probe_ptr(frame) == 0) + return; #endif - frame->tf_rflags &= ~PSL_T; signo = SIGTRAP; - ucode = (type == T_TRCTRAP ? TRAP_TRACE : TRAP_BRKPT); + ucode = TRAP_BRKPT; break; + case T_TRCTRAP: /* debug exception */ + enable_intr(); + signo = SIGTRAP; + ucode = TRAP_TRACE; + dr6 = rdr6(); + if (dr6 & DBREG_DR6_BS) + frame->tf_rflags &= ~PSL_T; + break; + case T_ARITHTRAP: /* arithmetic trap */ ucode = fputrap_x87(); if (ucode == -1) @@ -521,9 +524,13 @@ trap(struct trapframe *frame) } break; - case T_TRCTRAP: /* trace trap */ + case T_TRCTRAP: /* debug exception */ + /* Clear any pending debug events. */ + dr6 = rdr6(); + load_dr6(0); + /* - * Ignore debug register trace traps due to + * Ignore debug register exceptions due to * accesses in the user's address space, which * can happen under several conditions such as * if a user sets a watchpoint on a buffer and @@ -532,14 +539,8 @@ trap(struct trapframe *frame) * in kernel space because that is useful when * debugging the kernel. */ - if (user_dbreg_trap()) { - /* - * Reset breakpoint bits because the - * processor doesn't - */ - load_dr6(rdr6() & ~0xf); + if (user_dbreg_trap(dr6)) return; - } /* * Malicious user code can configure a debug @@ -595,9 +596,6 @@ trap(struct trapframe *frame) * Otherwise, debugger traps "can't happen". */ #ifdef KDB - /* XXX %dr6 is not quite reentrant. */ - dr6 = rdr6(); - load_dr6(dr6 & ~0x4000); if (kdb_trap(type, dr6, frame)) return; #endif @@ -640,6 +638,13 @@ trap(struct trapframe *frame) } KASSERT((read_rflags() & PSL_I) != 0, ("interrupts disabled")); trapsignal(td, &ksi); + + /* + * Clear any pending debug exceptions after allowing a + * debugger to read DR6 while stopped in trapsignal(). + */ + if (type == T_TRCTRAP) + load_dr6(0); userret: userret(td, frame); KASSERT(PCB_USER_FPU(td->td_pcb), Modified: head/sys/amd64/include/db_machdep.h ============================================================================== --- head/sys/amd64/include/db_machdep.h Mon May 21 21:52:48 2018 (r334008) +++ head/sys/amd64/include/db_machdep.h Tue May 22 00:45:00 2018 (r334009) @@ -30,6 +30,7 @@ #define _MACHINE_DB_MACHDEP_H_ #include +#include #include typedef vm_offset_t db_addr_t; /* address - unsigned */ @@ -64,7 +65,8 @@ do { \ * unknown addresses and doesn't turn them off while it is running. */ #define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BPTFLT) -#define IS_SSTEP_TRAP(type, code) ((type) == T_TRCTRAP && (code) & 0x4000) +#define IS_SSTEP_TRAP(type, code) \ + ((type) == T_TRCTRAP && (code) & DBREG_DR6_BS) #define IS_WATCHPOINT_TRAP(type, code) 0 #define I_CALL 0xe8 Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Mon May 21 21:52:48 2018 (r334008) +++ head/sys/amd64/vmm/amd/svm.c Tue May 22 00:45:00 2018 (r334009) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -507,8 +508,8 @@ vmcb_init(struct svm_softc *sc, int vcpu, uint64_t iop PAT_VALUE(7, PAT_UNCACHEABLE); /* Set up DR6/7 to power-on state */ - state->dr6 = 0xffff0ff0; - state->dr7 = 0x400; + state->dr6 = DBREG_DR6_RESERVED1; + state->dr7 = DBREG_DR7_RESERVED1; } /* Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Mon May 21 21:52:48 2018 (r334008) +++ head/sys/amd64/vmm/intel/vmx.c Tue May 22 00:45:00 2018 (r334009) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -994,8 +995,8 @@ vmx_vminit(struct vm *vm, pmap_t pmap) exc_bitmap = 1 << IDT_MC; error += vmwrite(VMCS_EXCEPTION_BITMAP, exc_bitmap); - vmx->ctx[i].guest_dr6 = 0xffff0ff0; - error += vmwrite(VMCS_GUEST_DR7, 0x400); + vmx->ctx[i].guest_dr6 = DBREG_DR6_RESERVED1; + error += vmwrite(VMCS_GUEST_DR7, DBREG_DR7_RESERVED1); if (virtual_interrupt_delivery) { error += vmwrite(VMCS_APIC_ACCESS, APIC_ACCESS_ADDRESS); Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon May 21 21:52:48 2018 (r334008) +++ head/sys/i386/i386/machdep.c Tue May 22 00:45:00 2018 (r334009) @@ -3151,14 +3151,23 @@ set_dbregs(struct thread *td, struct dbreg *dbregs) * breakpoint was in user space. Return 0, otherwise. */ int -user_dbreg_trap(void) +user_dbreg_trap(register_t dr6) { - u_int32_t dr7, dr6; /* debug registers dr6 and dr7 */ + u_int32_t dr7; u_int32_t bp; /* breakpoint bits extracted from dr6 */ int nbp; /* number of breakpoints that triggered */ caddr_t addr[4]; /* breakpoint addresses */ int i; - + + bp = dr6 & DBREG_DR6_BMASK; + if (bp == 0) { + /* + * None of the breakpoint bits are set meaning this + * trap was not caused by any of the debug registers + */ + return 0; + } + dr7 = rdr7(); if ((dr7 & 0x000000ff) == 0) { /* @@ -3170,16 +3179,6 @@ user_dbreg_trap(void) } nbp = 0; - dr6 = rdr6(); - bp = dr6 & 0x0000000f; - - if (!bp) { - /* - * None of the breakpoint bits are set meaning this - * trap was not caused by any of the debug registers - */ - return 0; - } /* * at least one of the breakpoints were hit, check to see Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Mon May 21 21:52:48 2018 (r334008) +++ head/sys/i386/i386/trap.c Tue May 22 00:45:00 2018 (r334009) @@ -132,7 +132,7 @@ static const struct trap_data trap_data[] = { [T_BPTFLT] = { .ei = false, .msg = "breakpoint instruction fault" }, [T_ARITHTRAP] = { .ei = true, .msg = "arithmetic trap" }, [T_PROTFLT] = { .ei = true, .msg = "general protection fault" }, - [T_TRCTRAP] = { .ei = false, .msg = "trace trap" }, + [T_TRCTRAP] = { .ei = false, .msg = "debug exception" }, [T_PAGEFLT] = { .ei = true, .msg = "page fault" }, [T_ALIGNFLT] = { .ei = true, .msg = "alignment fault" }, [T_DIVIDE] = { .ei = true, .msg = "integer divide fault" }, @@ -199,12 +199,9 @@ trap(struct trapframe *frame) ksiginfo_t ksi; struct thread *td; struct proc *p; -#ifdef KDB - register_t dr6; -#endif int signo, ucode; u_int type; - register_t addr; + register_t addr, dr6; vm_offset_t eva; #ifdef POWERFAIL_NMI static int lastalert = 0; @@ -215,6 +212,7 @@ trap(struct trapframe *frame) signo = 0; ucode = 0; addr = 0; + dr6 = 0; VM_CNT_INC(v_trap); type = frame->tf_trapno; @@ -323,19 +321,24 @@ trap(struct trapframe *frame) break; case T_BPTFLT: /* bpt instruction fault */ - case T_TRCTRAP: /* trace trap */ enable_intr(); #ifdef KDTRACE_HOOKS - if (type == T_BPTFLT) { - if (dtrace_pid_probe_ptr != NULL && - dtrace_pid_probe_ptr(frame) == 0) - return; - } + if (dtrace_pid_probe_ptr != NULL && + dtrace_pid_probe_ptr(frame) == 0) + return; #endif + signo = SIGTRAP; + ucode = TRAP_BRKPT; + break; + + case T_TRCTRAP: /* debug exception */ + enable_intr(); user_trctrap_out: - frame->tf_eflags &= ~PSL_T; signo = SIGTRAP; - ucode = (type == T_TRCTRAP ? TRAP_TRACE : TRAP_BRKPT); + ucode = TRAP_TRACE; + dr6 = rdr6(); + if (dr6 & DBREG_DR6_BS) + frame->tf_rflags &= ~PSL_T; break; case T_ARITHTRAP: /* arithmetic trap */ @@ -643,10 +646,14 @@ user_trctrap_out: } break; - case T_TRCTRAP: /* trace trap */ + case T_TRCTRAP: /* debug exception */ kernel_trctrap: + /* Clear any pending debug events. */ + dr6 = rdr6(); + load_dr6(0); + /* - * Ignore debug register trace traps due to + * Ignore debug register exceptions due to * accesses in the user's address space, which * can happen under several conditions such as * if a user sets a watchpoint on a buffer and @@ -655,15 +662,9 @@ kernel_trctrap: * in kernel space because that is useful when * debugging the kernel. */ - if (user_dbreg_trap() && - !(curpcb->pcb_flags & PCB_VM86CALL)) { - /* - * Reset breakpoint bits because the - * processor doesn't - */ - load_dr6(rdr6() & ~0xf); + if (user_dbreg_trap(dr6) && + !(curpcb->pcb_flags & PCB_VM86CALL)) return; - } /* * Malicious user code can configure a debug @@ -703,9 +704,6 @@ kernel_trctrap: * Otherwise, debugger traps "can't happen". */ #ifdef KDB - /* XXX %dr6 is not quite reentrant. */ - dr6 = rdr6(); - load_dr6(dr6 & ~0x4000); if (kdb_trap(type, dr6, frame)) return; #endif @@ -759,6 +757,12 @@ kernel_trctrap: KASSERT((read_eflags() & PSL_I) != 0, ("interrupts disabled")); trapsignal(td, &ksi); + /* + * Clear any pending debug exceptions after allowing a + * debugger to read DR6 while stopped in trapsignal(). + */ + if (type == T_TRCTRAP) + load_dr6(0); user: userret(td, frame); KASSERT(PCB_USER_FPU(td->td_pcb), Modified: head/sys/i386/include/db_machdep.h ============================================================================== --- head/sys/i386/include/db_machdep.h Mon May 21 21:52:48 2018 (r334008) +++ head/sys/i386/include/db_machdep.h Tue May 22 00:45:00 2018 (r334009) @@ -30,6 +30,7 @@ #define _MACHINE_DB_MACHDEP_H_ #include +#include #include typedef vm_offset_t db_addr_t; /* address - unsigned */ @@ -67,7 +68,8 @@ do { \ * unknown addresses and doesn't turn them off while it is running. */ #define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BPTFLT) -#define IS_SSTEP_TRAP(type, code) ((type) == T_TRCTRAP && (code) & 0x4000) +#define IS_SSTEP_TRAP(type, code) \ + ((type) == T_TRCTRAP && (code) & DBREG_DR6_BS) #define IS_WATCHPOINT_TRAP(type, code) 0 #define I_CALL 0xe8 Modified: head/sys/x86/include/reg.h ============================================================================== --- head/sys/x86/include/reg.h Mon May 21 21:52:48 2018 (r334008) +++ head/sys/x86/include/reg.h Tue May 22 00:45:00 2018 (r334009) @@ -206,6 +206,14 @@ struct __dbreg64 { /* Index 8-15: reserved */ }; +#define DBREG_DR6_RESERVED1 0xffff0ff0 +#define DBREG_DR6_BMASK 0x000f +#define DBREG_DR6_B(i) (1 << (i)) +#define DBREG_DR6_BD 0x2000 +#define DBREG_DR6_BS 0x4000 +#define DBREG_DR6_BT 0x8000 + +#define DBREG_DR7_RESERVED1 0x0400 #define DBREG_DR7_LOCAL_ENABLE 0x01 #define DBREG_DR7_GLOBAL_ENABLE 0x02 #define DBREG_DR7_LEN_1 0x00 /* 1 byte length */ @@ -236,6 +244,8 @@ struct __dbreg64 { #undef __dbreg64 #ifdef _KERNEL +struct thread; + /* * XXX these interfaces are MI, so they should be declared in a MI place. */ Modified: head/sys/x86/include/x86_var.h ============================================================================== --- head/sys/x86/include/x86_var.h Mon May 21 21:52:48 2018 (r334008) +++ head/sys/x86/include/x86_var.h Tue May 22 00:45:00 2018 (r334009) @@ -145,7 +145,7 @@ void nmi_handle_intr(u_int type, struct trapframe *fra void pagecopy(void *from, void *to); void printcpuinfo(void); int pti_get_default(void); -int user_dbreg_trap(void); +int user_dbreg_trap(register_t dr6); int minidumpsys(struct dumperinfo *); struct pcb *get_pcb_td(struct thread *td); From owner-svn-src-head@freebsd.org Tue May 22 01:18:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFE53EAC5C7; Tue, 22 May 2018 01:18:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 60B8C796F8; Tue, 22 May 2018 01:18:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id F07C8430034; Tue, 22 May 2018 11:18:16 +1000 (AEST) Date: Tue, 22 May 2018 11:18:16 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333995 - head/sys/teken In-Reply-To: <201805212035.w4LKZH0e091649@repo.freebsd.org> Message-ID: <20180522110110.H1292@besplex.bde.org> References: <201805212035.w4LKZH0e091649@repo.freebsd.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=nlC_4_pT8q9DhB4Ho9EA:9 a=F9gWMEonAAAA:8 a=2mErE-e0gEL2zMYWpcIA:9 a=45ClL6m2LaAA:10 a=bU0Msu77oMv5GzFOfog5:22 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 01:18:27 -0000 On Mon, 21 May 2018, [UTF-8] Jean-S=C3=A9bastien P=C3=A9dron wrote: > Log: > teken: Rename the "Set Cursor Style" sequence to match vt100.net docs > > This fixes inconsistencies with the rest of the `sequences` file. > > No functional changes. > > Requested by:=09ed >=20 > Modified: head/sys/teken/sequences > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/teken/sequences=09Mon May 21 20:23:04 2018=09(r333994) > +++ head/sys/teken/sequences=09Mon May 21 20:35:16 2018=09(r333995) > @@ -48,7 +48,7 @@ CUF=09Cursor Forward=09=09=09=09^[ [ a=09=09n > CUP=09Cursor Position=09=09=09=09^[ [ H=09=09n n > CUP=09Cursor Position=09=09=09=09^[ [ f=09=09n n > CUU=09Cursor Up=09=09=09=09^[ [ A=09=09n > -CS=09Cursor style=09=09=09=09^[ [ SP q=09r > +DECSCUSR=09Set Cursor Style=09=09^[ [ SP q=09r > DA1=09Primary Device Attributes=09=09^[ [ c=09=09r > DA2=09Secondary Device Attributes=09=09^[ [ > c=09r > DC=09Delete character=09=09=09^[ [ P=09=09n Any chance of keeping this file sorted? DECSCUSR is a verbose yet cryptic abbreviation which is not even expanded its name. It is the only abbreviation longer than 7 characters. This mess= es up the souce formatting. Not expanding DEC in the name is normal, but other letters are normally expanded. I don't know what USR is. It looks like a bad abbreviation for "user". 'S' in it might mean style. > Modified: head/sys/teken/teken_subr.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/teken/teken_subr.h=09Mon May 21 20:23:04 2018=09(r333994) > +++ head/sys/teken/teken_subr.h=09Mon May 21 20:35:16 2018=09(r333995) > @@ -372,7 +372,7 @@ teken_subr_cursor_up(teken_t *t, unsigned int nrows) > } > > static void > -teken_subr_cursor_style(teken_t *t, unsigned int style) > +teken_subr_set_cursor_style(teken_t *t, unsigned int style) > { > > =09/* TODO */ Names must be chosen carefully since they become function names which tend to be long and ugly. This one is not long but is a bit to generic. The worst function name double_height_double_width_line_bottom() has one of the best abbreviations (DECDHL). DEC is mercifully not spelled out in the function name, and Double Width Bottom is omitted from the abbreviation. Bruce From owner-svn-src-head@freebsd.org Tue May 22 02:13:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67205EB1EDA; Tue, 22 May 2018 02:13:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1375B7CBE1; Tue, 22 May 2018 02:13:06 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDF985B1C; Tue, 22 May 2018 02:13:05 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M2D5LC063915; Tue, 22 May 2018 02:13:05 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M2D5Kr063911; Tue, 22 May 2018 02:13:05 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805220213.w4M2D5Kr063911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 22 May 2018 02:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334010 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 334010 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 02:13:06 -0000 Author: eadler Date: Tue May 22 02:13:04 2018 New Revision: 334010 URL: https://svnweb.freebsd.org/changeset/base/334010 Log: top(1): unbreak build with gcc7; fix varargs - use correct function for varargs argument - allow build to complete with gcc7 at current WARNS Reported by: jhibbits, ian Modified: head/usr.bin/top/commands.c head/usr.bin/top/display.c head/usr.bin/top/machine.c head/usr.bin/top/top.c Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Tue May 22 00:45:00 2018 (r334009) +++ head/usr.bin/top/commands.c Tue May 22 02:13:04 2018 (r334010) @@ -129,11 +129,7 @@ next_field(char *str) } static int -scanint(str, intp) - -char *str; -int *intp; - +scanint(char *str, int *intp) { int val = 0; char ch; Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Tue May 22 00:45:00 2018 (r334009) +++ head/usr.bin/top/display.c Tue May 22 02:13:04 2018 (r334010) @@ -1011,7 +1011,7 @@ new_message(int type, char *msgfmt, ...) va_start(args, msgfmt); /* first, format the message */ - snprintf(next_msg, sizeof(next_msg), msgfmt, args); + vsnprintf(next_msg, sizeof(next_msg), msgfmt, args); va_end(args); Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Tue May 22 00:45:00 2018 (r334009) +++ head/usr.bin/top/machine.c Tue May 22 02:13:04 2018 (r334010) @@ -762,7 +762,6 @@ get_process_info(struct system_info *si, struct proces int show_self; int show_system; int show_uid; - int show_command; int show_kidle; /* @@ -832,7 +831,6 @@ get_process_info(struct system_info *si, struct proces show_self = sel->self == -1; show_system = sel->system; show_uid = sel->uid[0] != -1; - show_command = sel->command != NULL; show_kidle = sel->kidle; /* count up process states and get pointers to interesting procs */ @@ -984,8 +982,7 @@ format_next_process(caddr_t xhandle, char *(*get_useri break; default: - if (state >= 0 && - state < sizeof(state_abbrev) / sizeof(*state_abbrev)) + if (state < sizeof(state_abbrev) / sizeof(*state_abbrev)) sprintf(status, "%.6s", state_abbrev[state]); else sprintf(status, "?%5zu", state); Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Tue May 22 00:45:00 2018 (r334009) +++ head/usr.bin/top/top.c Tue May 22 02:13:04 2018 (r334010) @@ -94,7 +94,7 @@ static void (*d_process)(int line, char *thisline) = i static void reset_display(void); static void -reset_uids() +reset_uids(void) { for (size_t i = 0; i < TOP_MAX_UIDS; ++i) ps.uid[i] = -1; @@ -198,11 +198,7 @@ end: } int -main(argc, argv) - -int argc; -char *argv[]; - +main(int argc, char *argv[]) { int i; int active_procs; From owner-svn-src-head@freebsd.org Tue May 22 02:42:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35987EDB486; Tue, 22 May 2018 02:42:55 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D7C8D7E0FE; Tue, 22 May 2018 02:42:54 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B76F960C5; Tue, 22 May 2018 02:42:54 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M2gsvB078463; Tue, 22 May 2018 02:42:54 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M2gsU0078461; Tue, 22 May 2018 02:42:54 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201805220242.w4M2gsU0078461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 22 May 2018 02:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334011 - in head/sys: conf powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys: conf powerpc/powernv X-SVN-Commit-Revision: 334011 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 02:42:55 -0000 Author: jhibbits Date: Tue May 22 02:42:53 2018 New Revision: 334011 URL: https://svnweb.freebsd.org/changeset/base/334011 Log: Basic OPAL sensor support for POWER9 platforms Summary: PowerNV architectures (in the test case POWER9) export sensors via the device tree, which are accessed via OPAL calls. This adds sysctl nodes for each device in a generic fashion. New sysctl nodes are: dev.opal_sensor.N.sensor dev.opal_sensor.N.sensor_min dev.opal_sensor.N.sensor_max dev.opal_sensor.N.type dev.opal_sensor.N.label These are rooted at a parent attachment under opal, called opalsens. This does not add support for the "sensor groups" defined in the device tree. Reviewed by: breno.leitao_gmail.com Differential Revision: https://reviews.freebsd.org/D15362 Added: head/sys/powerpc/powernv/opal_sensor.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/powernv/opal.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue May 22 02:13:04 2018 (r334010) +++ head/sys/conf/files.powerpc Tue May 22 02:42:53 2018 (r334011) @@ -189,6 +189,7 @@ powerpc/powernv/opal_dev.c optional powernv powerpc/powernv/opal_i2c.c optional iicbus fdt powernv powerpc/powernv/opal_i2cm.c optional iicbus fdt powernv powerpc/powernv/opal_pci.c optional powernv pci +powerpc/powernv/opal_sensor.c optional powernv powerpc/powernv/opalcall.S optional powernv powerpc/powernv/platform_powernv.c optional powernv powerpc/powernv/powernv_centaur.c optional powernv Modified: head/sys/powerpc/powernv/opal.h ============================================================================== --- head/sys/powerpc/powernv/opal.h Tue May 22 02:13:04 2018 (r334010) +++ head/sys/powerpc/powernv/opal.h Tue May 22 02:42:53 2018 (r334011) @@ -72,6 +72,7 @@ int opal_call(uint64_t token, ...); #define OPAL_RETURN_CPU 69 #define OPAL_REINIT_CPUS 70 #define OPAL_CHECK_ASYNC_COMPLETION 86 +#define OPAL_SENSOR_READ 88 #define OPAL_I2C_REQUEST 109 #define OPAL_INT_GET_XIRR 122 #define OPAL_INT_SET_CPPR 123 @@ -79,6 +80,9 @@ int opal_call(uint64_t token, ...); #define OPAL_INT_SET_MFRR 125 #define OPAL_PCI_TCE_KILL 126 #define OPAL_XIVE_RESET 128 +#define OPAL_SENSOR_GROUP_CLEAR 156 +#define OPAL_SENSOR_READ_U64 162 +#define OPAL_SENSOR_GROUP_ENABLE 163 /* For OPAL_PCI_SET_PE */ #define OPAL_UNMAP_PE 0 Added: head/sys/powerpc/powernv/opal_sensor.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powernv/opal_sensor.c Tue May 22 02:42:53 2018 (r334011) @@ -0,0 +1,336 @@ +/*- + * Copyright (C) 2018 Justin Hibbits + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include + +#include "opal.h" + +struct opal_sensor_softc { + device_t sc_dev; + struct mtx sc_mtx; + uint32_t sc_handle; + uint32_t sc_min_handle; + uint32_t sc_max_handle; + char *sc_label; + int sc_type; +}; + +#define SENSOR_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define SENSOR_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define SENSOR_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ + "opal-sensor", MTX_DEF) + +/* + * A bit confusing, maybe. There are two types of nodes with compatible strings + * of "ibm,opal-sensor". One hangs off /ibm,opal/, named "sensors", the other + * hangs off of this node. For newbus attachments, we have one node (opalsens) + * attach from opal0, and the others (opal_sensor) attach from opalsens. These + * are the real sensors. + */ +enum opal_sensor_type { + OPAL_SENSOR_TEMP = 0, /* From OPAL: degC */ + OPAL_SENSOR_FAN = 1, /* From OPAL: RPM */ + OPAL_SENSOR_POWER = 2, /* From OPAL: W */ + OPAL_SENSOR_IN = 3, /* From OPAL: mV */ + OPAL_SENSOR_ENERGY = 4, /* From OPAL: uJ */ + OPAL_SENSOR_CURR = 5, /* From OPAL: mA */ + OPAL_SENSOR_MAX +}; + +/* This must be kept sorted with the enum above. */ +const char *opal_sensor_types[] = { + "temp", + "fan", + "power", + "in", + "energy", + "curr" +}; + +/* + * Retrieve the raw value from OPAL. This will be cooked by the sysctl handler. + */ +static int +opal_sensor_get_val(uint32_t key, uint64_t *val) +{ + struct opal_msg msg; + uint32_t val32; + int i, rv; + + rv = opal_call(OPAL_SENSOR_READ, key, key, vtophys(&val32)); + + if (rv == OPAL_ASYNC_COMPLETION) { + /* Sleep a little to let things settle. */ + DELAY(100); + bzero(&msg, sizeof(msg)); + i = 0; + do { + rv = opal_call(OPAL_CHECK_ASYNC_COMPLETION, + vtophys(&msg), sizeof(msg), key); + /* Sleep for ~100us if necessary. */ + if (rv == OPAL_BUSY) + DELAY(100); + } while (rv == OPAL_BUSY && ++i < 10); + if (rv != OPAL_SUCCESS) + return (EIO); + val32 = msg.params[0]; + } + + if (rv != OPAL_SUCCESS) + return (EIO); + + *val = val32; + + return (0); +} + +static int +opal_sensor_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct opal_sensor_softc *sc; + int error, result; + uint32_t sensor; + uint64_t sensval; + + sc = arg1; + sensor = arg2; + + SENSOR_LOCK(sc); + error = opal_sensor_get_val(sensor, &sensval); + SENSOR_UNLOCK(sc); + + if (error) + return (error); + + result = sensval; + + switch (sc->sc_type) { + case OPAL_SENSOR_TEMP: + result = result * 10 + 2731; /* Convert to K */ + break; + case OPAL_SENSOR_POWER: + result = result * 1000; /* Convert to mW */ + break; + } + + error = sysctl_handle_int(oidp, &result, 0, req); + + return (error); +} + +static int +opal_sensor_probe(device_t dev) +{ + if (!ofw_bus_is_compatible(dev, "ibm,opal-sensor")) + return (ENXIO); + + device_set_desc(dev, "OPAL sensor"); + return (BUS_PROBE_GENERIC); +} + +static int +opal_sensor_attach(device_t dev) +{ + struct opal_sensor_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + char type[8]; + phandle_t node; + cell_t sensor_id; + int i; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + node = ofw_bus_get_node(dev); + + if (OF_getencprop(node, "sensor-data", &sensor_id, sizeof(sensor_id)) < 0) { + device_printf(dev, "Missing sensor ID\n"); + return (ENXIO); + } + if (OF_getprop(node, "sensor-type", type, sizeof(type)) < 0) { + device_printf(dev, "Missing sensor type\n"); + return (ENXIO); + } + + sc->sc_type = -1; + for (i = 0; i < OPAL_SENSOR_MAX; i++) { + if (strcmp(type, opal_sensor_types[i]) == 0) { + sc->sc_type = i; + break; + } + } + if (sc->sc_type == -1) { + device_printf(dev, "Unknown sensor type '%s'\n", type); + return (ENXIO); + } + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + + sc->sc_handle = sensor_id; + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "sensor", CTLTYPE_INT | CTLFLAG_RD, sc, sensor_id, + opal_sensor_sysctl, (sc->sc_type == OPAL_MSG_TYPE_MAX) ? "IK" : "I", + "current value"); + + SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "type", + CTLFLAG_RD, __DECONST(char *, opal_sensor_types[sc->sc_type]), + 0, ""); + + OF_getprop_alloc(node, "label", (void **)&sc->sc_label); + SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "label", + CTLFLAG_RD, sc->sc_label, 0, ""); + + if (OF_getprop(node, "sensor-data-min", + &sensor_id, sizeof(sensor_id)) > 0) { + sc->sc_min_handle = sensor_id; + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "sensor_min", CTLTYPE_INT | CTLFLAG_RD, sc, sensor_id, + opal_sensor_sysctl, + (sc->sc_type == OPAL_MSG_TYPE_MAX) ? "IK" : "I", + "minimum value"); + } + + if (OF_getprop(node, "sensor-data-max", + &sensor_id, sizeof(sensor_id)) > 0) { + sc->sc_max_handle = sensor_id; + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "sensor_max", CTLTYPE_INT | CTLFLAG_RD, sc, sensor_id, + opal_sensor_sysctl, + (sc->sc_type == OPAL_MSG_TYPE_MAX) ? "IK" : "I", + "maximum value"); + } + + SENSOR_LOCK_INIT(sc); + + return (0); +} + +static device_method_t opal_sensor_methods[] = { + DEVMETHOD(device_probe, opal_sensor_probe), + DEVMETHOD(device_attach, opal_sensor_attach), +}; + +static driver_t opal_sensor_driver = { + "opal_sensor", + opal_sensor_methods, + sizeof(struct opal_sensor_softc) +}; + +static devclass_t opal_sensor_devclass; + +DRIVER_MODULE(opal_sensor, opalsens, opal_sensor_driver, opal_sensor_devclass, + NULL, NULL); + + +static int +opalsens_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "ibm,opal-sensor")) + return (ENXIO); + + device_set_desc(dev, "OPAL Sensors"); + return (BUS_PROBE_GENERIC); +} + +static int +opalsens_attach(device_t dev) +{ + phandle_t child; + device_t cdev; + struct ofw_bus_devinfo *dinfo; + + for (child = OF_child(ofw_bus_get_node(dev)); child != 0; + child = OF_peer(child)) { + dinfo = malloc(sizeof(*dinfo), M_DEVBUF, M_WAITOK | M_ZERO); + if (ofw_bus_gen_setup_devinfo(dinfo, child) != 0) { + free(dinfo, M_DEVBUF); + continue; + } + cdev = device_add_child(dev, NULL, -1); + if (cdev == NULL) { + device_printf(dev, "<%s>: device_add_child failed\n", + dinfo->obd_name); + ofw_bus_gen_destroy_devinfo(dinfo); + free(dinfo, M_DEVBUF); + continue; + } + device_set_ivars(cdev, dinfo); + } + + return (bus_generic_attach(dev)); +} + +static const struct ofw_bus_devinfo * +opalsens_get_devinfo(device_t dev, device_t child) +{ + return (device_get_ivars(child)); +} + +static device_method_t opalsens_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, opalsens_probe), + DEVMETHOD(device_attach, opalsens_attach), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, opalsens_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + + DEVMETHOD_END +}; + +static driver_t opalsens_driver = { + "opalsens", + opalsens_methods, + 0 +}; + +static devclass_t opalsens_devclass; + +DRIVER_MODULE(opalsens, opal, opalsens_driver, opalsens_devclass, NULL, NULL); From owner-svn-src-head@freebsd.org Tue May 22 03:24:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2993EE3AD9; Tue, 22 May 2018 03:24:17 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8432F80075; Tue, 22 May 2018 03:24:17 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 654D46857; Tue, 22 May 2018 03:24:17 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M3OHCa000102; Tue, 22 May 2018 03:24:17 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M3OHVq000101; Tue, 22 May 2018 03:24:17 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201805220324.w4M3OHVq000101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 22 May 2018 03:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334014 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 334014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 03:24:18 -0000 Author: jhibbits Date: Tue May 22 03:24:16 2018 New Revision: 334014 URL: https://svnweb.freebsd.org/changeset/base/334014 Log: Add a comment explaining the need of a global temporary variable cpu_xirr is used only as a temporary location for the OPAL call in PIC_DISPATCH(). Requested by: nwhitehorn Modified: head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/pseries/xics.c ============================================================================== --- head/sys/powerpc/pseries/xics.c Tue May 22 03:22:02 2018 (r334013) +++ head/sys/powerpc/pseries/xics.c Tue May 22 03:24:16 2018 (r334014) @@ -140,6 +140,15 @@ static driver_t xics_driver = { }; #ifdef POWERNV +/* We can only pass physical addresses into OPAL. Kernel stacks are in the KVA, + * not in the direct map, so we need to somehow extract the physical address. + * However, pmap_kextract() takes locks, which is forbidden in a critical region + * (which PMAP_DISPATCH() operates in). The kernel is mapped into the Direct + * Map (0xc000....), and the CPU implicitly drops the top two bits when doing + * real address by nature that the bus width is smaller than 64-bits. Placing + * cpu_xirr into the DMAP lets us take advantage of this and avoids the + * pmap_kextract() that would otherwise be needed if using the stack variable. + */ static uint32_t cpu_xirr[MAXCPU]; #endif From owner-svn-src-head@freebsd.org Tue May 22 03:57:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A0A2EE4BB0; Tue, 22 May 2018 03:57:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0000B80F51; Tue, 22 May 2018 03:57:33 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF7656D6F; Tue, 22 May 2018 03:57:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M3vXC1014818; Tue, 22 May 2018 03:57:33 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M3vXBs014815; Tue, 22 May 2018 03:57:33 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201805220357.w4M3vXBs014815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 22 May 2018 03:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334015 - in head/sys: conf powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys: conf powerpc/powernv X-SVN-Commit-Revision: 334015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 03:57:34 -0000 Author: jhibbits Date: Tue May 22 03:57:32 2018 New Revision: 334015 URL: https://svnweb.freebsd.org/changeset/base/334015 Log: Add an IPMI attachment for PowerNV systems IPMI access on PowerNV systems is done through the OPAL firmware. This adds a simple attachment for communicating with the FSP/BMC on these machines. This has been tested on a Talos POWER9 workstation, only in the bootup phase, noting the successful attachment messages: ... ipmi0: IPMI device rev. 0, firmware rev. 2.00, version 2.0, device support mask 0 ipmi0: Number of channels 2 ... The ipmi device has not been added to GENERIC64, but may be after further testing. It may also eventually be added to the ipmi module at that point. Added: head/sys/powerpc/powernv/opal_ipmi.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/powernv/opal.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue May 22 03:24:16 2018 (r334014) +++ head/sys/conf/files.powerpc Tue May 22 03:57:32 2018 (r334015) @@ -42,6 +42,7 @@ dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim +dev/ipmi/ipmi.c optional ipmi dev/nand/nfc_fsl.c optional nand mpc85xx dev/nand/nfc_rb.c optional nand mpc85xx # Most ofw stuff below is brought in by conf/files for options FDT, but @@ -188,6 +189,7 @@ powerpc/powernv/opal_console.c optional powernv powerpc/powernv/opal_dev.c optional powernv powerpc/powernv/opal_i2c.c optional iicbus fdt powernv powerpc/powernv/opal_i2cm.c optional iicbus fdt powernv +powerpc/powernv/opal_ipmi.c optional powernv ipmi powerpc/powernv/opal_pci.c optional powernv pci powerpc/powernv/opal_sensor.c optional powernv powerpc/powernv/opalcall.S optional powernv Modified: head/sys/powerpc/powernv/opal.h ============================================================================== --- head/sys/powerpc/powernv/opal.h Tue May 22 03:24:16 2018 (r334014) +++ head/sys/powerpc/powernv/opal.h Tue May 22 03:57:32 2018 (r334015) @@ -73,6 +73,8 @@ int opal_call(uint64_t token, ...); #define OPAL_REINIT_CPUS 70 #define OPAL_CHECK_ASYNC_COMPLETION 86 #define OPAL_SENSOR_READ 88 +#define OPAL_IPMI_SEND 107 +#define OPAL_IPMI_RECV 108 #define OPAL_I2C_REQUEST 109 #define OPAL_INT_GET_XIRR 122 #define OPAL_INT_SET_CPPR 123 @@ -106,8 +108,12 @@ int opal_call(uint64_t token, ...); #define OPAL_PARAMETER -1 #define OPAL_BUSY -2 #define OPAL_CLOSED -5 +#define OPAL_HARDWARE -6 +#define OPAL_UNSUPPORTED -7 +#define OPAL_RESOURCE -10 #define OPAL_BUSY_EVENT -12 #define OPAL_ASYNC_COMPLETION -15 +#define OPAL_EMPTY -16 struct opal_msg { uint32_t msg_type; @@ -125,6 +131,15 @@ enum opal_msg_type { OPAL_MSG_PRD = 6, OPAL_MSG_OCC = 7, OPAL_MSG_TYPE_MAX, +}; + +#define OPAL_IPMI_MSG_FORMAT_VERSION_1 1 + +struct opal_ipmi_msg { + uint8_t version; + uint8_t netfn; + uint8_t cmd; + uint8_t data[]; }; #endif Added: head/sys/powerpc/powernv/opal_ipmi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powernv/opal_ipmi.c Tue May 22 03:57:32 2018 (r334015) @@ -0,0 +1,241 @@ +/*- + * Copyright (C) 2018 Justin Hibbits + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include + +#include +#include + +#include "opal.h" + +struct opal_ipmi_softc { + struct ipmi_softc ipmi; + uint64_t sc_interface; + struct opal_ipmi_msg *sc_msg; /* Protected by IPMI lock */ +}; + +static MALLOC_DEFINE(M_IPMI, "ipmi", "OPAL IPMI"); + +static int +opal_ipmi_polled_request(struct opal_ipmi_softc *sc, struct ipmi_request *req, + int timo) +{ + uint64_t msg_len; + int err; + + /* Construct and send the message. */ + sc->sc_msg->version = OPAL_IPMI_MSG_FORMAT_VERSION_1; + sc->sc_msg->netfn = req->ir_addr; + sc->sc_msg->cmd = req->ir_command; + + if (req->ir_requestlen > IPMI_MAX_RX) { + err = ENOMEM; + goto out; + } + memcpy(sc->sc_msg->data, req->ir_request, req->ir_requestlen); + + msg_len = sizeof(*sc->sc_msg) + req->ir_requestlen; + err = opal_call(OPAL_IPMI_SEND, sc->sc_interface, vtophys(sc->sc_msg), + msg_len); + switch (err) { + case OPAL_SUCCESS: + break; + case OPAL_PARAMETER: + err = EINVAL; + goto out; + case OPAL_HARDWARE: + err = EIO; + goto out; + case OPAL_UNSUPPORTED: + err = EINVAL; + goto out; + case OPAL_RESOURCE: + err = ENOMEM; + goto out; + } + + timo *= 10; /* Timeout is in milliseconds, we delay in 100us */ + do { + msg_len = sizeof(struct opal_ipmi_msg) + IPMI_MAX_RX; + err = opal_call(OPAL_IPMI_RECV, sc->sc_interface, + vtophys(sc->sc_msg), vtophys(&msg_len)); + if (err != OPAL_EMPTY) + break; + DELAY(100); + } while (err == OPAL_EMPTY && timo-- != 0); + + switch (err) { + case OPAL_SUCCESS: + /* Subtract one extra for the completion code. */ + req->ir_replylen = msg_len - sizeof(struct opal_ipmi_msg) - 1; + req->ir_replylen = min(req->ir_replylen, req->ir_replybuflen); + memcpy(req->ir_reply, &sc->sc_msg->data[1], req->ir_replylen); + req->ir_compcode = sc->sc_msg->data[0]; + break; + case OPAL_RESOURCE: + err = ENOMEM; + break; + case OPAL_EMPTY: + err = EAGAIN; + break; + default: + err = EIO; + break; + } + +out: + + return (err); +} + +static int +opal_ipmi_probe(device_t dev) +{ + if (!ofw_bus_is_compatible(dev, "ibm,opal-ipmi")) + return (ENXIO); + + device_set_desc(dev, "OPAL IPMI System Interface"); + + return (BUS_PROBE_DEFAULT); +} + +static void +opal_ipmi_loop(void *arg) +{ + struct opal_ipmi_softc *sc = arg; + struct ipmi_request *req; + int i, ok; + + IPMI_LOCK(&sc->ipmi); + while ((req = ipmi_dequeue_request(&sc->ipmi)) != NULL) { + IPMI_UNLOCK(&sc->ipmi); + ok = 0; + for (i = 0; i < 3 && !ok; i++) { + IPMI_IO_LOCK(&sc->ipmi); + ok = opal_ipmi_polled_request(sc, req, MAX_TIMEOUT); + IPMI_IO_UNLOCK(&sc->ipmi); + } + if (ok) + req->ir_error = 0; + else + req->ir_error = EIO; + IPMI_LOCK(&sc->ipmi); + ipmi_complete_request(&sc->ipmi, req); + } + IPMI_UNLOCK(&sc->ipmi); + kproc_exit(0); +} + +static int +opal_ipmi_startup(struct ipmi_softc *sc) +{ + + return (kproc_create(opal_ipmi_loop, sc, &sc->ipmi_kthread, 0, 0, + "%s: opal", device_get_nameunit(sc->ipmi_dev))); +} + +static int +opal_ipmi_driver_request(struct ipmi_softc *isc, struct ipmi_request *req, + int timo) +{ + struct opal_ipmi_softc *sc = (struct opal_ipmi_softc *)isc; + int i, err; + + for (i = 0; i < 3; i++) { + IPMI_LOCK(&sc->ipmi); + err = opal_ipmi_polled_request(sc, req, timo); + IPMI_UNLOCK(&sc->ipmi); + if (err == 0) + break; + } + + req->ir_error = err; + + return (err); +} + +static int +opal_ipmi_attach(device_t dev) +{ + struct opal_ipmi_softc *sc; + + sc = device_get_softc(dev); + + if (OF_getencprop(ofw_bus_get_node(dev), "ibm,ipmi-interface-id", + (pcell_t*)&sc->sc_interface, sizeof(sc->sc_interface)) < 0) { + device_printf(dev, "Missing interface id\n"); + return (ENXIO); + } + sc->ipmi.ipmi_startup = opal_ipmi_startup; + sc->ipmi.ipmi_driver_request = opal_ipmi_driver_request; + sc->ipmi.ipmi_dev = dev; + + sc->sc_msg = malloc(sizeof(struct opal_ipmi_msg) + IPMI_MAX_RX, M_IPMI, + M_WAITOK | M_ZERO); + + return (ipmi_attach(dev)); +} + +static int +opal_ipmi_detach(device_t dev) +{ + return (EBUSY); +} + +static device_method_t opal_ipmi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, opal_ipmi_probe), + DEVMETHOD(device_attach, opal_ipmi_attach), + DEVMETHOD(device_detach, opal_ipmi_detach), + DEVMETHOD_END +}; + +static driver_t opal_ipmi_driver = { + "ipmi", + opal_ipmi_methods, + sizeof(struct opal_ipmi_softc) +}; + +DRIVER_MODULE(opal_ipmi, opal, opal_ipmi_driver, ipmi_devclass, NULL, NULL); From owner-svn-src-head@freebsd.org Tue May 22 04:08:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40D4BEE5409; Tue, 22 May 2018 04:08:09 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E80FD815DF; Tue, 22 May 2018 04:08:08 +0000 (UTC) (envelope-from araujo@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C920B6F2E; Tue, 22 May 2018 04:08:08 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M488c4020316; Tue, 22 May 2018 04:08:08 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M4889c020315; Tue, 22 May 2018 04:08:08 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201805220408.w4M4889c020315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 22 May 2018 04:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334016 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 334016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 04:08:09 -0000 Author: araujo Date: Tue May 22 04:08:08 2018 New Revision: 334016 URL: https://svnweb.freebsd.org/changeset/base/334016 Log: We must free the variable str. Spotted by: clang's static analyzer Submitted by: Tom Rix Reviewed by: grehan MFC after: 4 weeks Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D10009 Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Tue May 22 03:57:32 2018 (r334015) +++ head/usr.sbin/bhyve/pci_emul.c Tue May 22 04:08:08 2018 (r334016) @@ -231,8 +231,7 @@ pci_parse_slot(char *opt) si->si_funcs[fnum].fi_param = config; done: - if (error) - free(str); + free(str); return (error); } From owner-svn-src-head@freebsd.org Tue May 22 04:14:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB830EE5897; Tue, 22 May 2018 04:14:02 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F26A81A86; Tue, 22 May 2018 04:14:01 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LbM2k-1g4W3H1IUc-00kuFi; Tue, 22 May 2018 06:13:53 +0200 Date: Tue, 22 May 2018 06:13:45 +0200 From: "O. Hartmann" To: Jilles Tjoelker Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334008 - head/bin/sh Message-ID: <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201805212152.w4LLqmOi033238@repo.freebsd.org> References: <201805212152.w4LLqmOi033238@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:gS63a1MXnjoUdgS/Z4uzOUuJLZhk49GT268MtF0jbBiIdWQT1X2 73j5rmzaeQNX3NAW8yjvq2rDwzVft9YibyP4Rx76TvedQa+YVPyQ7+DuFniVUE73++n1s9f RCgNZGj5yWa+TxRo6au5GFW/7GqXH2DBmMwHYi84N+thqBUSnXJxd9sPQzfXZKTz9LVLhft MD1JB/5ubXWjX0Rp7zRiA== X-UI-Out-Filterresults: notjunk:1;V01:K0:m+mcj8MucAk=:kyFbFPpnqOy68bV7lQ2B5l r+S2AKgu5Wi8SF1yR1fW55HhXjjLGoXIF+eMolygnI7Vh9dO5L5bDwdhar9FBGSEG9E0f++oD g4BEG8brIB2w5SMlEFii+B8D6LmtMuWwaXqkTd/0Vuo4w3/PmtYoK09Ah3bB8iQXH/NRZrS0K d4p7OKb4RmPKfOZXtP8WHISegyFtcSfdD7UW6jwqlYhx8b9/dixLO9ymmajuOfa/yRzPcCt2M k2KOf9CHMt8Mw0E6SkcCeGZ4imqKyjJ4nT8qDSBZNdJi5NT32C+wyvzYFCZSwT4rmJODsryG1 jCVhHPt+H2Bh4iE4iggYHYj5GkD2eTDSD5ruwaY/9Us/GnfsPmymv+FUcI3LVaEZYqI7onvju P96XC4ikEiPg8JerhGU1tJuh9nyalUxFe+oqxp4BAO8ayxxlPO68redJZosRay8smwKwws5RP d357cLhi37efEg3FWNlB3zNIp73h+VI/Whikq+2EMNTclJ9fjr3hnaN23zk+E22PzHdVOA2n6 rzyIizroVDwdfziVjb45AozKH4PAVY8Za0qC16dd3/kumbdYksDJWsuChUy9jE+XBL3Y65R/R FPy08FEgyMsmiWhqLAv5RzTOuLqRfVBLrtTUouU8HJepoDuqa2ACzxUofg8Yfq3kyFTTr33mJ VGJC9traCXNYyiLZt79eXvTmwbP7cPbXgxec090/GRzVZRFTaTLeGpH7pQBJVcl7pIi1wWn+7 Vgs9qXfxjgB9aJrN9MgN8pFl3eOO2kmuJNO8OWy10eyJfYZLYCsErKTtyFCvmXZ2bYMahck5w 0iGWfk5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 04:14:03 -0000 On Mon, 21 May 2018 21:52:48 +0000 (UTC) Jilles Tjoelker wrote: > Author: jilles > Date: Mon May 21 21:52:48 2018 > New Revision: 334008 > URL: https://svnweb.freebsd.org/changeset/base/334008 > > Log: > sh: Split CNL syntax category to avoid a check on state[level].syntax > > No functional change is intended. > > Modified: > head/bin/sh/mksyntax.c > head/bin/sh/parser.c > > Modified: head/bin/sh/mksyntax.c > ============================================================================== > --- head/bin/sh/mksyntax.c Mon May 21 21:44:47 2018 (r334007) > +++ head/bin/sh/mksyntax.c Mon May 21 21:52:48 2018 (r334008) > @@ -65,6 +65,7 @@ struct synclass { > static const struct synclass synclass[] = { > { "CWORD", "character is nothing special" }, > { "CNL", "newline character" }, > + { "CQNL", "newline character in quotes" }, > { "CBACK", "a backslash character" }, > { "CSBACK", "a backslash character in single quotes" }, > { "CSQUOTE", "single quote" }, > @@ -185,7 +186,7 @@ main(int argc __unused, char **argv __unused) > fputs("\n/* syntax table used when in double quotes */\n", cfile); > init("dqsyntax"); > add_default(); > - add("\n", "CNL"); > + add("\n", "CQNL"); > add("\\", "CBACK"); > add("\"", "CENDQUOTE"); > add("`", "CBQUOTE"); > @@ -198,7 +199,7 @@ main(int argc __unused, char **argv __unused) > fputs("\n/* syntax table used when in single quotes */\n", cfile); > init("sqsyntax"); > add_default(); > - add("\n", "CNL"); > + add("\n", "CQNL"); > add("\\", "CSBACK"); > add("'", "CENDQUOTE"); > /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */ > @@ -208,7 +209,7 @@ main(int argc __unused, char **argv __unused) > fputs("\n/* syntax table used when in arithmetic */\n", cfile); > init("arisyntax"); > add_default(); > - add("\n", "CNL"); > + add("\n", "CQNL"); > add("\\", "CBACK"); > add("`", "CBQUOTE"); > add("\"", "CIGN"); > > Modified: head/bin/sh/parser.c > ============================================================================== > --- head/bin/sh/parser.c Mon May 21 21:44:47 2018 (r334007) > +++ head/bin/sh/parser.c Mon May 21 21:52:48 2018 (r334008) > @@ -1434,9 +1434,10 @@ readtoken1(int firstc, char const *initialsyntax, cons > > switch(synentry) { > case CNL: /* '\n' */ > - if (level == 0 && > - state[level].syntax == BASESYNTAX) > + if (level == 0) > goto endword; /* exit outer > loop */ > + /* FALLTHROUGH */ > + case CQNL: > USTPUTC(c, out); > plinno++; > if (doprompt) > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Have this been tested? Doesn't compile for me: [...] Building /usr/obj/usr/src/amd64.amd64/kerberos5/libexec/hprop/hprop --- all_subdir_rescue --- --- parser.o --- /usr/src/bin/sh/parser.c:1440:9: error: use of undeclared identifier 'CQNL' case CQNL: ^ --- all_subdir_gnu --- Building /usr/obj/usr/src/amd64.amd64/gnu/usr.bin/gdb/libgdb/amd64bsd-nat.o --- all_subdir_rescue --- 1 error generated. *** [parser.o] Error code 1 make[6]: stopped in /usr/src/bin/sh From owner-svn-src-head@freebsd.org Tue May 22 04:45:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5B32EE65F1; Tue, 22 May 2018 04:45:47 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97D35826D0; Tue, 22 May 2018 04:45:47 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6079975D1; Tue, 22 May 2018 04:45:47 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M4jl7L041560; Tue, 22 May 2018 04:45:47 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M4jkRD041557; Tue, 22 May 2018 04:45:46 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805220445.w4M4jkRD041557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 22 May 2018 04:45:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334017 - in head: lib/libpmcstat usr.sbin/pmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: lib/libpmcstat usr.sbin/pmcstat X-SVN-Commit-Revision: 334017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 04:45:48 -0000 Author: mmacy Date: Tue May 22 04:45:46 2018 New Revision: 334017 URL: https://svnweb.freebsd.org/changeset/base/334017 Log: pmcstat: add option to not decode the leaf function in top mode -I will allow the user to see the hot instruction in question as opposed getting the name of the function Modified: head/lib/libpmcstat/libpmcstat.h head/usr.sbin/pmcstat/pmcpl_callgraph.c head/usr.sbin/pmcstat/pmcstat.c Modified: head/lib/libpmcstat/libpmcstat.h ============================================================================== --- head/lib/libpmcstat/libpmcstat.h Tue May 22 04:08:08 2018 (r334016) +++ head/lib/libpmcstat/libpmcstat.h Tue May 22 04:45:46 2018 (r334017) @@ -106,6 +106,7 @@ struct pmcstat_args { #define FLAGS_HAS_CPUMASK 0x00040000 /* -c */ #define FLAG_HAS_DURATION 0x00080000 /* -l secs */ #define FLAG_DO_WIDE_GPROF_HC 0x00100000 /* -e */ +#define FLAG_SKIP_TOP_FN_RES 0x00200000 /* -I */ int pa_required; /* required features */ int pa_pplugin; /* pre-processing plugin */ Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_callgraph.c Tue May 22 04:08:08 2018 (r334016) +++ head/usr.sbin/pmcstat/pmcpl_callgraph.c Tue May 22 04:45:46 2018 (r334017) @@ -473,7 +473,7 @@ pmcstat_callgraph_print(void) static void pmcstat_cgnode_topprint(struct pmcstat_cgnode *cg, - int depth, uint32_t nsamples) + int depth __unused, uint32_t nsamples) { int v_attrs, vs_len, ns_len, width, len, n, nchildren; float v; @@ -481,15 +481,15 @@ pmcstat_cgnode_topprint(struct pmcstat_cgnode *cg, struct pmcstat_symbol *sym; struct pmcstat_cgnode **sortbuffer, **cgn, *pcg; - (void) depth; - /* Format value. */ v = PMCPL_CG_COUNTP(cg); snprintf(vs, sizeof(vs), "%.1f", v); v_attrs = PMCSTAT_ATTRPERCENT(v); + sym = NULL; /* Format name. */ - sym = pmcstat_symbol_search(cg->pcg_image, cg->pcg_func); + if (!(args.pa_flags & FLAG_SKIP_TOP_FN_RES)) + sym = pmcstat_symbol_search(cg->pcg_image, cg->pcg_func); if (sym != NULL) { snprintf(ns, sizeof(ns), "%s", pmcstat_string_unintern(sym->ps_name)); Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Tue May 22 04:08:08 2018 (r334016) +++ head/usr.sbin/pmcstat/pmcstat.c Tue May 22 04:45:46 2018 (r334017) @@ -500,7 +500,7 @@ main(int argc, char **argv) CPU_COPY(&rootmask, &cpumask); while ((option = getopt(argc, argv, - "CD:EF:G:M:NO:P:R:S:TWa:c:def:gk:l:m:n:o:p:qr:s:t:vw:z:")) != -1) + "CD:EF:G:IM:NO:P:R:S:TWa:c:def:gk:l:m:n:o:p:qr:s:t:vw:z:")) != -1) switch (option) { case 'a': /* Annotate + callgraph */ args.pa_flags |= FLAG_DO_ANNOTATE; @@ -569,6 +569,9 @@ main(int argc, char **argv) args.pa_plugin = PMCSTAT_PL_GPROF; break; + case 'I': + args.pa_flags |= FLAG_SKIP_TOP_FN_RES; + break; case 'k': /* pathname to the kernel */ free(args.pa_kernel); args.pa_kernel = strdup(optarg); From owner-svn-src-head@freebsd.org Tue May 22 04:46:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08D96EE665D; Tue, 22 May 2018 04:46:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AC49282860; Tue, 22 May 2018 04:46:06 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id KzBLfxm3TuYopKzBNfeJSe; Mon, 21 May 2018 22:45:59 -0600 X-Authority-Analysis: v=2.3 cv=GopsBH9C c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=LcHKg_ejYAhpDSSuxu0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 1636622A3; Mon, 21 May 2018 21:45:55 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4M4jsjA019559; Mon, 21 May 2018 21:45:54 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4M4jroR019550; Mon, 21 May 2018 21:45:53 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805220445.w4M4jroR019550@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "O. Hartmann" cc: Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334008 - head/bin/sh In-Reply-To: Message from "O. Hartmann" of "Tue, 22 May 2018 06:13:45 +0200." <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 21 May 2018 21:45:53 -0700 X-CMAE-Envelope: MS4wfBpKdSZNILZ6c08K2CTNv9j3ggC9bGGb0MZwZlsLhAvRscpCmte5Bn+79Cfmvn8chLodgnojLXi1ZqiHIor8HpfuCLc+PANr0bEPPUo2YrzI2sQBFUAe yw/hT/phXohvEsjCnt3cSyACdqsWFqD8ftiraJk0x64mBLkeWPi5d5mKezCX3baIH3FcXgtb4wloLJMR8mz4DYOoPdjPo6/90ycHK4yoeIhKFTM8Sm6G8fsY QG72zGLSJZN2lZv2WMfx/U7x2b2WfyDOLpF6nfPsQEXaX0xfIuVEtJLnBLic081/eGYYyTcfvGT3H2NB2WkkQg== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 04:46:09 -0000 In message <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> , "O. H artmann" writes: > On Mon, 21 May 2018 21:52:48 +0000 (UTC) > Jilles Tjoelker wrote: > > > Author: jilles > > Date: Mon May 21 21:52:48 2018 > > New Revision: 334008 > > URL: https://svnweb.freebsd.org/changeset/base/334008 > > > > Log: > > sh: Split CNL syntax category to avoid a check on state[level].syntax > > > > No functional change is intended. > > > > Modified: > > head/bin/sh/mksyntax.c > > head/bin/sh/parser.c > > > > Modified: head/bin/sh/mksyntax.c > > =========================================================================== > === > > --- head/bin/sh/mksyntax.c Mon May 21 21:44:47 2018 (r334007) > > +++ head/bin/sh/mksyntax.c Mon May 21 21:52:48 2018 (r334008) > > @@ -65,6 +65,7 @@ struct synclass { > > static const struct synclass synclass[] = { > > { "CWORD", "character is nothing special" }, > > { "CNL", "newline character" }, > > + { "CQNL", "newline character in quotes" }, > > { "CBACK", "a backslash character" }, > > { "CSBACK", "a backslash character in single quotes" }, > > { "CSQUOTE", "single quote" }, > > @@ -185,7 +186,7 @@ main(int argc __unused, char **argv __unused) > > fputs("\n/* syntax table used when in double quotes */\n", cfile); > > init("dqsyntax"); > > add_default(); > > - add("\n", "CNL"); > > + add("\n", "CQNL"); > > add("\\", "CBACK"); > > add("\"", "CENDQUOTE"); > > add("`", "CBQUOTE"); > > @@ -198,7 +199,7 @@ main(int argc __unused, char **argv __unused) > > fputs("\n/* syntax table used when in single quotes */\n", cfile); > > init("sqsyntax"); > > add_default(); > > - add("\n", "CNL"); > > + add("\n", "CQNL"); > > add("\\", "CSBACK"); > > add("'", "CENDQUOTE"); > > /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */ > > @@ -208,7 +209,7 @@ main(int argc __unused, char **argv __unused) > > fputs("\n/* syntax table used when in arithmetic */\n", cfile); > > init("arisyntax"); > > add_default(); > > - add("\n", "CNL"); > > + add("\n", "CQNL"); > > add("\\", "CBACK"); > > add("`", "CBQUOTE"); > > add("\"", "CIGN"); > > > > Modified: head/bin/sh/parser.c > > =========================================================================== > === > > --- head/bin/sh/parser.c Mon May 21 21:44:47 2018 (r334007) > > +++ head/bin/sh/parser.c Mon May 21 21:52:48 2018 (r334008) > > @@ -1434,9 +1434,10 @@ readtoken1(int firstc, char const *initialsyntax, co > ns > > > > switch(synentry) { > > case CNL: /* '\n' */ > > - if (level == 0 && > > - state[level].syntax == BASESYNTAX) > > + if (level == 0) > > goto endword; /* exit outer > > loop */ > > + /* FALLTHROUGH */ > > + case CQNL: > > USTPUTC(c, out); > > plinno++; > > if (doprompt) > > _______________________________________________ > > svn-src-head@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > > Have this been tested? Doesn't compile for me: > > [...] > Building /usr/obj/usr/src/amd64.amd64/kerberos5/libexec/hprop/hprop > --- all_subdir_rescue --- > --- parser.o --- > /usr/src/bin/sh/parser.c:1440:9: error: use of undeclared identifier 'CQNL' > case CQNL: > ^ > --- all_subdir_gnu --- > Building /usr/obj/usr/src/amd64.amd64/gnu/usr.bin/gdb/libgdb/amd64bsd-nat.o > --- all_subdir_rescue --- > 1 error generated. > *** [parser.o] Error code 1 > > make[6]: stopped in /usr/src/bin/sh > CQNL is defined in /usr/obj/opt/src/svn-current/amd64.amd64/bin/sh/synta x.h, generated by mksyntax. slippy$ ag -s CQNL /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/*. h /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/syntax.h 11:#define CQNL 2 /* newline character in quotes */ slippy$ Remove the file if it's not defined in your syntax.h. Just out of interest, do you use meta mode? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Tue May 22 05:09:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84CA7EE6CC2; Tue, 22 May 2018 05:09:34 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B7BA83080; Tue, 22 May 2018 05:09:34 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 089487914; Tue, 22 May 2018 05:09:34 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M59Xuj051460; Tue, 22 May 2018 05:09:33 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M59Xp5051457; Tue, 22 May 2018 05:09:33 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805220509.w4M59Xp5051457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 22 May 2018 05:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334018 - in head/sys/i386: i386 include X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys/i386: i386 include X-SVN-Commit-Revision: 334018 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 05:09:34 -0000 Author: mmacy Date: Tue May 22 05:09:33 2018 New Revision: 334018 URL: https://svnweb.freebsd.org/changeset/base/334018 Log: fix i386 builds after r334005 and r334009 r334005: add pc_ibpb_set as it is now referenced by common code (although presumably not needed on i386 since it has been there since the first spectre mitigation work on amd64) r334009: there is no amd64 rflags -> i386 eflags Modified: head/sys/i386/i386/trap.c head/sys/i386/include/pcpu.h Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Tue May 22 04:45:46 2018 (r334017) +++ head/sys/i386/i386/trap.c Tue May 22 05:09:33 2018 (r334018) @@ -338,7 +338,7 @@ user_trctrap_out: ucode = TRAP_TRACE; dr6 = rdr6(); if (dr6 & DBREG_DR6_BS) - frame->tf_rflags &= ~PSL_T; + frame->tf_eflags &= ~PSL_T; break; case T_ARITHTRAP: /* arithmetic trap */ Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Tue May 22 04:45:46 2018 (r334017) +++ head/sys/i386/include/pcpu.h Tue May 22 05:09:33 2018 (r334018) @@ -77,7 +77,8 @@ struct sx pc_copyout_slock; \ char *pc_copyout_buf; \ uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ - char __pad[550] + uint32_t pc_ibpb_set; \ + char __pad[546] #ifdef _KERNEL From owner-svn-src-head@freebsd.org Tue May 22 05:21:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2952EE7414; Tue, 22 May 2018 05:21:54 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D225839A0; Tue, 22 May 2018 05:21:54 +0000 (UTC) (envelope-from araujo@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F7117C04; Tue, 22 May 2018 05:21:54 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M5LscW058541; Tue, 22 May 2018 05:21:54 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M5LsnR058540; Tue, 22 May 2018 05:21:54 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201805220521.w4M5LsnR058540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 22 May 2018 05:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334019 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 334019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 05:21:55 -0000 Author: araujo Date: Tue May 22 05:21:53 2018 New Revision: 334019 URL: https://svnweb.freebsd.org/changeset/base/334019 Log: Include atkbdc header where there are declared the prototype functions atkbdc_event and atkbdc_init. MFC after: 4 weeks. Sponsored by: iXsystems Inc. Modified: head/usr.sbin/bhyve/atkbdc.c Modified: head/usr.sbin/bhyve/atkbdc.c ============================================================================== --- head/usr.sbin/bhyve/atkbdc.c Tue May 22 05:09:33 2018 (r334018) +++ head/usr.sbin/bhyve/atkbdc.c Tue May 22 05:21:53 2018 (r334019) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include "acpi.h" +#include "atkbdc.h" #include "inout.h" #include "pci_emul.h" #include "pci_irq.h" From owner-svn-src-head@freebsd.org Tue May 22 05:49:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3A77EE7B4F; Tue, 22 May 2018 05:49:41 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89BAE84682; Tue, 22 May 2018 05:49:41 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66D137F6F; Tue, 22 May 2018 05:49:41 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M5nf1t071872; Tue, 22 May 2018 05:49:41 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M5nfVJ071871; Tue, 22 May 2018 05:49:41 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805220549.w4M5nfVJ071871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 22 May 2018 05:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334020 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 334020 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 05:49:42 -0000 Author: mmacy Date: Tue May 22 05:49:40 2018 New Revision: 334020 URL: https://svnweb.freebsd.org/changeset/base/334020 Log: pmc: annotate locking for po_ssnext in pmc_owner Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Tue May 22 05:21:53 2018 (r334019) +++ head/sys/sys/pmc.h Tue May 22 05:49:40 2018 (r334020) @@ -657,6 +657,8 @@ struct pmc_op_getdyneventinfo { * (b) - pmc_bufferlist_mtx (spin lock) * (k) - pmc_kthread_mtx (sleep lock) * (o) - po->po_mtx (spin lock) + * (g) - global_epoch_preempt (epoch) + * (p) - pmc_sx (sx) */ /* @@ -852,7 +854,7 @@ struct pmc_process { struct pmc_owner { LIST_ENTRY(pmc_owner) po_next; /* hash chain */ - CK_LIST_ENTRY(pmc_owner) po_ssnext; /* list of SS PMC owners */ + CK_LIST_ENTRY(pmc_owner) po_ssnext; /* (g/p) list of SS PMC owners */ LIST_HEAD(, pmc) po_pmcs; /* owned PMC list */ TAILQ_HEAD(, pmclog_buffer) po_logbuffers; /* (o) logbuffer list */ struct mtx po_mtx; /* spin lock for (o) */ From owner-svn-src-head@freebsd.org Tue May 22 06:02:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60610EE7F64; Tue, 22 May 2018 06:02:12 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FE7084C1C; Tue, 22 May 2018 06:02:12 +0000 (UTC) (envelope-from araujo@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E523310179; Tue, 22 May 2018 06:02:11 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M62BOa081594; Tue, 22 May 2018 06:02:11 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M62BKO081593; Tue, 22 May 2018 06:02:11 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201805220602.w4M62BKO081593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 22 May 2018 06:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334021 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 334021 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 06:02:12 -0000 Author: araujo Date: Tue May 22 06:02:11 2018 New Revision: 334021 URL: https://svnweb.freebsd.org/changeset/base/334021 Log: Revert: r334016 Revert for now this change, it in somehow breaks init_pci. Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Tue May 22 05:49:40 2018 (r334020) +++ head/usr.sbin/bhyve/pci_emul.c Tue May 22 06:02:11 2018 (r334021) @@ -231,7 +231,8 @@ pci_parse_slot(char *opt) si->si_funcs[fnum].fi_param = config; done: - free(str); + if (error) + free(str); return (error); } From owner-svn-src-head@freebsd.org Tue May 22 06:22:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2B6CEE8535; Tue, 22 May 2018 06:22:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63BEA8583D; Tue, 22 May 2018 06:22:59 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45FC9105C9; Tue, 22 May 2018 06:22:59 +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 w4M6Mxgw091511; Tue, 22 May 2018 06:22:59 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M6MxHm091510; Tue, 22 May 2018 06:22:59 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201805220622.w4M6MxHm091510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 22 May 2018 06:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334022 - head/lib/libc/tests/stdio X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/lib/libc/tests/stdio X-SVN-Commit-Revision: 334022 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 06:22:59 -0000 Author: cy Date: Tue May 22 06:22:58 2018 New Revision: 334022 URL: https://svnweb.freebsd.org/changeset/base/334022 Log: Conform to Berne Convention. MFC after: 3 days Modified: head/lib/libc/tests/stdio/gets_s_test.c Modified: head/lib/libc/tests/stdio/gets_s_test.c ============================================================================== --- head/lib/libc/tests/stdio/gets_s_test.c Tue May 22 06:02:11 2018 (r334021) +++ head/lib/libc/tests/stdio/gets_s_test.c Tue May 22 06:22:58 2018 (r334022) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Cyril S. E. Schubert. All rights reserved. + * Copyright (c) 2017 Cyril S. E. Schubert * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-head@freebsd.org Tue May 22 07:16:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E80D6EEA6CC; Tue, 22 May 2018 07:16:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 931FB86E89; Tue, 22 May 2018 07:16:39 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 731C810DB3; Tue, 22 May 2018 07:16:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M7GdQS016844; Tue, 22 May 2018 07:16:39 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M7GdKR016843; Tue, 22 May 2018 07:16:39 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201805220716.w4M7GdKR016843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 22 May 2018 07:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334023 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 07:16:40 -0000 Author: mjg Date: Tue May 22 07:16:39 2018 New Revision: 334023 URL: https://svnweb.freebsd.org/changeset/base/334023 Log: rw: decrease writer starvation Writers waiting on readers to finish can set the RW_LOCK_WRITE_SPINNER bit. This prevents most new readers from coming on. However, the last reader to unlock also clears the bit which means new readers can sneak in and the cycle starts over. Change the code to keep the bit after last unlock. Note that starvation potential is still there: no matter how many write spinners are there, there is one bit. After the writer unlocks, the lock is free to get raided by readers again. It is good enough for the time being. The real fix would include counting writers. This runs into a caveat: the writer which set the bit may now be preempted. In order to get rid of the problem all attempts to set the bit are preceeded with critical_enter. The bit gets cleared when the thread which set it goes to sleep. This way an invariant holds that if the bit is set, someone is actively spinning and will grab the lock soon. In particular this means that readers which find the lock in this transient state can safely spin until the lock finds itself an owner (i.e. they don't need to block nor speculate how long to spin speculatively). Tested by: pho Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Tue May 22 06:22:58 2018 (r334022) +++ head/sys/kern/kern_rwlock.c Tue May 22 07:16:39 2018 (r334023) @@ -510,25 +510,38 @@ __rw_rlock_hard(struct rwlock *rw, struct thread *td, sched_tdname(curthread), "running"); continue; } - } else if (spintries < rowner_retries) { - spintries++; - KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), - "spinning", "lockname:\"%s\"", - rw->lock_object.lo_name); - for (i = 0; i < rowner_loops; i += n) { - n = RW_READERS(v); - lock_delay_spin(n); + } else { + if ((v & RW_LOCK_WRITE_SPINNER) && RW_READERS(v) == 0) { + MPASS(!__rw_can_read(td, v, false)); + lock_delay_spin(2); v = RW_READ_VALUE(rw); - if ((v & RW_LOCK_READ) == 0 || __rw_can_read(td, v, false)) - break; + continue; } + if (spintries < rowner_retries) { + spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); + n = RW_READERS(v); + for (i = 0; i < rowner_loops; i += n) { + lock_delay_spin(n); + v = RW_READ_VALUE(rw); + if (!(v & RW_LOCK_READ)) + break; + n = RW_READERS(v); + if (n == 0) + break; + if (__rw_can_read(td, v, false)) + break; + } #ifdef KDTRACE_HOOKS - lda.spin_cnt += rowner_loops - i; + lda.spin_cnt += rowner_loops - i; #endif - KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), - "running"); - if (i < rowner_loops) - continue; + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); + if (i < rowner_loops) + continue; + } } #endif @@ -546,7 +559,8 @@ __rw_rlock_hard(struct rwlock *rw, struct thread *td, */ v = RW_READ_VALUE(rw); retry_ts: - if (__rw_can_read(td, v, false)) { + if (((v & RW_LOCK_WRITE_SPINNER) && RW_READERS(v) == 0) || + __rw_can_read(td, v, false)) { turnstile_cancel(ts); continue; } @@ -726,11 +740,7 @@ __rw_runlock_try(struct rwlock *rw, struct thread *td, { for (;;) { - /* - * See if there is more than one read lock held. If so, - * just drop one and return. - */ - if (RW_READERS(*vp) > 1) { + if (RW_READERS(*vp) > 1 || !(*vp & RW_LOCK_WAITERS)) { if (atomic_fcmpset_rel_ptr(&rw->rw_lock, vp, *vp - RW_ONE_READER)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) @@ -743,23 +753,6 @@ __rw_runlock_try(struct rwlock *rw, struct thread *td, } continue; } - /* - * If there aren't any waiters for a write lock, then try - * to drop it quickly. - */ - if (!(*vp & RW_LOCK_WAITERS)) { - MPASS((*vp & ~RW_LOCK_WRITE_SPINNER) == - RW_READERS_LOCK(1)); - if (atomic_fcmpset_rel_ptr(&rw->rw_lock, vp, - RW_UNLOCKED)) { - if (LOCK_LOG_TEST(&rw->lock_object, 0)) - CTR2(KTR_LOCK, "%s: %p last succeeded", - __func__, rw); - td->td_rw_rlocks--; - return (true); - } - continue; - } break; } return (false); @@ -788,7 +781,6 @@ __rw_runlock_hard(struct rwlock *rw, struct thread *td if (__rw_runlock_try(rw, td, &v)) break; - v &= (RW_LOCK_WAITERS | RW_LOCK_WRITE_SPINNER); MPASS(v & RW_LOCK_WAITERS); /* @@ -813,7 +805,7 @@ __rw_runlock_hard(struct rwlock *rw, struct thread *td queue = TS_EXCLUSIVE_QUEUE; setv |= (v & RW_LOCK_READ_WAITERS); } - v |= RW_READERS_LOCK(1); + setv |= (v & RW_LOCK_WRITE_SPINNER); if (!atomic_fcmpset_rel_ptr(&rw->rw_lock, &v, setv)) continue; if (LOCK_LOG_TEST(&rw->lock_object, 0)) @@ -872,6 +864,23 @@ _rw_runlock_cookie(volatile uintptr_t *c, const char * _rw_runlock_cookie_int(rw LOCK_FILE_LINE_ARG); } +#ifdef ADAPTIVE_RWLOCKS +static inline void +rw_drop_critical(uintptr_t v, bool *in_critical, int *extra_work) +{ + + if (v & RW_LOCK_WRITE_SPINNER) + return; + if (*in_critical) { + critical_exit(); + *in_critical = false; + (*extra_work)--; + } +} +#else +#define rw_drop_critical(v, in_critical, extra_work) do { } while (0) +#endif + /* * This function is called when we are unable to obtain a write lock on the * first try. This means that at least one other thread holds either a @@ -888,8 +897,9 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC int spintries = 0; int i, n; enum { READERS, WRITER } sleep_reason = READERS; + bool in_critical = false; #endif - uintptr_t x; + uintptr_t setv; #ifdef LOCK_PROFILING uint64_t waittime = 0; int contested = 0; @@ -906,6 +916,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC uintptr_t state; int doing_lockprof = 0; #endif + int extra_work = 0; tid = (uintptr_t)curthread; rw = rwlock2rw(c); @@ -916,12 +927,14 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC if (_rw_write_lock_fetch(rw, &v, tid)) goto out_lockstat; } + extra_work = 1; doing_lockprof = 1; all_time -= lockstat_nsecs(&rw->lock_object); state = v; } #endif #ifdef LOCK_PROFILING + extra_work = 1; doing_lockprof = 1; state = v; #endif @@ -969,12 +982,19 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC #endif #ifdef ADAPTIVE_RWLOCKS + if (v == (RW_LOCK_READ | RW_LOCK_WRITE_SPINNER)) { + if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, tid)) + break; + continue; + } + /* * If the lock is write locked and the owner is * running on another CPU, spin until the owner stops * running or the state of the lock changes. */ if (!(v & RW_LOCK_READ)) { + rw_drop_critical(v, &in_critical, &extra_work); sleep_reason = WRITER; owner = lv_rw_wowner(v); if (!TD_IS_RUNNING(owner)) @@ -998,8 +1018,16 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC if (spintries == rowner_retries) goto ts; if (!(v & RW_LOCK_WRITE_SPINNER)) { + if (!in_critical) { + critical_enter(); + in_critical = true; + extra_work++; + } if (!atomic_fcmpset_ptr(&rw->rw_lock, &v, v | RW_LOCK_WRITE_SPINNER)) { + critical_exit(); + in_critical = false; + extra_work--; continue; } } @@ -1007,12 +1035,17 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", "lockname:\"%s\"", rw->lock_object.lo_name); + n = RW_READERS(v); for (i = 0; i < rowner_loops; i += n) { - n = RW_READERS(v); lock_delay_spin(n); v = RW_READ_VALUE(rw); - if ((v & RW_LOCK_WRITE_SPINNER) == 0) + if (!(v & RW_LOCK_WRITE_SPINNER)) break; + if (!(v & RW_LOCK_READ)) + break; + n = RW_READERS(v); + if (n == 0) + break; } #ifdef KDTRACE_HOOKS lda.spin_cnt += i; @@ -1040,10 +1073,12 @@ retry_ts: if (owner != NULL) { if (TD_IS_RUNNING(owner)) { turnstile_cancel(ts); + rw_drop_critical(v, &in_critical, &extra_work); continue; } } else if (RW_READERS(v) > 0 && sleep_reason == WRITER) { turnstile_cancel(ts); + rw_drop_critical(v, &in_critical, &extra_work); continue; } #endif @@ -1054,11 +1089,11 @@ retry_ts: * If a pending waiters queue is present, claim the lock * ownership and maintain the pending queue. */ - x = v & (RW_LOCK_WAITERS | RW_LOCK_WRITE_SPINNER); - if ((v & ~x) == RW_UNLOCKED) { - x &= ~RW_LOCK_WRITE_SPINNER; - if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, tid | x)) { - if (x) + setv = v & (RW_LOCK_WAITERS | RW_LOCK_WRITE_SPINNER); + if ((v & ~setv) == RW_UNLOCKED) { + setv &= ~RW_LOCK_WRITE_SPINNER; + if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, tid | setv)) { + if (setv) turnstile_claim(ts); else turnstile_cancel(ts); @@ -1066,19 +1101,37 @@ retry_ts: } goto retry_ts; } - /* - * If the RW_LOCK_WRITE_WAITERS flag isn't set, then try to - * set it. If we fail to set it, then loop back and try - * again. - */ - if (!(v & RW_LOCK_WRITE_WAITERS)) { - if (!atomic_fcmpset_ptr(&rw->rw_lock, &v, - v | RW_LOCK_WRITE_WAITERS)) - goto retry_ts; - if (LOCK_LOG_TEST(&rw->lock_object, 0)) - CTR2(KTR_LOCK, "%s: %p set write waiters flag", - __func__, rw); + +#ifdef ADAPTIVE_RWLOCKS + if (in_critical) { + if ((v & RW_LOCK_WRITE_SPINNER) || + !((v & RW_LOCK_WRITE_WAITERS))) { + setv = v & ~RW_LOCK_WRITE_SPINNER; + setv |= RW_LOCK_WRITE_WAITERS; + if (!atomic_fcmpset_ptr(&rw->rw_lock, &v, setv)) + goto retry_ts; + } + critical_exit(); + in_critical = false; + extra_work--; + } else { +#endif + /* + * If the RW_LOCK_WRITE_WAITERS flag isn't set, then try to + * set it. If we fail to set it, then loop back and try + * again. + */ + if (!(v & RW_LOCK_WRITE_WAITERS)) { + if (!atomic_fcmpset_ptr(&rw->rw_lock, &v, + v | RW_LOCK_WRITE_WAITERS)) + goto retry_ts; + if (LOCK_LOG_TEST(&rw->lock_object, 0)) + CTR2(KTR_LOCK, "%s: %p set write waiters flag", + __func__, rw); + } +#ifdef ADAPTIVE_RWLOCKS } +#endif /* * We were unable to acquire the lock and the write waiters * flag is set, so we must block on the turnstile. @@ -1103,6 +1156,12 @@ retry_ts: #endif v = RW_READ_VALUE(rw); } + if (__predict_true(!extra_work)) + return; +#ifdef ADAPTIVE_RWLOCKS + if (in_critical) + critical_exit(); +#endif #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) if (__predict_true(!doing_lockprof)) return; From owner-svn-src-head@freebsd.org Tue May 22 07:20:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C522EEA8A4; Tue, 22 May 2018 07:20:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D71A87083; Tue, 22 May 2018 07:20:24 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D62FB10DB7; Tue, 22 May 2018 07:20:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M7KNpA017044; Tue, 22 May 2018 07:20:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M7KNMD017041; Tue, 22 May 2018 07:20:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201805220720.w4M7KNMD017041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 22 May 2018 07:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334024 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 334024 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 07:20:24 -0000 Author: mjg Date: Tue May 22 07:20:22 2018 New Revision: 334024 URL: https://svnweb.freebsd.org/changeset/base/334024 Log: sx: port over writer starvation prevention measures from rwlock A constant stream of readers could completely starve writers and this is not a hypothetical scenario. The 'poll2_threads' test from the will-it-scale suite reliably starves writers even with concurrency < 10 threads. The problem was run into and diagnosed by dillon@backplane.com There was next to no change in lock contention profile during -j 128 pkg build, despite an sx lock being at the top. Tested by: pho Modified: head/sys/kern/kern_sx.c head/sys/kern/subr_trap.c head/sys/sys/proc.h head/sys/sys/sx.h Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Tue May 22 07:16:39 2018 (r334023) +++ head/sys/kern/kern_sx.c Tue May 22 07:20:22 2018 (r334024) @@ -292,6 +292,7 @@ sx_try_slock_int(struct sx *sx LOCK_FILE_LINE_ARG_DEF) LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, 0, 0, file, line, LOCKSTAT_READER); TD_LOCKS_INC(curthread); + curthread->td_sx_slocks++; return (1); } } @@ -441,7 +442,7 @@ sx_try_upgrade_int(struct sx *sx LOCK_FILE_LINE_ARG_DE for (;;) { if (SX_SHARERS(x) > 1) break; - waiters = (x & SX_LOCK_EXCLUSIVE_WAITERS); + waiters = (x & SX_LOCK_WAITERS); if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, (uintptr_t)curthread | waiters)) { success = 1; @@ -450,6 +451,7 @@ sx_try_upgrade_int(struct sx *sx LOCK_FILE_LINE_ARG_DE } LOCK_LOG_TRY("XUPGRADE", &sx->lock_object, 0, success, file, line); if (success) { + curthread->td_sx_slocks--; WITNESS_UPGRADE(&sx->lock_object, LOP_EXCLUSIVE | LOP_TRYLOCK, file, line); LOCKSTAT_RECORD0(sx__upgrade, sx); @@ -526,6 +528,7 @@ sx_downgrade_int(struct sx *sx LOCK_FILE_LINE_ARG_DEF) kick_proc0(); out: + curthread->td_sx_slocks++; LOCK_LOG_LOCK("XDOWNGRADE", &sx->lock_object, 0, 0, file, line); LOCKSTAT_RECORD0(sx__downgrade, sx); } @@ -537,6 +540,23 @@ sx_downgrade_(struct sx *sx, const char *file, int lin sx_downgrade_int(sx LOCK_FILE_LINE_ARG); } +#ifdef ADAPTIVE_SX +static inline void +sx_drop_critical(uintptr_t x, bool *in_critical, int *extra_work) +{ + + if (x & SX_LOCK_WRITE_SPINNER) + return; + if (*in_critical) { + critical_exit(); + *in_critical = false; + (*extra_work)--; + } +} +#else +#define sx_drop_critical(x, in_critical, extra_work) do { } while(0) +#endif + /* * This function represents the so-called 'hard case' for sx_xlock * operation. All 'easy case' failures are redirected to this. Note @@ -547,12 +567,13 @@ int _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LOCK_FILE_LINE_ARG_DEF) { GIANT_DECLARE; - uintptr_t tid; + uintptr_t tid, setx; #ifdef ADAPTIVE_SX volatile struct thread *owner; u_int i, n, spintries = 0; enum { READERS, WRITER } sleep_reason = READERS; bool adaptive; + bool in_critical = false; #endif #ifdef LOCK_PROFILING uint64_t waittime = 0; @@ -569,6 +590,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO #endif #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) uintptr_t state = 0; + int doing_lockprof = 0; #endif int extra_work = 0; @@ -581,12 +603,14 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO goto out_lockstat; } extra_work = 1; + doing_lockprof = 1; all_time -= lockstat_nsecs(&sx->lock_object); state = x; } #endif #ifdef LOCK_PROFILING extra_work = 1; + doing_lockprof = 1; state = x; #endif @@ -653,6 +677,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO * running or the state of the lock changes. */ if ((x & SX_LOCK_SHARED) == 0) { + sx_drop_critical(x, &in_critical, &extra_work); sleep_reason = WRITER; owner = lv_sx_owner(x); if (!TD_IS_RUNNING(owner)) @@ -675,17 +700,35 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO sleep_reason = READERS; if (spintries == asx_retries) goto sleepq; + if (!(x & SX_LOCK_WRITE_SPINNER)) { + if (!in_critical) { + critical_enter(); + in_critical = true; + extra_work++; + } + if (!atomic_fcmpset_ptr(&sx->sx_lock, &x, + x | SX_LOCK_WRITE_SPINNER)) { + critical_exit(); + in_critical = false; + extra_work--; + continue; + } + } spintries++; KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", "lockname:\"%s\"", sx->lock_object.lo_name); + n = SX_SHARERS(x); for (i = 0; i < asx_loops; i += n) { - n = SX_SHARERS(x); lock_delay_spin(n); x = SX_READ_VALUE(sx); - if ((x & SX_LOCK_SHARED) == 0 || - SX_SHARERS(x) == 0) + if (!(x & SX_LOCK_WRITE_SPINNER)) break; + if (!(x & SX_LOCK_SHARED)) + break; + n = SX_SHARERS(x); + if (n == 0) + break; } #ifdef KDTRACE_HOOKS lda.spin_cnt += i; @@ -707,6 +750,7 @@ retry_sleepq: */ if (x == SX_LOCK_UNLOCKED) { sleepq_release(&sx->lock_object); + sx_drop_critical(x, &in_critical, &extra_work); continue; } @@ -723,10 +767,13 @@ retry_sleepq: owner = (struct thread *)SX_OWNER(x); if (TD_IS_RUNNING(owner)) { sleepq_release(&sx->lock_object); + sx_drop_critical(x, &in_critical, + &extra_work); continue; } } else if (SX_SHARERS(x) > 0 && sleep_reason == WRITER) { sleepq_release(&sx->lock_object); + sx_drop_critical(x, &in_critical, &extra_work); continue; } } @@ -742,9 +789,10 @@ retry_sleepq: * as there are other exclusive waiters still. If we * fail, restart the loop. */ - if (x == (SX_LOCK_UNLOCKED | SX_LOCK_EXCLUSIVE_WAITERS)) { - if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, - tid | SX_LOCK_EXCLUSIVE_WAITERS)) + setx = x & (SX_LOCK_WAITERS | SX_LOCK_WRITE_SPINNER); + if ((x & ~setx) == SX_LOCK_SHARED) { + setx &= ~SX_LOCK_WRITE_SPINNER; + if (!atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid | setx)) goto retry_sleepq; sleepq_release(&sx->lock_object); CTR2(KTR_LOCK, "%s: %p claimed by new writer", @@ -752,19 +800,43 @@ retry_sleepq: break; } +#ifdef ADAPTIVE_SX /* - * Try to set the SX_LOCK_EXCLUSIVE_WAITERS. If we fail, - * than loop back and retry. + * It is possible we set the SX_LOCK_WRITE_SPINNER bit. + * It is an invariant that when the bit is set, there is + * a writer ready to grab the lock. Thus clear the bit since + * we are going to sleep. */ - if (!(x & SX_LOCK_EXCLUSIVE_WAITERS)) { - if (!atomic_fcmpset_ptr(&sx->sx_lock, &x, - x | SX_LOCK_EXCLUSIVE_WAITERS)) { - goto retry_sleepq; + if (in_critical) { + if ((x & SX_LOCK_WRITE_SPINNER) || + !((x & SX_LOCK_EXCLUSIVE_WAITERS))) { + setx = x & ~SX_LOCK_WRITE_SPINNER; + setx |= SX_LOCK_EXCLUSIVE_WAITERS; + if (!atomic_fcmpset_ptr(&sx->sx_lock, &x, + setx)) { + goto retry_sleepq; + } } - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR2(KTR_LOCK, "%s: %p set excl waiters flag", - __func__, sx); + critical_exit(); + in_critical = false; + } else { +#endif + /* + * Try to set the SX_LOCK_EXCLUSIVE_WAITERS. If we fail, + * than loop back and retry. + */ + if (!(x & SX_LOCK_EXCLUSIVE_WAITERS)) { + if (!atomic_fcmpset_ptr(&sx->sx_lock, &x, + x | SX_LOCK_EXCLUSIVE_WAITERS)) { + goto retry_sleepq; + } + if (LOCK_LOG_TEST(&sx->lock_object, 0)) + CTR2(KTR_LOCK, "%s: %p set excl waiters flag", + __func__, sx); + } +#ifdef ADAPTIVE_SX } +#endif /* * Since we have been unable to acquire the exclusive @@ -801,10 +873,16 @@ retry_sleepq: __func__, sx); x = SX_READ_VALUE(sx); } -#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) if (__predict_true(!extra_work)) return (error); +#ifdef ADAPTIVE_SX + if (in_critical) + critical_exit(); #endif +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + if (__predict_true(!doing_lockprof)) + return (error); +#endif #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&sx->lock_object); if (sleep_time) @@ -877,11 +955,11 @@ _sx_xunlock_hard(struct sx *sx, uintptr_t x LOCK_FILE_ * them precedence and cleaning up the shared waiters bit anyway. */ setx = SX_LOCK_UNLOCKED; - queue = SQ_EXCLUSIVE_QUEUE; - if ((x & SX_LOCK_SHARED_WAITERS) != 0 && - sleepq_sleepcnt(&sx->lock_object, SQ_SHARED_QUEUE) != 0) { - queue = SQ_SHARED_QUEUE; - setx |= (x & SX_LOCK_EXCLUSIVE_WAITERS); + queue = SQ_SHARED_QUEUE; + if ((x & SX_LOCK_EXCLUSIVE_WAITERS) != 0 && + sleepq_sleepcnt(&sx->lock_object, SQ_EXCLUSIVE_QUEUE) != 0) { + queue = SQ_EXCLUSIVE_QUEUE; + setx |= (x & SX_LOCK_SHARED_WAITERS); } atomic_store_rel_ptr(&sx->sx_lock, setx); @@ -899,23 +977,36 @@ _sx_xunlock_hard(struct sx *sx, uintptr_t x LOCK_FILE_ } static bool __always_inline -__sx_slock_try(struct sx *sx, uintptr_t *xp LOCK_FILE_LINE_ARG_DEF) +__sx_can_read(struct thread *td, uintptr_t x, bool fp) { + if ((x & (SX_LOCK_SHARED | SX_LOCK_EXCLUSIVE_WAITERS | SX_LOCK_WRITE_SPINNER)) + == SX_LOCK_SHARED) + return (true); + if (!fp && td->td_sx_slocks && (x & SX_LOCK_SHARED)) + return (true); + return (false); +} + +static bool __always_inline +__sx_slock_try(struct sx *sx, struct thread *td, uintptr_t *xp, bool fp + LOCK_FILE_LINE_ARG_DEF) +{ + /* * If no other thread has an exclusive lock then try to bump up * the count of sharers. Since we have to preserve the state * of SX_LOCK_EXCLUSIVE_WAITERS, if we fail to acquire the * shared lock loop back and retry. */ - while (*xp & SX_LOCK_SHARED) { - MPASS(!(*xp & SX_LOCK_SHARED_WAITERS)); + while (__sx_can_read(td, *xp, fp)) { if (atomic_fcmpset_acq_ptr(&sx->sx_lock, xp, *xp + SX_ONE_SHARER)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR4(KTR_LOCK, "%s: %p succeed %p -> %p", __func__, sx, (void *)*xp, (void *)(*xp + SX_ONE_SHARER)); + td->td_sx_slocks++; return (true); } } @@ -926,8 +1017,10 @@ static int __noinline _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LOCK_FILE_LINE_ARG_DEF) { GIANT_DECLARE; + struct thread *td; #ifdef ADAPTIVE_SX volatile struct thread *owner; + u_int i, n, spintries = 0; bool adaptive; #endif #ifdef LOCK_PROFILING @@ -948,9 +1041,11 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO #endif int extra_work = 0; + td = curthread; + #ifdef KDTRACE_HOOKS if (LOCKSTAT_PROFILE_ENABLED(sx__acquire)) { - if (__sx_slock_try(sx, &x LOCK_FILE_LINE_ARG)) + if (__sx_slock_try(sx, td, &x, false LOCK_FILE_LINE_ARG)) goto out_lockstat; extra_work = 1; all_time -= lockstat_nsecs(&sx->lock_object); @@ -990,7 +1085,7 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO * shared locks once there is an exclusive waiter. */ for (;;) { - if (__sx_slock_try(sx, &x LOCK_FILE_LINE_ARG)) + if (__sx_slock_try(sx, td, &x, false LOCK_FILE_LINE_ARG)) break; #ifdef INVARIANTS GIANT_SAVE(extra_work); @@ -1002,28 +1097,62 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO #ifdef ADAPTIVE_SX if (__predict_false(!adaptive)) goto sleepq; + /* * If the owner is running on another CPU, spin until * the owner stops running or the state of the lock * changes. */ - owner = lv_sx_owner(x); - if (TD_IS_RUNNING(owner)) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR3(KTR_LOCK, - "%s: spinning on %p held by %p", - __func__, sx, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", sx->lock_object.lo_name); - do { - lock_delay(&lda); + if ((x & SX_LOCK_SHARED) == 0) { + owner = lv_sx_owner(x); + if (TD_IS_RUNNING(owner)) { + if (LOCK_LOG_TEST(&sx->lock_object, 0)) + CTR3(KTR_LOCK, + "%s: spinning on %p held by %p", + __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); + do { + lock_delay(&lda); + x = SX_READ_VALUE(sx); + owner = lv_sx_owner(x); + } while (owner != NULL && TD_IS_RUNNING(owner)); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); + continue; + } + } else { + if ((x & SX_LOCK_WRITE_SPINNER) && SX_SHARERS(x) == 0) { + MPASS(!__sx_can_read(td, x, false)); + lock_delay_spin(2); x = SX_READ_VALUE(sx); - owner = lv_sx_owner(x); - } while (owner != NULL && TD_IS_RUNNING(owner)); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); - continue; + continue; + } + if (spintries < asx_retries) { + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + sx->lock_object.lo_name); + n = SX_SHARERS(x); + for (i = 0; i < asx_loops; i += n) { + lock_delay_spin(n); + x = SX_READ_VALUE(sx); + if (!(x & SX_LOCK_SHARED)) + break; + n = SX_SHARERS(x); + if (n == 0) + break; + if (__sx_can_read(td, x, false)) + break; + } +#ifdef KDTRACE_HOOKS + lda.spin_cnt += i; +#endif + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); + if (i < asx_loops) + continue; + } } sleepq: #endif @@ -1035,11 +1164,8 @@ sleepq: sleepq_lock(&sx->lock_object); x = SX_READ_VALUE(sx); retry_sleepq: - /* - * The lock could have been released while we spun. - * In this case loop back and retry. - */ - if (x & SX_LOCK_SHARED) { + if (((x & SX_LOCK_WRITE_SPINNER) && SX_SHARERS(x) == 0) || + __sx_can_read(td, x, false)) { sleepq_release(&sx->lock_object); continue; } @@ -1135,6 +1261,7 @@ out_lockstat: int _sx_slock_int(struct sx *sx, int opts LOCK_FILE_LINE_ARG_DEF) { + struct thread *td; uintptr_t x; int error; @@ -1147,9 +1274,10 @@ _sx_slock_int(struct sx *sx, int opts LOCK_FILE_LINE_A WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); error = 0; + td = curthread; x = SX_READ_VALUE(sx); if (__predict_false(LOCKSTAT_PROFILE_ENABLED(sx__acquire) || - !__sx_slock_try(sx, &x LOCK_FILE_LINE_ARG))) + !__sx_slock_try(sx, td, &x, true LOCK_FILE_LINE_ARG))) error = _sx_slock_hard(sx, opts, x LOCK_FILE_LINE_ARG); else lock_profile_obtain_lock_success(&sx->lock_object, 0, 0, @@ -1170,22 +1298,11 @@ _sx_slock(struct sx *sx, int opts, const char *file, i } static bool __always_inline -_sx_sunlock_try(struct sx *sx, uintptr_t *xp) +_sx_sunlock_try(struct sx *sx, struct thread *td, uintptr_t *xp) { for (;;) { - /* - * We should never have sharers while at least one thread - * holds a shared lock. - */ - KASSERT(!(*xp & SX_LOCK_SHARED_WAITERS), - ("%s: waiting sharers", __func__)); - - /* - * See if there is more than one shared lock held. If - * so, just drop one and return. - */ - if (SX_SHARERS(*xp) > 1) { + if (SX_SHARERS(*xp) > 1 || !(*xp & SX_LOCK_WAITERS)) { if (atomic_fcmpset_rel_ptr(&sx->sx_lock, xp, *xp - SX_ONE_SHARER)) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) @@ -1193,56 +1310,33 @@ _sx_sunlock_try(struct sx *sx, uintptr_t *xp) "%s: %p succeeded %p -> %p", __func__, sx, (void *)*xp, (void *)(*xp - SX_ONE_SHARER)); + td->td_sx_slocks--; return (true); } continue; } - - /* - * If there aren't any waiters for an exclusive lock, - * then try to drop it quickly. - */ - if (!(*xp & SX_LOCK_EXCLUSIVE_WAITERS)) { - MPASS(*xp == SX_SHARERS_LOCK(1)); - *xp = SX_SHARERS_LOCK(1); - if (atomic_fcmpset_rel_ptr(&sx->sx_lock, - xp, SX_LOCK_UNLOCKED)) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR2(KTR_LOCK, "%s: %p last succeeded", - __func__, sx); - return (true); - } - continue; - } break; } return (false); } static void __noinline -_sx_sunlock_hard(struct sx *sx, uintptr_t x LOCK_FILE_LINE_ARG_DEF) +_sx_sunlock_hard(struct sx *sx, struct thread *td, uintptr_t x + LOCK_FILE_LINE_ARG_DEF) { int wakeup_swapper = 0; - uintptr_t setx; + uintptr_t setx, queue; if (SCHEDULER_STOPPED()) return; - if (_sx_sunlock_try(sx, &x)) + if (_sx_sunlock_try(sx, td, &x)) goto out_lockstat; - /* - * At this point, there should just be one sharer with - * exclusive waiters. - */ - MPASS(x == (SX_SHARERS_LOCK(1) | SX_LOCK_EXCLUSIVE_WAITERS)); - sleepq_lock(&sx->lock_object); x = SX_READ_VALUE(sx); for (;;) { - MPASS(x & SX_LOCK_EXCLUSIVE_WAITERS); - MPASS(!(x & SX_LOCK_SHARED_WAITERS)); - if (_sx_sunlock_try(sx, &x)) + if (_sx_sunlock_try(sx, td, &x)) break; /* @@ -1251,15 +1345,21 @@ _sx_sunlock_hard(struct sx *sx, uintptr_t x LOCK_FILE_ * Note that the state of the lock could have changed, * so if it fails loop back and retry. */ - setx = x - SX_ONE_SHARER; - setx &= ~SX_LOCK_EXCLUSIVE_WAITERS; + setx = SX_LOCK_UNLOCKED; + queue = SQ_SHARED_QUEUE; + if (x & SX_LOCK_EXCLUSIVE_WAITERS) { + setx |= (x & SX_LOCK_SHARED_WAITERS); + queue = SQ_EXCLUSIVE_QUEUE; + } + setx |= (x & SX_LOCK_WRITE_SPINNER); if (!atomic_fcmpset_rel_ptr(&sx->sx_lock, &x, setx)) continue; if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p waking up all thread on" "exclusive queue", __func__, sx); wakeup_swapper = sleepq_broadcast(&sx->lock_object, SLEEPQ_SX, - 0, SQ_EXCLUSIVE_QUEUE); + 0, queue); + td->td_sx_slocks--; break; } sleepq_release(&sx->lock_object); @@ -1272,6 +1372,7 @@ out_lockstat: void _sx_sunlock_int(struct sx *sx LOCK_FILE_LINE_ARG_DEF) { + struct thread *td; uintptr_t x; KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, @@ -1280,10 +1381,11 @@ _sx_sunlock_int(struct sx *sx LOCK_FILE_LINE_ARG_DEF) WITNESS_UNLOCK(&sx->lock_object, 0, file, line); LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); + td = curthread; x = SX_READ_VALUE(sx); if (__predict_false(LOCKSTAT_PROFILE_ENABLED(sx__release) || - !_sx_sunlock_try(sx, &x))) - _sx_sunlock_hard(sx, x LOCK_FILE_LINE_ARG); + !_sx_sunlock_try(sx, td, &x))) + _sx_sunlock_hard(sx, td, x LOCK_FILE_LINE_ARG); else lock_profile_release_lock(&sx->lock_object); Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Tue May 22 07:16:39 2018 (r334023) +++ head/sys/kern/subr_trap.c Tue May 22 07:20:22 2018 (r334024) @@ -168,6 +168,9 @@ userret(struct thread *td, struct trapframe *frame) KASSERT(td->td_rw_rlocks == 0, ("userret: Returning with %d rwlocks held in read mode", td->td_rw_rlocks)); + KASSERT(td->td_sx_slocks == 0, + ("userret: Returning with %d sx locks held in shared mode", + td->td_sx_slocks)); KASSERT((td->td_pflags & TDP_NOFAULTING) == 0, ("userret: Returning with pagefaults disabled")); KASSERT(td->td_no_sleeping == 0, Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue May 22 07:16:39 2018 (r334023) +++ head/sys/sys/proc.h Tue May 22 07:20:22 2018 (r334024) @@ -267,6 +267,7 @@ struct thread { u_char td_tsqueue; /* (t) Turnstile queue blocked on. */ short td_locks; /* (k) Debug: count of non-spin locks */ short td_rw_rlocks; /* (k) Count of rwlock read locks. */ + short td_sx_slocks; /* (k) Count of sx shared locks. */ short td_lk_slocks; /* (k) Count of lockmgr shared locks. */ short td_stopsched; /* (k) Scheduler stopped. */ struct turnstile *td_blocked; /* (t) Lock thread is blocked on. */ Modified: head/sys/sys/sx.h ============================================================================== --- head/sys/sys/sx.h Tue May 22 07:16:39 2018 (r334023) +++ head/sys/sys/sx.h Tue May 22 07:20:22 2018 (r334024) @@ -71,12 +71,14 @@ #define SX_LOCK_SHARED_WAITERS 0x02 #define SX_LOCK_EXCLUSIVE_WAITERS 0x04 #define SX_LOCK_RECURSED 0x08 +#define SX_LOCK_WRITE_SPINNER 0x10 #define SX_LOCK_FLAGMASK \ (SX_LOCK_SHARED | SX_LOCK_SHARED_WAITERS | \ - SX_LOCK_EXCLUSIVE_WAITERS | SX_LOCK_RECURSED) + SX_LOCK_EXCLUSIVE_WAITERS | SX_LOCK_RECURSED | SX_LOCK_WRITE_SPINNER) +#define SX_LOCK_WAITERS (SX_LOCK_SHARED_WAITERS | SX_LOCK_EXCLUSIVE_WAITERS) #define SX_OWNER(x) ((x) & ~SX_LOCK_FLAGMASK) -#define SX_SHARERS_SHIFT 4 +#define SX_SHARERS_SHIFT 5 #define SX_SHARERS(x) (SX_OWNER(x) >> SX_SHARERS_SHIFT) #define SX_SHARERS_LOCK(x) \ ((x) << SX_SHARERS_SHIFT | SX_LOCK_SHARED) From owner-svn-src-head@freebsd.org Tue May 22 07:31:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85D35EEAD0B; Tue, 22 May 2018 07:31:16 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36BC287737; Tue, 22 May 2018 07:31:16 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2F356597F; Tue, 22 May 2018 07:31:16 +0000 (UTC) Date: Tue, 22 May 2018 07:31:16 +0000 From: Alexey Dokuchaev To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333994 - in head/sys: dev/acpica kern sys Message-ID: <20180522073116.GA95704@FreeBSD.org> References: <201805212023.w4LKN4vj086415@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201805212023.w4LKN4vj086415@repo.freebsd.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 07:31:16 -0000 On Mon, May 21, 2018 at 08:23:04PM +0000, Andriy Gapon wrote: > New Revision: 333994 > URL: https://svnweb.freebsd.org/changeset/base/333994 > > Log: > stop and restart kernel event timers in the suspend / resume cycle > > I have a system that is very unstable after resuming from suspend-to-RAM > but only if HPET is used as the event timer. [...] I'm super-excited to see suspend/resume fixes coming from you Andriy, thanks for doing that. Let's see less macOS and more FreeBSD on laptops at conferences! :-P ./danfe From owner-svn-src-head@freebsd.org Tue May 22 07:33:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B6EDEEADEC for ; Tue, 22 May 2018 07:33:00 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22a.google.com (mail-yb0-x22a.google.com [IPv6:2607:f8b0:4002:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A392C87985 for ; Tue, 22 May 2018 07:32:59 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22a.google.com with SMTP id r13-v6so5966694ybm.12 for ; Tue, 22 May 2018 00:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4k+wwO5TRVvixdiRgk/oF4U8MwRxG0nD15C1O8pgxmE=; b=L+WR07Grqxu1Wn2/kHoOhXbjC/n9d5neI37rx+N+b4U4zCdZQrXf06NJxhb/4Vb0Gd oxK/hi/FMEc6cD5t0oqL5+5jLgdAF9D73xKDjPR4oLYd5KboQRhxHW6K4DzsN06Nyxwb +8+tYc9SYKgb8sP2hZTgbrVRNV+NlzOiDG6Zk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4k+wwO5TRVvixdiRgk/oF4U8MwRxG0nD15C1O8pgxmE=; b=ftMfuCLahKZc0mBDynfVt9amWQ4HFnz9Nszm7oy34631UrcCVa8YWJHhF5ua3AODPZ yFmeGyHaT7TeXSmwZHZvd6A3n0Ug9Ca8madpyfUxok4gxfysjsWJTxWfgOhMJZqy6vUh 36a7bdHnod+uSi1w/lVi6rk8NGQ9zoZdunOTmmCxC0XtsLz8BCy/MOh12rgboWSrn2fZ Or6b/aZlokHLAg4ezmX9cPtiNXn5sAGQD+PbyFM44V6NRSeXwRWi4wcEoP1g1kyTNDOR wbKJhSXBAkK2/IuJQ8gZngBF+Y8ZsfXuwxVASSD1nG/AzslAW2KB4Fqtc2HvXYXmrjXo TPTg== X-Gm-Message-State: ALKqPwdZqRJ0XGYkfdaHpOZ2IIWTCl/oA8NUZvhqaPdRd5uzSy+VGVjc GL19yz+Oc8oc/XSX04KLiVeAEzVJYjP43lxm3O732w== X-Google-Smtp-Source: AB8JxZpgp9mAFgmaONi/UEWi98Z3T9zvJhmHpH6/jsLnLxCS070M8ADA3bRq9IBl3nDzvZvd1XYntNY+5USZ8tc4NGc= X-Received: by 2002:a25:2605:: with SMTP id m5-v6mr8887892ybm.89.1526974378776; Tue, 22 May 2018 00:32:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Tue, 22 May 2018 00:32:28 -0700 (PDT) In-Reply-To: <201805210834.w4L8YAcD022948@repo.freebsd.org> References: <201805210834.w4L8YAcD022948@repo.freebsd.org> From: Eitan Adler Date: Tue, 22 May 2018 00:32:28 -0700 Message-ID: Subject: Re: svn commit: r333968 - in head/sys: netinet netinet6 To: Matt Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 07:33:00 -0000 On 21 May 2018 at 01:34, Matt Macy wrote: > Author: mmacy > Date: Mon May 21 08:34:10 2018 > New Revision: 333968 > URL: https://svnweb.freebsd.org/changeset/base/333968 > > Log: > in(6)_mcast: Expand out vnet set / restore macro so that they work in a conditional block Why not simply add missing {} s or modifying the macro to use "do { } while(false)" ? -- Eitan Adler From owner-svn-src-head@freebsd.org Tue May 22 07:35:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9B87EEAE9E; Tue, 22 May 2018 07:35:34 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59AD187AFC; Tue, 22 May 2018 07:35:34 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 1D0F71CD3B; Tue, 22 May 2018 07:35:34 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f48.google.com with SMTP id c3-v6so24192113itj.4; Tue, 22 May 2018 00:35:34 -0700 (PDT) X-Gm-Message-State: ALKqPwcIx4T5N6sQTuWTjtxFOvvB2Va5LDCuIHYoex3vyV9L9HgQh5OA 6lKcfV0KfzkA57R+Cj2p6lsUavNXPxdkLzA9c4o= X-Google-Smtp-Source: AB8JxZqiFcRKi8h40REkxONklB0YX0/i6+2MZEt9JvAUJ4hFxV5LWP8fFU/HsCV8lyvDD9jYUumQnYA9tjmy7Pe9yzo= X-Received: by 2002:a24:5a85:: with SMTP id v127-v6mr291370ita.128.1526974533374; Tue, 22 May 2018 00:35:33 -0700 (PDT) MIME-Version: 1.0 References: <201805210834.w4L8YAcD022948@repo.freebsd.org> In-Reply-To: From: Matthew Macy Date: Tue, 22 May 2018 00:35:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333968 - in head/sys: netinet netinet6 To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 07:35:34 -0000 On Tue, May 22, 2018 at 00:33 Eitan Adler wrote: > On 21 May 2018 at 01:34, Matt Macy wrote: > > Author: mmacy > > Date: Mon May 21 08:34:10 2018 > > New Revision: 333968 > > URL: https://svnweb.freebsd.org/changeset/base/333968 > > > > Log: > > in(6)_mcast: Expand out vnet set / restore macro so that they work in > a conditional block > > Why not simply add missing {} s or modifying the macro to use "do { } > while(false)" ? > It declares variables which would go out of scope. > -- > Eitan Adler > From owner-svn-src-head@freebsd.org Tue May 22 07:57:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9894EEBC8C; Tue, 22 May 2018 07:56:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E8C06867E; Tue, 22 May 2018 07:56:59 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 686F61145A; Tue, 22 May 2018 07:56:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M7uxNb036724; Tue, 22 May 2018 07:56:59 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M7uxDK036723; Tue, 22 May 2018 07:56:59 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805220756.w4M7uxDK036723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 22 May 2018 07:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334025 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 334025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 07:57:00 -0000 Author: eadler Date: Tue May 22 07:56:58 2018 New Revision: 334025 URL: https://svnweb.freebsd.org/changeset/base/334025 Log: top(1): increase size of 'status' buffer This corrects a warning issues by gcc9: /srv/src/freebsd/head/usr.bin/top/machine.c:988:22: warning: '%5zu' directive writing between 5 and 20 bytes into a region of size 15 [-Wformat-overflow=] sprintf(status, "?%5zu", state); Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Tue May 22 07:20:22 2018 (r334024) +++ head/usr.bin/top/machine.c Tue May 22 07:56:58 2018 (r334025) @@ -920,7 +920,7 @@ format_next_process(caddr_t xhandle, char *(*get_useri long cputime; double pct; struct handle *hp; - char status[16]; + char status[22]; int cpu; size_t state; struct rusage ru, *rup; From owner-svn-src-head@freebsd.org Tue May 22 08:17:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62ECDEEC775; Tue, 22 May 2018 08:17:56 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDFE869091; Tue, 22 May 2018 08:17:55 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LlV4F-1fuNVI2pmh-00bIVf; Tue, 22 May 2018 10:17:43 +0200 Date: Tue, 22 May 2018 10:17:41 +0200 From: "O. Hartmann" To: Cy Schubert Cc: "O. Hartmann" , Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334008 - head/bin/sh Message-ID: <20180522101737.52e76c0f@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201805220445.w4M4jroR019550@slippy.cwsent.com> References: <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> <201805220445.w4M4jroR019550@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:TKiYkbTt+cbszP/vzaRhQ06QIw1NRdxDn8rQO3BNGMMAaJO9Lg7 7+cwATscYklriQY9QcrWU8iNstIC5YHbXguyxDP+ufDNNlimhxlW9bkU0zvyNWciBJES6D0 UxIOWjqHeLmcykiqKOHO6FJ7qrtgWFjKrSxaLlh8r8pl/Bc4bM2SVM/NZd4oFserj04O7Cu T1E6QSfq9xDPDI4gQYpCA== X-UI-Out-Filterresults: notjunk:1;V01:K0:53ADJ2p6xHo=:UK2YcpT+KkP/o+afCZl2RH sg6LTx3hOJw9jsBXvtvtKWGERhd+HWD3ZkOjxLXDr6t/S1yQVf9hORToVsKgd7crJ6XMv08Ir LKT+LltiuFW1rRYgTCruyNiaZEmU1y3bPhx2G8MgiMc4X/XTkxt24UWaKKa+igh2n7b7hK0a/ CtH9kscLt5wkZqJlLS7qE7w0B8ZWiwzHx88ndHhZRfbJOOBwbo6rSp2+to1i/LnceEu4pKTJZ OMZnYqfTHNEUf0w88UnRXRYZtVgbFtIqbWkLuOoovSoZFoo3+dShhFl33OAVoLDghm8Amil/6 LcvHnS/tyCmUltSVZou4rcRNSDbLSkLQDVubReCsfHd9fxWQf6mRrMoj+wxfQ8WcN6AYxpIpV qS5igyfuNuYdkSiHpSs1Ge+KAcJo4J0HA0hQNROfZUMFhiET5bF+ykOyqUmPMI672eOri9aaJ yrtCF1UoWp6qxHilsKc8uwR+qdMHK9tSgAVysQpbdINgdqjswA98VlCGRlgyPXceZ9m3Bz1aE eU2xkeAWUMbJkXwLc9bLepTv5zlDca+8eye2nmPapdll52h82iHdE5RgxLUU52gpK+oV9xc+x 4mVBcs2V7sfp6/yvWIIxtG2DnUxUxLHy4kvJpDOZLJ8+ZShBGFYrc8mVh6Mele/N6QEF98f1p UIT5Rnz1gjxY2SC4dDjGjbS2QNJyMd/dDwMDla7V31KOPjWmYiWNHDwjnllY+2Y8YxWRQySz2 QYiw3n/kaEQ5VQCLOaJV+TaeCu3qsZMRM0SD5blU+Ma1PVbnpIti5gBHjzA5bNsLrFnNG2js6 nNoDdAc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 08:17:56 -0000 On Mon, 21 May 2018 21:45:53 -0700 Cy Schubert wrote: > In message <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> > , "O. H > artmann" writes: > > On Mon, 21 May 2018 21:52:48 +0000 (UTC) > > Jilles Tjoelker wrote: > > > > > Author: jilles > > > Date: Mon May 21 21:52:48 2018 > > > New Revision: 334008 > > > URL: https://svnweb.freebsd.org/changeset/base/334008 > > > > > > Log: > > > sh: Split CNL syntax category to avoid a check on state[level].syntax > > > > > > No functional change is intended. > > > > > > Modified: > > > head/bin/sh/mksyntax.c > > > head/bin/sh/parser.c > > > > > > Modified: head/bin/sh/mksyntax.c > > > =========================================================================== > > === > > > --- head/bin/sh/mksyntax.c Mon May 21 21:44:47 2018 > > > (r334007) +++ head/bin/sh/mksyntax.c Mon May 21 21:52:48 > > > 2018 (r334008) @@ -65,6 +65,7 @@ struct synclass { > > > static const struct synclass synclass[] = { > > > { "CWORD", "character is nothing special" }, > > > { "CNL", "newline character" }, > > > + { "CQNL", "newline character in quotes" }, > > > { "CBACK", "a backslash character" }, > > > { "CSBACK", "a backslash character in single quotes" }, > > > { "CSQUOTE", "single quote" }, > > > @@ -185,7 +186,7 @@ main(int argc __unused, char **argv __unused) > > > fputs("\n/* syntax table used when in double quotes */\n", > > > cfile); init("dqsyntax"); > > > add_default(); > > > - add("\n", "CNL"); > > > + add("\n", "CQNL"); > > > add("\\", "CBACK"); > > > add("\"", "CENDQUOTE"); > > > add("`", "CBQUOTE"); > > > @@ -198,7 +199,7 @@ main(int argc __unused, char **argv __unused) > > > fputs("\n/* syntax table used when in single quotes */\n", > > > cfile); init("sqsyntax"); > > > add_default(); > > > - add("\n", "CNL"); > > > + add("\n", "CQNL"); > > > add("\\", "CSBACK"); > > > add("'", "CENDQUOTE"); > > > /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */ > > > @@ -208,7 +209,7 @@ main(int argc __unused, char **argv __unused) > > > fputs("\n/* syntax table used when in arithmetic */\n", cfile); > > > init("arisyntax"); > > > add_default(); > > > - add("\n", "CNL"); > > > + add("\n", "CQNL"); > > > add("\\", "CBACK"); > > > add("`", "CBQUOTE"); > > > add("\"", "CIGN"); > > > > > > Modified: head/bin/sh/parser.c > > > =========================================================================== > > === > > > --- head/bin/sh/parser.c Mon May 21 21:44:47 2018 (r334007) > > > +++ head/bin/sh/parser.c Mon May 21 21:52:48 2018 (r334008) > > > @@ -1434,9 +1434,10 @@ readtoken1(int firstc, char const *initialsyntax, > > > co > > ns > > > > > > switch(synentry) { > > > case CNL: /* '\n' */ > > > - if (level == 0 && > > > - state[level].syntax == BASESYNTAX) > > > + if (level == 0) > > > goto endword; /* exit > > > outer loop */ > > > + /* FALLTHROUGH */ > > > + case CQNL: > > > USTPUTC(c, out); > > > plinno++; > > > if (doprompt) > > > _______________________________________________ > > > svn-src-head@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > > > > > Have this been tested? Doesn't compile for me: > > > > [...] > > Building /usr/obj/usr/src/amd64.amd64/kerberos5/libexec/hprop/hprop > > --- all_subdir_rescue --- > > --- parser.o --- > > /usr/src/bin/sh/parser.c:1440:9: error: use of undeclared identifier 'CQNL' > > case CQNL: > > ^ > > --- all_subdir_gnu --- > > Building /usr/obj/usr/src/amd64.amd64/gnu/usr.bin/gdb/libgdb/amd64bsd-nat.o > > --- all_subdir_rescue --- > > 1 error generated. > > *** [parser.o] Error code 1 > > > > make[6]: stopped in /usr/src/bin/sh > > > > CQNL is defined in /usr/obj/opt/src/svn-current/amd64.amd64/bin/sh/synta > x.h, generated by mksyntax. > > slippy$ ag -s CQNL /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/*. > h > /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/syntax.h > 11:#define CQNL 2 /* newline character in quotes */ > slippy$ > > Remove the file if it's not defined in your syntax.h. > > Just out of interest, do you use meta mode? I think such a question is of common interest if errors/bugs like that occur: Yes, I use/compile world/kernel with META mode. > > Thanks, kind regards, oh From owner-svn-src-head@freebsd.org Tue May 22 08:22:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74127EECC27; Tue, 22 May 2018 08:22:12 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout05.t-online.de (mailout05.t-online.de [194.25.134.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0511A695BA; Tue, 22 May 2018 08:22:11 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd29.aul.t-online.de (fwd29.aul.t-online.de [172.20.26.134]) by mailout05.t-online.de (Postfix) with SMTP id 5616F423EA8F; Tue, 22 May 2018 10:22:04 +0200 (CEST) Received: from Stefans-MacBook-Pro-10.local (Xjt0leZrrhQ+LZWJGw+AAPGhLB50Pr8jdH-GekHObqS7RZ05o8jzhP87PLfH9zFZF2@[84.154.105.176]) by fwd29.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1fL2YV-2wMiyO0; Tue, 22 May 2018 10:22:03 +0200 Subject: Re: svn commit: r333995 - head/sys/teken To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805212035.w4LKZH0e091649@repo.freebsd.org> <20180522110110.H1292@besplex.bde.org> From: Stefan Esser Openpgp: preference=signencrypt Autocrypt: addr=se@freebsd.org; prefer-encrypt=mutual; keydata= xsBNBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAHNKVN0ZWZhbiBFw59lciAoWWFob28hKSA8c3QuZXNzZXJAeWFob28uZGU+wsCWBBMBCgBA AhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AWIQSjceplnAvsyCtxUxNH67XvWv31RAUC WvLvqwUJCyUBEwAKCRBH67XvWv31REySCACc6vqcSFQCRyBRc2CV5ZBjbbnTy7VBoXbUS3/c 4Hn8I0YQ39q7//2z8vYsgLeM1mMXL4PUIU/0f0dBAFBLpxV7bntGzyCJls6SeGS/qcQKhqaI 6I7NcWg8OkIJIhUL6q238cS1ql9pU65fyHe0PP8JS08m81PDpX2/4wTE6h2jgYUy55eXRzoF MEjr1S8SSnidsBem27o7iWu9ltJsUtE86071iZlLzbuHv2nvucrjAV9cK9tHrxYT/YiY8QhT L48iWj2xIjLjg1ebmgIFZ2k881we/KTIoUugqOOR1gDSc4qwM8CA388cN3frjtl98CwhAT5T UV8tIDqri+/Z1AKwzsBNBFVxiRIBCACxI/aglzGVbnI6XHd0MTP05VK/fJub4hHdc+LQpz1M kVnCAhFbY9oecTB/togdKtfiloavjbFrb0nJhJnx57K+3SdSuu+znaQ4SlWiZOtXnkbpRWNU eMm+gtTDMSvloGAfr76RtFHskdDOLgXsHD70bKuMhlBxUCrSwGzHaD00q8iQPhJZ5itb3WPq z3B4IjiDAWTO2obD1wtAvSuHuUj/XJRsiKDKW3x13cfavkad81bZW4cpNwUv8XHLv/vaZPSA ly+hkY7NrDZydMMXVNQ7AJQufWuTJ0q7sImRcEZ5EIa98esJPey4O7C0vY405wjeyxpVZkpq ThDMurqtQFn1ABEBAAHCwHwEGAEKACYCGwwWIQSjceplnAvsyCtxUxNH67XvWv31RAUCWvLv qwUJCyUBGQAKCRBH67XvWv31RLnrB/9gzcRlpx71sDMosoZULWn7wysBJ/8AIEfIByRaHQe3 pn/KwE57pB+zFbbQqB7YzeZb7/UUgR4zU2ZbOcEfwDZcHUbj0B3fGRsS3t0uiLlAd8w0sBZb SxrqzjdpDjIbOZkxssqUmvrsN67UG1AFWH9aD24keBS7YjPBS8hLxPeYV+Xz6vUL8fRZje/Z JgiBMIwyj6g2lH/zkdnxBdC0iG1xxJOLTaghMMeQyCdH6ef8+VMyAlAJsMckbOTvx63tY8z7 DFcrnTJfbe1EziRilVsEaK8tTzJzhcTfos+f3eBYWEilxe5HzIhYKJeC7lmsSUcGwa6+9VRg a0ctmi9Z8OgX Message-ID: <5bbde913-39b7-d02b-a146-e288cfa9eeba@freebsd.org> Date: Tue, 22 May 2018 10:22:02 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180522110110.H1292@besplex.bde.org> Content-Type: text/plain; charset=windows-1252 Content-Language: de-CH Content-Transfer-Encoding: 8bit X-ID: Xjt0leZrrhQ+LZWJGw+AAPGhLB50Pr8jdH-GekHObqS7RZ05o8jzhP87PLfH9zFZF2 X-TOI-MSGID: 4f2224c2-25d7-4ffb-b9e2-e45e5abfe8d7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 08:22:12 -0000 Am 22.05.18 um 03:18 schrieb Bruce Evans: > On Mon, 21 May 2018, [UTF-8] Jean-Sébastien Pédron wrote: >> -CS    Cursor style                ^[ [ SP q    r >> +DECSCUSR    Set Cursor Style        ^[ [ SP q    r >> DA1    Primary Device Attributes        ^[ [ c        r >> DA2    Secondary Device Attributes        ^[ [ > c    r >> DC    Delete character            ^[ [ P        n > > Any chance of keeping this file sorted? > > DECSCUSR is a verbose yet cryptic abbreviation which is not even expanded > its name.  It is the only abbreviation longer than 7 characters.  This messes > up the souce formatting. > > Not expanding DEC in the name is normal, but other letters are normally > expanded.  I don't know what USR is.  It looks like a bad abbreviation > for "user".  'S' in it might mean style. DECSCUSR = DEC SetCUrSoR ... (not quite so) obviously ;-) Regards, STefan From owner-svn-src-head@freebsd.org Tue May 22 08:27:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AE2DEED038; Tue, 22 May 2018 08:27:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE6D56988F; Tue, 22 May 2018 08:27:33 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F7E811938; Tue, 22 May 2018 08:27:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M8RXkc051990; Tue, 22 May 2018 08:27:33 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M8RXeQ051989; Tue, 22 May 2018 08:27:33 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201805220827.w4M8RXeQ051989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 22 May 2018 08:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334026 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334026 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 08:27:34 -0000 Author: mjg Date: Tue May 22 08:27:33 2018 New Revision: 334026 URL: https://svnweb.freebsd.org/changeset/base/334026 Log: Reduce sdt-related branch-fest in mi_switch. The code was evaluating flags before resorting to checking if dtrace is enabled. This was inducing forward jumps in the common case. Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue May 22 07:56:58 2018 (r334025) +++ head/sys/kern/kern_synch.c Tue May 22 08:27:33 2018 (r334026) @@ -431,8 +431,9 @@ mi_switch(int flags, struct thread *newtd) CTR4(KTR_PROC, "mi_switch: old thread %ld (td_sched %p, pid %ld, %s)", td->td_tid, td_get_sched(td), td->td_proc->p_pid, td->td_name); #ifdef KDTRACE_HOOKS - if ((flags & SW_PREEMPT) != 0 || ((flags & SW_INVOL) != 0 && - (flags & SW_TYPE_MASK) == SWT_NEEDRESCHED)) + if (__predict_false(sdt_probes_enabled) && + ((flags & SW_PREEMPT) != 0 || ((flags & SW_INVOL) != 0 && + (flags & SW_TYPE_MASK) == SWT_NEEDRESCHED))) SDT_PROBE0(sched, , , preempt); #endif sched_switch(td, newtd, flags); From owner-svn-src-head@freebsd.org Tue May 22 08:51:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8ABFEEDEDE; Tue, 22 May 2018 08:51:17 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64E256A752; Tue, 22 May 2018 08:51:17 +0000 (UTC) (envelope-from royger@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46FB011CBA; Tue, 22 May 2018 08:51:17 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M8pHvM063551; Tue, 22 May 2018 08:51:17 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M8pHne063550; Tue, 22 May 2018 08:51:17 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201805220851.w4M8pHne063550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 22 May 2018 08:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334027 - head/sys/dev/xen/blkback X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/blkback X-SVN-Commit-Revision: 334027 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 08:51:18 -0000 Author: royger Date: Tue May 22 08:51:16 2018 New Revision: 334027 URL: https://svnweb.freebsd.org/changeset/base/334027 Log: xen-blkback: do not use state 3 (XenbusStateInitialised) Linux will not connect to a backend that's in state 3 (XenbusStateInitialised), it needs to be in state 2 (XenbusStateInitWait) for Linux to attempt to connect to the backend. The protocol seems to suggest that the backend should indeed wait in state 2 for the frontend to connect, which makes state 3 unusable for disk backends. Also make sure blkback will connect to the frontend if the frontend reaches state 3 (XenbusStateInitialised) before blkback has processed the results from the hotplug script (Submitted by Nathan Friess). MFC after: 1 week Modified: head/sys/dev/xen/blkback/blkback.c Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Tue May 22 08:27:33 2018 (r334026) +++ head/sys/dev/xen/blkback/blkback.c Tue May 22 08:51:16 2018 (r334027) @@ -806,6 +806,9 @@ struct xbb_softc { /** Watch to wait for hotplug script execution */ struct xs_watch hotplug_watch; + + /** Got the needed data from hotplug scripts? */ + bool hotplug_done; }; /*---------------------------- Request Processing ----------------------------*/ @@ -3310,12 +3313,11 @@ xbb_connect(struct xbb_softc *xbb) { int error; - if (xenbus_get_state(xbb->dev) != XenbusStateInitialised) + if (!xbb->hotplug_done || + (xenbus_get_state(xbb->dev) != XenbusStateInitWait) || + (xbb_collect_frontend_info(xbb) != 0)) return; - if (xbb_collect_frontend_info(xbb) != 0) - return; - xbb->flags &= ~XBBF_SHUTDOWN; /* @@ -3412,6 +3414,7 @@ xbb_shutdown(struct xbb_softc *xbb) free(xbb->hotplug_watch.node, M_XENBLOCKBACK); xbb->hotplug_watch.node = NULL; } + xbb->hotplug_done = false; if (xenbus_get_state(xbb->dev) < XenbusStateClosing) xenbus_set_state(xbb->dev, XenbusStateClosing); @@ -3692,8 +3695,11 @@ xbb_attach_disk(struct xs_watch *watch, const char **v return; } - /* Tell the front end that we are ready to connect. */ - xenbus_set_state(dev, XenbusStateInitialised); + xbb->hotplug_done = true; + + /* The front end might be waiting for the backend, attach if so. */ + if (xenbus_get_otherend_state(xbb->dev) == XenbusStateInitialised) + xbb_connect(xbb); } /** @@ -3757,6 +3763,7 @@ xbb_attach(device_t dev) * We need to wait for hotplug script execution before * moving forward. */ + KASSERT(!xbb->hotplug_done, ("Hotplug scripts already executed")); watch_path = xs_join(xenbus_get_node(xbb->dev), "physical-device-path"); xbb->hotplug_watch.callback_data = (uintptr_t)dev; xbb->hotplug_watch.callback = xbb_attach_disk; From owner-svn-src-head@freebsd.org Tue May 22 09:26:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BDC1EEECEB for ; Tue, 22 May 2018 09:26:02 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99CD46B739 for ; Tue, 22 May 2018 09:26:01 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-wm0-x233.google.com with SMTP id a67-v6so29796110wmf.3 for ; Tue, 22 May 2018 02:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9pUKRnXvimY3+T2wzAg/Etrp0VMuUrMcrqV7vgPhiiw=; b=pop9N3KiAbc0Vivr+2/KqLgdFAGXU0IiAHdROfLggO+a786Wq6S6moeSog3yDJ2WFI E63Dc6KV/ettfJWNTCJNOR/vfbyVdmzfT4TQZLZdWxfNIHkgzaXJC7NQhwgwyLSReU8D +I/k4oaKpKbOCEXeiEa2+u8nscWIpnLeqF/vARDaYUB7elfmN+q0aAuXRI1Uxbc0PVnw UI/dnoVRABVH7sLiKuxjidbGO3A++fOPsxei7vmRJdcG25qbYhbuKmLoI94DP0hS7r5u EY5sRPT3c1S0Ie+0oVjl7ikhxljUiB5fyVzSFGzbFj0xfZvPW6IE8BBJU69QLL2Q0nm8 bRXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9pUKRnXvimY3+T2wzAg/Etrp0VMuUrMcrqV7vgPhiiw=; b=H/K1CNlswhzzHpp9Ln1OlakJav3xVT85ZBIisgcKJGerHUx8ELimL6HkmVgA0sjmk0 +rkpJIqd++dKxarjwJqBDIRHPTAEzPEwgtwP+GeJd3kURGECz8FtL2I+Jh44c6TLZ+Bz fUfe57A32Zt+dqbW+GYLF3DRWpp15pLHIGDcAmtjUtKQ78+PyfX3a5LrcSXg3v2M4bhE GXput27v8sPpbt2GdCG8NT3iPRX2MhyWO/FTJirdqyWhf4S+MCVzRqrVrwBKSquDNfpK 76nKAXJ7/IIwQe1aCndXfq9WY/A4cnEpe0vUnvjtiZVlk3EIAF4UN0PzYGvDpdqFkFkT DQjQ== X-Gm-Message-State: ALKqPwf3YJwdMuv/Yk73lnGAw4wI5bJKl8HdljQFc4i3PKi8HFtJQDMu j0HSMAB6x52TJiLREdAePGrsaBy0Kc3mIEh4nTTy+A== X-Google-Smtp-Source: AB8JxZp1JUoJQDJ2BatVCj0ManncKbxOlTDcYNPXIlyPrjd3fXBTvMQlftvA0/71/1WTOw4zBpTH6hT92RAGdSMLRfA= X-Received: by 2002:a50:8b26:: with SMTP id l35-v6mr1237582edl.224.1526981160286; Tue, 22 May 2018 02:26:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.148.173 with HTTP; Tue, 22 May 2018 02:25:29 -0700 (PDT) In-Reply-To: <20180522110110.H1292@besplex.bde.org> References: <201805212035.w4LKZH0e091649@repo.freebsd.org> <20180522110110.H1292@besplex.bde.org> From: Ed Schouten Date: Tue, 22 May 2018 11:25:29 +0200 Message-ID: Subject: Re: svn commit: r333995 - head/sys/teken To: Bruce Evans Cc: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 09:26:02 -0000 Hi Bruce, 2018-05-22 3:18 GMT+02:00 Bruce Evans : > DECSCUSR is a verbose yet cryptic abbreviation which is not even expanded > its name. It is the only abbreviation longer than 7 characters. This > messes up the souce formatting. Yeah, it's a bit silly, but that's simply how it's called: https://vt100.net/docs/vt510-rm/DECSCUSR.html I think the state machine generator doesn't mind if we added an extra tab between all other entries to get it to line up again. Maybe that does push us over 80 columns, though... -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-head@freebsd.org Tue May 22 09:56:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A7F3EEFA4B; Tue, 22 May 2018 09:56:24 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay119.isp.belgacom.be (mailrelay119.isp.belgacom.be [195.238.20.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91E246C982; Tue, 22 May 2018 09:56:23 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3ANoiH6BYV4bSxjNgrH3qSxpD/LSx+4OfEezUN459i?= =?us-ascii?q?sYplN5qZpsy/Yx7h7PlgxGXEQZ/co6odzbaO6Oa4ASQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7?= =?us-ascii?q?Ovr6GpLIj8Swyuu+54Dfbx9HiTahb75+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYe?= =?us-ascii?q?RWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZ?= =?us-ascii?q?TAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v9LlgRgP2hy?= =?us-ascii?q?gbNj456GDXhdJ2jKJHuxKquhhzz5fJbI2JKPZye6XQds4YS2VcRMZcTyJPDIOi?= =?us-ascii?q?YYUSDOQOP+hYoIbhqFUBtha+GQuhCP/zxjNUmnP6w6s32PkhHwHc2wwgGsoDvm?= =?us-ascii?q?rVrNX3MKcZTP64zK7PzTXYcfxW3C3y6I7Tchs8pvyMQbNwccjVyUQ0Fw3FlEuf?= =?us-ascii?q?ppL4Mj2I2OoBqW+b7/BvVe+2jWMstg9/oj+qxsg2i4nJgJoYyl7e9Spn3ok6Ps?= =?us-ascii?q?a4R1Nhbd6jCptQuCeXPJZ1TMM6W2xluzs2xqcYtZO0YSQG0oorywLBZ/CdboSF?= =?us-ascii?q?4hzuWeCMKjlinn1lYqiwhxOq/Eilze3zS9e73U5RripAjtnMrncN1wHP6sSfSv?= =?us-ascii?q?ty4EOh2TGX2gDQ8O5EJUE0la/FJJ47xb48jIYTsUXBHi/ygkn5kKiWdkI/+ue2?= =?us-ascii?q?7uToeLPmpoSGO49zkAH+Pbwims25AesmLggDR2uW9fmm2LH98kD1Xa9GguMqnq?= =?us-ascii?q?XHqpzWOMQWq6ChDw9QyIkj6hK/Dzm80NQfmHkKNE5FeBOFj4jtIFzOLur4Aumh?= =?us-ascii?q?jFu3izdk2urKPrr7ApXCNnTDiqvufa5h605Azwo+1ctf54xSCr0YO/LzQFP+uM?= =?us-ascii?q?XYDhAnKQO73v3qCNtn1owAR22AGbSZP77IvV+P/OIvLPGGZJUJtzblN/gl+/nu?= =?us-ascii?q?gGcimV8De6mlxIAXaGqkEfh/OUqZZX7sj8wPEWcQoAUxUvfliEafXjJJYHayRa?= =?us-ascii?q?087CkhCI26FYfDWpytgLuZ0SegBJ1ZenlKBUyLEXftcoWEWusMaD6MLc97iTwJ?= =?us-ascii?q?TrahS5U/2h6wrwD60KdoIvDT+i0CupLpzMJ16PHLlREu6Tx0CNyQ3H+XQG5pmm?= =?us-ascii?q?MHWSU20btxoUxn1FiMz7N3g+dFGtBJ4PNJSAg6P4bGz+NmE9DyRh7BftCRRVm8?= =?us-ascii?q?RNWmHTYxTtM3w9AQeEt9Fc+igQ7d0CWxGL8aiqaHBJsu8qLTjDDNIJNUzWrB1a?= =?us-ascii?q?8sx3M8RcdOMyXyj6hj8AnVCqbHiUiUnb2mM6MG03ie2n2EyD+yvUNcGCV3Vr7I?= =?us-ascii?q?WHkZfQOCsdX74mvsVbKjI48LdAxbxpjReeNxdtT1gAAeF7/YM9PEbjf0wj/oCA?= =?us-ascii?q?=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2ALBwBe6ANb/5nK8VFcHAEBAQQBAQoBA?= =?us-ascii?q?YNDVA59FROMWIwVAQGBeDEBXZUuLoRJAoIeIjgUAQIBAQEBAQECAWscDII1JAG?= =?us-ascii?q?CTwEFOhwjEAsUBAklDyoeBhODJIIDC6pDiEWCCgWKSIQciicgAphOCYVqiGJpW?= =?us-ascii?q?YNth1mJX4g+MyGBUk0wCIJ+gkiISIVAPTCQdwEB?= X-IPAS-Result: =?us-ascii?q?A2ALBwBe6ANb/5nK8VFcHAEBAQQBAQoBAYNDVA59FROMWIw?= =?us-ascii?q?VAQGBeDEBXZUuLoRJAoIeIjgUAQIBAQEBAQECAWscDII1JAGCTwEFOhwjEAsUB?= =?us-ascii?q?AklDyoeBhODJIIDC6pDiEWCCgWKSIQciicgAphOCYVqiGJpWYNth1mJX4g+MyG?= =?us-ascii?q?BUk0wCIJ+gkiISIVAPTCQdwEB?= Received: from 153.202-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.202.153]) by relay.skynet.be with ESMTP; 22 May 2018 11:55:12 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id w4M9tBWU003360; Tue, 22 May 2018 11:55:11 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Tue, 22 May 2018 11:55:11 +0200 From: Tijl Coosemans To: Antoine Brodin Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333919 - in head/contrib/file: . doc magic magic/Magdir python src tests Message-ID: <20180522115511.2f2ba6bf@kalimero.tijl.coosemans.org> In-Reply-To: References: <201805200506.w4K56gps088300@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 09:56:24 -0000 On Mon, 21 May 2018 00:10:23 +0200 Antoine Brodin wrote: > On Sun, May 20, 2018 at 10:39 PM, Antoine Brodin wrote: >> On Sun, May 20, 2018 at 10:30 PM, Antoine Brodin wrote: >>> On Sun, May 20, 2018 at 7:06 AM, Eitan Adler wrote: >>>> Author: eadler >>>> Date: Sun May 20 05:06:42 2018 >>>> New Revision: 333919 >>>> URL: https://svnweb.freebsd.org/changeset/base/333919 >>>> >>>> Log: >>>> MFV: file 5.33 >>>> >>>> Merge the latest file(1) in. >>>> >>>> Relevent Changelog: >>>> - extend the support for ${x?:} expansions for magic descriptions >>>> - add support for ${x?:} in mime types to handle pie binaries. >>>> - add support for negative offsets (offsets from the end of file) >>>> - close the file on error when writing magic >>>> >>>> Relnotes: yes >>> >>> This breaks the ports tree, please revert and request an exp-run. >> >> At least revert the changes to contrib/file/magic/Magdir/elf > > The problematic part was reverted in r333944 Seems to affect libraries that are installed +x. From owner-svn-src-head@freebsd.org Tue May 22 10:14:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 790CAEF02D8; Tue, 22 May 2018 10:14:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B7416D479; Tue, 22 May 2018 10:14:21 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0972B12AE9; Tue, 22 May 2018 10:14:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MAEK5h006967; Tue, 22 May 2018 10:14:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MAEKnA006966; Tue, 22 May 2018 10:14:20 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805221014.w4MAEKnA006966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 May 2018 10:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334028 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 334028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 10:14:21 -0000 Author: andrew Date: Tue May 22 10:14:20 2018 New Revision: 334028 URL: https://svnweb.freebsd.org/changeset/base/334028 Log: Coalesce adjacent physical mappings. This reduces the overhead when we have many small mappings, e.g. on some EFI systems. This is to help use this code on arm64 where we may have a large number of entries from the EFI firmware. Obtained from: ABT Systems Ltd Sponsored by: Turing Robotic Industries Differential Revision: https://reviews.freebsd.org/D15477 Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Tue May 22 08:51:16 2018 (r334027) +++ head/sys/arm/arm/physmem.c Tue May 22 10:14:20 2018 (r334028) @@ -216,8 +216,13 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, * could affect the remainder of this hw region. */ if ((xstart > start) && (xend < end)) { - avail[acnt++] = (vm_paddr_t)start; - avail[acnt++] = (vm_paddr_t)xstart; + if (acnt > 0 && + avail[acnt - 1] == (vm_paddr_t)start) { + avail[acnt - 1] = (vm_paddr_t)xstart; + } else { + avail[acnt++] = (vm_paddr_t)start; + avail[acnt++] = (vm_paddr_t)xstart; + } availmem += arm32_btop((vm_offset_t)(xstart - start)); start = xend; @@ -238,8 +243,12 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, * available entry for it. */ if (end > start) { - avail[acnt++] = (vm_paddr_t)start; - avail[acnt++] = (vm_paddr_t)end; + if (acnt > 0 && avail[acnt - 1] == (vm_paddr_t)start) { + avail[acnt - 1] = (vm_paddr_t)end; + } else { + avail[acnt++] = (vm_paddr_t)start; + avail[acnt++] = (vm_paddr_t)end; + } availmem += arm32_btop((vm_offset_t)(end - start)); } if (acnt >= MAX_AVAIL_ENTRIES) @@ -254,7 +263,7 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, /* * Insertion-sort a new entry into a regions list; sorted by start address. */ -static void +static size_t insert_region(struct region *regions, size_t rcnt, vm_paddr_t addr, vm_size_t size, uint32_t flags) { @@ -263,6 +272,16 @@ insert_region(struct region *regions, size_t rcnt, vm_ ep = regions + rcnt; for (i = 0, rp = regions; i < rcnt; ++i, ++rp) { + if (flags == rp->flags) { + if (addr + size == rp->addr) { + rp->addr = addr; + rp->size += size; + return (rcnt); + } else if (rp->addr + rp->size == addr) { + rp->size += size; + return (rcnt); + } + } if (addr < rp->addr) { bcopy(rp, rp + 1, (ep - rp) * sizeof(*rp)); break; @@ -271,6 +290,9 @@ insert_region(struct region *regions, size_t rcnt, vm_ rp->addr = addr; rp->size = size; rp->flags = flags; + rcnt++; + + return (rcnt); } /* @@ -322,7 +344,7 @@ arm_physmem_hardware_region(uint64_t pa, uint64_t sz) sz = trunc_page(sz - adj); if (sz > 0 && hwcnt < nitems(hwregions)) - insert_region(hwregions, hwcnt++, pa, sz, 0); + hwcnt = insert_region(hwregions, hwcnt, pa, sz, 0); } /* @@ -341,7 +363,7 @@ void arm_physmem_exclude_region(vm_paddr_t pa, vm_size sz = round_page(sz + adj); if (excnt < nitems(exregions)) - insert_region(exregions, excnt++, pa, sz, exflags); + excnt = insert_region(exregions, excnt, pa, sz, exflags); } /* From owner-svn-src-head@freebsd.org Tue May 22 10:31:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C03EEF0B0A; Tue, 22 May 2018 10:31:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19D206DF55; Tue, 22 May 2018 10:31:07 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F022A12CC4; Tue, 22 May 2018 10:31:06 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MAV6qx013042; Tue, 22 May 2018 10:31:06 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MAV60N013041; Tue, 22 May 2018 10:31:06 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805221031.w4MAV60N013041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 May 2018 10:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334030 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 334030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 10:31:07 -0000 Author: andrew Date: Tue May 22 10:31:06 2018 New Revision: 334030 URL: https://svnweb.freebsd.org/changeset/base/334030 Log: Allow the 32-bit arm physmem code to work on arm64. This will help simplify the arm64 code and allow us to properly exclude memory that should never be mapped. Obtained from: ABT Systems Ltd Sponsored by: Turing Robotic Industries Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Tue May 22 10:23:12 2018 (r334029) +++ head/sys/arm/arm/physmem.c Tue May 22 10:31:06 2018 (r334030) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include /* * These structures are used internally to keep track of regions of physical @@ -51,7 +51,13 @@ __FBSDID("$FreeBSD$"); #define MAX_HWCNT 10 #define MAX_EXCNT 10 +#if defined(__arm__) #define MAX_PHYS_ADDR 0xFFFFFFFFull +#define pm_btop(x) arm32_btop(x) +#elif defined(__aarch64__) +#define MAX_PHYS_ADDR 0xFFFFFFFFFFFFFFFFull +#define pm_btop(x) arm64_btop(x) +#endif struct region { vm_paddr_t addr; @@ -175,7 +181,7 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, for (hwi = 0, hwp = hwregions; hwi < hwcnt; ++hwi, ++hwp) { start = hwp->addr; end = hwp->size + start; - realmem += arm32_btop((vm_offset_t)(end - start)); + realmem += pm_btop((vm_offset_t)(end - start)); for (exi = 0, exp = exregions; exi < excnt; ++exi, ++exp) { /* * If the excluded region does not match given flags, @@ -223,8 +229,8 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, avail[acnt++] = (vm_paddr_t)start; avail[acnt++] = (vm_paddr_t)xstart; } - availmem += - arm32_btop((vm_offset_t)(xstart - start)); + availmem += + pm_btop((vm_offset_t)(xstart - start)); start = xend; continue; } @@ -249,7 +255,7 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, avail[acnt++] = (vm_paddr_t)start; avail[acnt++] = (vm_paddr_t)end; } - availmem += arm32_btop((vm_offset_t)(end - start)); + availmem += pm_btop((vm_offset_t)(end - start)); } if (acnt >= MAX_AVAIL_ENTRIES) panic("Not enough space in the dump/phys_avail arrays"); From owner-svn-src-head@freebsd.org Tue May 22 11:05:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77623EF16D9; Tue, 22 May 2018 11:05:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22CD46EEF8; Tue, 22 May 2018 11:05:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F36BC13300; Tue, 22 May 2018 11:05:40 +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 w4MB5e21032117; Tue, 22 May 2018 11:05:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MB5ep3032115; Tue, 22 May 2018 11:05:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805221105.w4MB5ep3032115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 May 2018 11:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334031 - head/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/stdio X-SVN-Commit-Revision: 334031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 11:05:41 -0000 Author: kib Date: Tue May 22 11:05:40 2018 New Revision: 334031 URL: https://svnweb.freebsd.org/changeset/base/334031 Log: Implement printf(3) family %m format string extension. Reviewed by: ed, dim (code only) Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/lib/libc/stdio/printf.3 head/lib/libc/stdio/vfprintf.c Modified: head/lib/libc/stdio/printf.3 ============================================================================== --- head/lib/libc/stdio/printf.3 Tue May 22 10:31:06 2018 (r334030) +++ head/lib/libc/stdio/printf.3 Tue May 22 11:05:40 2018 (r334031) @@ -32,7 +32,7 @@ .\" @(#)printf.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 30, 2016 +.Dd May 22, 2018 .Dt PRINTF 3 .Os .Sh NAME @@ -651,6 +651,12 @@ integer indicated by the .Vt "int *" (or variant) pointer argument. No argument is converted. +.It Cm m +Print the string representation of the error code stored in the +.Dv errno +variable at the beginning of the call, as returned by +.Xr strerror 3 . +No argument is taken. .It Cm % A .Ql % @@ -730,6 +736,12 @@ and .Cm \&%U are not standard and are provided only for backward compatibility. +The conversion format +.Cm \&%m +is also not standard and provides the popular extension from the +.Tn GNU C +library. +.Pp The effect of padding the .Cm %p format with zeros (either by the @@ -767,9 +779,11 @@ or the return value would be too large to be represent .El .Sh SEE ALSO .Xr printf 1 , +.Xr errno 2 , .Xr fmtcheck 3 , .Xr scanf 3 , .Xr setlocale 3 , +.Xr strerror 3 , .Xr wprintf 3 .Sh STANDARDS Subject to the caveats noted in the @@ -822,6 +836,12 @@ and .Fn vdprintf functions were added in .Fx 8.0 . +The +.Cm \&%m +format extension first appeared in the +.Tn GNU C +library, and was implemented in +.Fx 12.0 . .Sh BUGS The .Nm Modified: head/lib/libc/stdio/vfprintf.c ============================================================================== --- head/lib/libc/stdio/vfprintf.c Tue May 22 10:31:06 2018 (r334030) +++ head/lib/libc/stdio/vfprintf.c Tue May 22 11:05:40 2018 (r334031) @@ -317,6 +317,7 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0 int ret; /* return value accumulator */ int width; /* width from format (%8d), or 0 */ int prec; /* precision from format; <0 for N/A */ + int saved_errno; char sign; /* sign prefix (' ', '+', '-', or \0) */ struct grouping_state gs; /* thousands' grouping info */ @@ -466,6 +467,7 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0 savserr = fp->_flags & __SERR; fp->_flags &= ~__SERR; + saved_errno = errno; convbuf = NULL; fmt = (char *)fmt0; argtable = NULL; @@ -776,6 +778,11 @@ fp_common: } break; #endif /* !NO_FLOATING_POINT */ + case 'm': + cp = strerror(saved_errno); + size = (prec >= 0) ? strnlen(cp, prec) : strlen(cp); + sign = '\0'; + break; case 'n': /* * Assignment-like behavior is specified if the From owner-svn-src-head@freebsd.org Tue May 22 11:07:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 975FDEF1772; Tue, 22 May 2018 11:07:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49D106F05A; Tue, 22 May 2018 11:07:05 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B26813301; Tue, 22 May 2018 11:07:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MB75Wv032238; Tue, 22 May 2018 11:07:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MB74NS032234; Tue, 22 May 2018 11:07:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805221107.w4MB74NS032234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 May 2018 11:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334032 - in head/sys: arm64/arm64 conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm64/arm64 conf X-SVN-Commit-Revision: 334032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 11:07:05 -0000 Author: andrew Date: Tue May 22 11:07:04 2018 New Revision: 334032 URL: https://svnweb.freebsd.org/changeset/base/334032 Log: Switch arm64 to use the same physmem code as 32-bit arm. The main advantage of this is to allow us to exclude memory from being used by the kernel. This may be from the memreserve property, or ranges marked as no-map under the reserved-memory node. More work is still needed to remove the physmap array. This is still used for creating the DMAP region, however other patches need to be committed before we can remove this. Obtained from: ABT Systems Ltd Sponsored by: Turing Robotic Industries Modified: head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/pmap.c head/sys/conf/files.arm64 Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Tue May 22 11:05:40 2018 (r334031) +++ head/sys/arm64/arm64/machdep.c Tue May 22 11:07:04 2018 (r334032) @@ -80,6 +80,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #ifdef VFP #include #endif @@ -101,13 +103,8 @@ struct pcpu __pcpu[MAXCPU]; static struct trapframe proc0_tf; -vm_paddr_t phys_avail[PHYS_AVAIL_SIZE + 2]; -vm_paddr_t dump_avail[PHYS_AVAIL_SIZE + 2]; - int early_boot = 1; int cold = 1; -long realmem = 0; -long Maxmem = 0; #define PHYSMAP_SIZE (2 * (VM_PHYSSEG_MAX - 1)) vm_paddr_t physmap[PHYSMAP_SIZE]; @@ -898,6 +895,8 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_ continue; } + arm_physmem_hardware_region(p->md_phys, + p->md_pages * PAGE_SIZE); if (!add_physmap_entry(p->md_phys, (p->md_pages * PAGE_SIZE), physmap, physmap_idxp)) break; @@ -1026,9 +1025,7 @@ initarm(struct arm64_bootparams *abp) #endif vm_offset_t lastaddr; caddr_t kmdp; - vm_paddr_t mem_len; bool valid; - int i; /* Set the module data location */ preload_metadata = (caddr_t)(uintptr_t)(abp->modulep); @@ -1064,19 +1061,10 @@ initarm(struct arm64_bootparams *abp) panic("Cannot get physical memory regions"); add_fdt_mem_regions(mem_regions, mem_regions_sz, physmap, &physmap_idx); + arm_physmem_hardware_regions(mem_regions, mem_regions_sz); } #endif - /* Print the memory map */ - mem_len = 0; - for (i = 0; i < physmap_idx; i += 2) { - dump_avail[i] = physmap[i]; - dump_avail[i + 1] = physmap[i + 1]; - mem_len += physmap[i + 1] - physmap[i]; - } - dump_avail[i] = 0; - dump_avail[i + 1] = 0; - /* Set the pcpu data, this is needed by pmap_bootstrap */ pcpup = &__pcpu[0]; pcpu_init(pcpup, 0, sizeof(struct pcpu)); @@ -1100,6 +1088,7 @@ initarm(struct arm64_bootparams *abp) /* Bootstrap enough of pmap to enter the kernel proper */ pmap_bootstrap(abp->kern_l0pt, abp->kern_l1pt, KERNBASE - abp->kern_delta, lastaddr - KERNBASE); + arm_physmem_init_kernel_globals(); devmap_bootstrap(0, NULL); Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Tue May 22 11:05:40 2018 (r334031) +++ head/sys/arm64/arm64/pmap.c Tue May 22 11:07:04 2018 (r334032) @@ -146,6 +146,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #define NL0PG (PAGE_SIZE/(sizeof (pd_entry_t))) #define NL1PG (PAGE_SIZE/(sizeof (pd_entry_t))) #define NL2PG (PAGE_SIZE/(sizeof (pd_entry_t))) @@ -669,16 +671,15 @@ void pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen) { - u_int l1_slot, l2_slot, avail_slot, map_slot, used_map_slot; + u_int l1_slot, l2_slot; uint64_t kern_delta; pt_entry_t *l2; vm_offset_t va, freemempos; vm_offset_t dpcpu, msgbufpv; - vm_paddr_t pa, max_pa, min_pa; + vm_paddr_t start_pa, pa, max_pa, min_pa; int i; kern_delta = KERNBASE - kernstart; - physmem = 0; printf("pmap_bootstrap %lx %lx %lx\n", l1pt, kernstart, kernlen); printf("%lx\n", l1pt); @@ -708,40 +709,9 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ pmap_bootstrap_dmap(l1pt, min_pa, max_pa); va = KERNBASE; - pa = KERNBASE - kern_delta; + start_pa = pa = KERNBASE - kern_delta; /* - * Start to initialise phys_avail by copying from physmap - * up to the physical address KERNBASE points at. - */ - map_slot = avail_slot = 0; - for (; map_slot < (physmap_idx * 2) && - avail_slot < (PHYS_AVAIL_SIZE - 2); map_slot += 2) { - if (physmap[map_slot] == physmap[map_slot + 1]) - continue; - - if (physmap[map_slot] <= pa && - physmap[map_slot + 1] > pa) - break; - - phys_avail[avail_slot] = physmap[map_slot]; - phys_avail[avail_slot + 1] = physmap[map_slot + 1]; - physmem += (phys_avail[avail_slot + 1] - - phys_avail[avail_slot]) >> PAGE_SHIFT; - avail_slot += 2; - } - - /* Add the memory before the kernel */ - if (physmap[avail_slot] < pa && avail_slot < (PHYS_AVAIL_SIZE - 2)) { - phys_avail[avail_slot] = physmap[map_slot]; - phys_avail[avail_slot + 1] = pa; - physmem += (phys_avail[avail_slot + 1] - - phys_avail[avail_slot]) >> PAGE_SHIFT; - avail_slot += 2; - } - used_map_slot = map_slot; - - /* * Read the page table to find out what is already mapped. * This assumes we have mapped a block of memory from KERNBASE * using a single L1 entry. @@ -797,39 +767,7 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ pa = pmap_early_vtophys(l1pt, freemempos); - /* Finish initialising physmap */ - map_slot = used_map_slot; - for (; avail_slot < (PHYS_AVAIL_SIZE - 2) && - map_slot < (physmap_idx * 2); map_slot += 2) { - if (physmap[map_slot] == physmap[map_slot + 1]) - continue; - - /* Have we used the current range? */ - if (physmap[map_slot + 1] <= pa) - continue; - - /* Do we need to split the entry? */ - if (physmap[map_slot] < pa) { - phys_avail[avail_slot] = pa; - phys_avail[avail_slot + 1] = physmap[map_slot + 1]; - } else { - phys_avail[avail_slot] = physmap[map_slot]; - phys_avail[avail_slot + 1] = physmap[map_slot + 1]; - } - physmem += (phys_avail[avail_slot + 1] - - phys_avail[avail_slot]) >> PAGE_SHIFT; - - avail_slot += 2; - } - phys_avail[avail_slot] = 0; - phys_avail[avail_slot + 1] = 0; - - /* - * Maxmem isn't the "maximum memory", it's one larger than the - * highest page of the physical address space. It should be - * called something like "Maxphyspage". - */ - Maxmem = atop(phys_avail[avail_slot - 1]); + arm_physmem_exclude_region(start_pa, pa - start_pa, EXFLAG_NOALLOC); cpu_tlb_flushID(); } Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Tue May 22 11:05:40 2018 (r334031) +++ head/sys/conf/files.arm64 Tue May 22 11:07:04 2018 (r334032) @@ -67,6 +67,7 @@ arm/arm/gic.c standard arm/arm/gic_acpi.c optional acpi arm/arm/gic_fdt.c optional fdt arm/arm/pmu.c standard +arm/arm/physmem.c standard arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq fdt \ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc soc_brcm_bcm2837 fdt From owner-svn-src-head@freebsd.org Tue May 22 11:16:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF4FEEF1BFA; Tue, 22 May 2018 11:16:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B8646F58D; Tue, 22 May 2018 11:16:46 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C0F213490; Tue, 22 May 2018 11:16:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MBGk9P037369; Tue, 22 May 2018 11:16:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MBGk64037368; Tue, 22 May 2018 11:16:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805221116.w4MBGk64037368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 May 2018 11:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334033 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 334033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 11:16:47 -0000 Author: andrew Date: Tue May 22 11:16:45 2018 New Revision: 334033 URL: https://svnweb.freebsd.org/changeset/base/334033 Log: Stop using the DMAP region to map ACPI memory. On some arm64 boards we need to access memory in ACPI tables that is not mapped in the DMAP region. To handle this create the needed mappings in pmap_mapbios in the KVA space. Submitted by: Michal Stanek (mst@semihalf.com) Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D15059 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Tue May 22 11:07:04 2018 (r334032) +++ head/sys/arm64/arm64/pmap.c Tue May 22 11:16:45 2018 (r334033) @@ -219,6 +219,23 @@ __FBSDID("$FreeBSD$"); struct pmap kernel_pmap_store; +/* Used for mapping ACPI memory before VM is initialized */ +#define PMAP_PREINIT_MAPPING_COUNT 32 +#define PMAP_PREINIT_MAPPING_SIZE (PMAP_PREINIT_MAPPING_COUNT * L2_SIZE) +static vm_offset_t preinit_map_va; /* Start VA of pre-init mapping space */ +static int vm_initialized = 0; /* No need to use pre-init maps when set */ + +/* + * Reserve a few L2 blocks starting from 'preinit_map_va' pointer. + * Always map entire L2 block for simplicity. + * VA of L2 block = preinit_map_va + i * L2_SIZE + */ +static struct pmap_preinit_mapping { + vm_paddr_t pa; + vm_offset_t va; + vm_size_t size; +} pmap_preinit_mapping[PMAP_PREINIT_MAPPING_COUNT]; + vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ vm_offset_t kernel_vm_end = 0; @@ -761,7 +778,11 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ alloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE); msgbufp = (void *)msgbufpv; - virtual_avail = roundup2(freemempos, L1_SIZE); + /* Reserve some VA space for early BIOS/ACPI mapping */ + preinit_map_va = roundup2(freemempos, L2_SIZE); + + virtual_avail = preinit_map_va + PMAP_PREINIT_MAPPING_SIZE; + virtual_avail = roundup2(virtual_avail, L1_SIZE); virtual_end = VM_MAX_KERNEL_ADDRESS - L2_SIZE; kernel_vm_end = virtual_avail; @@ -825,6 +846,8 @@ pmap_init(void) for (i = 0; i < pv_npg; i++) TAILQ_INIT(&pv_table[i].pv_list); TAILQ_INIT(&pv_dummy.pv_list); + + vm_initialized = 1; } static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2, CTLFLAG_RD, 0, @@ -4192,13 +4215,162 @@ pmap_clear_modify(vm_page_t m) void * pmap_mapbios(vm_paddr_t pa, vm_size_t size) { + struct pmap_preinit_mapping *ppim; + vm_offset_t va, offset; + pd_entry_t *pde; + pt_entry_t *l2; + int i, lvl, l2_blocks, free_l2_count, start_idx; - return ((void *)PHYS_TO_DMAP(pa)); + if (!vm_initialized) { + /* + * No L3 ptables so map entire L2 blocks where start VA is: + * preinit_map_va + start_idx * L2_SIZE + * There may be duplicate mappings (multiple VA -> same PA) but + * ARM64 dcache is always PIPT so that's acceptable. + */ + if (size == 0) + return (NULL); + + /* Calculate how many full L2 blocks are needed for the mapping */ + l2_blocks = (roundup2(pa + size, L2_SIZE) - rounddown2(pa, L2_SIZE)) >> L2_SHIFT; + + offset = pa & L2_OFFSET; + + if (preinit_map_va == 0) + return (NULL); + + /* Map 2MiB L2 blocks from reserved VA space */ + + free_l2_count = 0; + start_idx = -1; + /* Find enough free contiguous VA space */ + for (i = 0; i < PMAP_PREINIT_MAPPING_COUNT; i++) { + ppim = pmap_preinit_mapping + i; + if (free_l2_count > 0 && ppim->pa != 0) { + /* Not enough space here */ + free_l2_count = 0; + start_idx = -1; + continue; + } + + if (ppim->pa == 0) { + /* Free L2 block */ + if (start_idx == -1) + start_idx = i; + free_l2_count++; + if (free_l2_count == l2_blocks) + break; + } + } + if (free_l2_count != l2_blocks) + panic("%s: too many preinit mappings", __func__); + + va = preinit_map_va + (start_idx * L2_SIZE); + for (i = start_idx; i < start_idx + l2_blocks; i++) { + /* Mark entries as allocated */ + ppim = pmap_preinit_mapping + i; + ppim->pa = pa; + ppim->va = va + offset; + ppim->size = size; + } + + /* Map L2 blocks */ + pa = rounddown2(pa, L2_SIZE); + for (i = 0; i < l2_blocks; i++) { + pde = pmap_pde(kernel_pmap, va, &lvl); + KASSERT(pde != NULL, + ("pmap_mapbios: Invalid page entry, va: 0x%lx", va)); + KASSERT(lvl == 1, ("pmap_mapbios: Invalid level %d", lvl)); + + /* Insert L2_BLOCK */ + l2 = pmap_l1_to_l2(pde, va); + pmap_load_store(l2, + pa | ATTR_DEFAULT | ATTR_XN | + ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); + pmap_invalidate_range(kernel_pmap, va, va + L2_SIZE); + + va += L2_SIZE; + pa += L2_SIZE; + } + + va = preinit_map_va + (start_idx * L2_SIZE); + + } else { + /* kva_alloc may be used to map the pages */ + offset = pa & PAGE_MASK; + size = round_page(offset + size); + + va = kva_alloc(size); + if (va == 0) + panic("%s: Couldn't allocate KVA", __func__); + + pde = pmap_pde(kernel_pmap, va, &lvl); + KASSERT(lvl == 2, ("pmap_mapbios: Invalid level %d", lvl)); + + /* L3 table is linked */ + va = trunc_page(va); + pa = trunc_page(pa); + pmap_kenter(va, size, pa, CACHED_MEMORY); + } + + return ((void *)(va + offset)); } void -pmap_unmapbios(vm_paddr_t pa, vm_size_t size) +pmap_unmapbios(vm_offset_t va, vm_size_t size) { + struct pmap_preinit_mapping *ppim; + vm_offset_t offset, tmpsize, va_trunc; + pd_entry_t *pde; + pt_entry_t *l2; + int i, lvl, l2_blocks, block; + + l2_blocks = (roundup2(va + size, L2_SIZE) - rounddown2(va, L2_SIZE)) >> L2_SHIFT; + KASSERT(l2_blocks > 0, ("pmap_unmapbios: invalid size %lx", size)); + + /* Remove preinit mapping */ + block = 0; + for (i = 0; i < PMAP_PREINIT_MAPPING_COUNT; i++) { + ppim = pmap_preinit_mapping + i; + if (ppim->va == va) { + KASSERT(ppim->size == size, ("pmap_unmapbios: size mismatch")); + ppim->va = 0; + ppim->pa = 0; + ppim->size = 0; + offset = block * L2_SIZE; + va_trunc = rounddown2(va, L2_SIZE) + offset; + + /* Remove L2_BLOCK */ + pde = pmap_pde(kernel_pmap, va_trunc, &lvl); + KASSERT(pde != NULL, + ("pmap_unmapbios: Invalid page entry, va: 0x%lx", va_trunc)); + l2 = pmap_l1_to_l2(pde, va_trunc); + pmap_load_clear(l2); + pmap_invalidate_range(kernel_pmap, va_trunc, va_trunc + L2_SIZE); + + if (block == (l2_blocks - 1)) + return; + block++; + } + } + + /* Unmap the pages reserved with kva_alloc. */ + if (vm_initialized) { + offset = va & PAGE_MASK; + size = round_page(offset + size); + va = trunc_page(va); + + pde = pmap_pde(kernel_pmap, va, &lvl); + KASSERT(pde != NULL, + ("pmap_unmapbios: Invalid page entry, va: 0x%lx", va)); + KASSERT(lvl == 2, ("pmap_unmapbios: Invalid level %d", lvl)); + + /* Unmap and invalidate the pages */ + for (tmpsize = 0; tmpsize < size; tmpsize += PAGE_SIZE) + pmap_kremove(va + tmpsize); + + kva_free(va, size); + } } /* From owner-svn-src-head@freebsd.org Tue May 22 11:17:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EA34EF1C66; Tue, 22 May 2018 11:17:46 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C4CE6F6F1; Tue, 22 May 2018 11:17:46 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1C841349A; Tue, 22 May 2018 11:17:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MBHj9p037457; Tue, 22 May 2018 11:17:45 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MBHjZg037456; Tue, 22 May 2018 11:17:45 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201805221117.w4MBHjZg037456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 22 May 2018 11:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334034 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 334034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 11:17:46 -0000 Author: manu Date: Tue May 22 11:17:45 2018 New Revision: 334034 URL: https://svnweb.freebsd.org/changeset/base/334034 Log: bus_dma(9): arm64 implementation notes Indicate that BUS_DMA_COHERENT is supported for bus_dmamem_alloc and bus_dmamem_create in the arm64 implementation. Modified: head/share/man/man9/bus_dma.9 Modified: head/share/man/man9/bus_dma.9 ============================================================================== --- head/share/man/man9/bus_dma.9 Tue May 22 11:16:45 2018 (r334033) +++ head/share/man/man9/bus_dma.9 Tue May 22 11:17:45 2018 (r334034) @@ -504,7 +504,7 @@ For .Fn bus_dmamap_create , the .Dv BUS_DMA_COHERENT -flag is currently implemented on sparc64. +flag is currently implemented on arm64 and sparc64. .El .It Fa mapp Pointer to a @@ -834,7 +834,7 @@ For .Fn bus_dmamem_alloc , the .Dv BUS_DMA_COHERENT -flag is currently implemented on arm and sparc64. +flag is currently implemented on arm, arm64 and sparc64. .It Dv BUS_DMA_ZERO Causes the allocated memory to be set to all zeros. .It Dv BUS_DMA_NOCACHE From owner-svn-src-head@freebsd.org Tue May 22 11:26:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47222EF202D; Tue, 22 May 2018 11:26:42 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E047F6FD85; Tue, 22 May 2018 11:26:41 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B77661362B; Tue, 22 May 2018 11:26:41 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MBQfYX042821; Tue, 22 May 2018 11:26:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MBQfmA042820; Tue, 22 May 2018 11:26:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805221126.w4MBQfmA042820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 May 2018 11:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334035 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 334035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 11:26:42 -0000 Author: andrew Date: Tue May 22 11:26:41 2018 New Revision: 334035 URL: https://svnweb.freebsd.org/changeset/base/334035 Log: On ThunderX2 we need to be careful to only map the memory the firmware lists in the EFI memory map. As such we need to reduce the mappings to restrict them to not be the full 1G block. For now reduce this to a 2M block, however this may be further restricted to be 4k page aligned as other SoCs may require. This allows ThunderX2 to boot reliably to userspace without performing any speculative memory accesses to invalid physical memory. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Tue May 22 11:17:45 2018 (r334034) +++ head/sys/arm64/arm64/pmap.c Tue May 22 11:26:41 2018 (r334035) @@ -586,33 +586,100 @@ pmap_early_vtophys(vm_offset_t l1pt, vm_offset_t va) return ((l2[l2_slot] & ~ATTR_MASK) + (va & L2_OFFSET)); } -static void -pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, vm_paddr_t max_pa) +static vm_offset_t +pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, + vm_offset_t freemempos) { + pt_entry_t *l2; vm_offset_t va; - vm_paddr_t pa; - u_int l1_slot; + vm_paddr_t l2_pa, pa; + u_int l1_slot, l2_slot, prev_l1_slot; int i; dmap_phys_base = min_pa & ~L1_OFFSET; dmap_phys_max = 0; dmap_max_addr = 0; + l2 = NULL; + prev_l1_slot = -1; +#define DMAP_TABLES ((DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS) >> L0_SHIFT) + memset(pagetable_dmap, 0, PAGE_SIZE * DMAP_TABLES); + for (i = 0; i < (physmap_idx * 2); i += 2) { - pa = physmap[i] & ~L1_OFFSET; + pa = physmap[i] & ~L2_OFFSET; va = pa - dmap_phys_base + DMAP_MIN_ADDRESS; - for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; + /* Create L2 mappings at the start of the region */ + if ((pa & L1_OFFSET) != 0) { + l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); + if (l1_slot != prev_l1_slot) { + prev_l1_slot = l1_slot; + l2 = (pt_entry_t *)freemempos; + l2_pa = pmap_early_vtophys(kern_l1, + (vm_offset_t)l2); + freemempos += PAGE_SIZE; + + pmap_load_store(&pagetable_dmap[l1_slot], + (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE); + + memset(l2, 0, PAGE_SIZE); + } + KASSERT(l2 != NULL, + ("pmap_bootstrap_dmap: NULL l2 map")); + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; + pa += L2_SIZE, va += L2_SIZE) { + /* + * We are on a boundary, stop to + * create a level 1 block + */ + if ((pa & L1_OFFSET) == 0) + break; + + l2_slot = pmap_l2_index(va); + KASSERT(l2_slot != 0, ("...")); + pmap_load_store(&l2[l2_slot], + (pa & ~L2_OFFSET) | ATTR_DEFAULT | ATTR_XN | + ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); + } + KASSERT(va == (pa - dmap_phys_base + DMAP_MIN_ADDRESS), + ("...")); + } + + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1] && + (physmap[i + 1] - pa) >= L1_SIZE; pa += L1_SIZE, va += L1_SIZE) { l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); - /* We already have an entry */ - if (pagetable_dmap[l1_slot] != 0) - continue; pmap_load_store(&pagetable_dmap[l1_slot], (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN | ATTR_IDX(CACHED_MEMORY) | L1_BLOCK); } + /* Create L2 mappings at the end of the region */ + if (pa < physmap[i + 1]) { + l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); + if (l1_slot != prev_l1_slot) { + prev_l1_slot = l1_slot; + l2 = (pt_entry_t *)freemempos; + l2_pa = pmap_early_vtophys(kern_l1, + (vm_offset_t)l2); + freemempos += PAGE_SIZE; + + pmap_load_store(&pagetable_dmap[l1_slot], + (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE); + + memset(l2, 0, PAGE_SIZE); + } + KASSERT(l2 != NULL, + ("pmap_bootstrap_dmap: NULL l2 map")); + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; + pa += L2_SIZE, va += L2_SIZE) { + l2_slot = pmap_l2_index(va); + pmap_load_store(&l2[l2_slot], + (pa & ~L2_OFFSET) | ATTR_DEFAULT | ATTR_XN | + ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); + } + } + if (pa > dmap_phys_max) { dmap_phys_max = pa; dmap_max_addr = va; @@ -620,6 +687,8 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t mi } cpu_tlb_flushID(); + + return (freemempos); } static vm_offset_t @@ -722,8 +791,11 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ max_pa = physmap[i + 1]; } + freemempos = KERNBASE + kernlen; + freemempos = roundup2(freemempos, PAGE_SIZE); + /* Create a direct map region early so we can use it for pa -> va */ - pmap_bootstrap_dmap(l1pt, min_pa, max_pa); + freemempos = pmap_bootstrap_dmap(l1pt, min_pa, freemempos); va = KERNBASE; start_pa = pa = KERNBASE - kern_delta; @@ -755,8 +827,6 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ va = roundup2(va, L1_SIZE); - freemempos = KERNBASE + kernlen; - freemempos = roundup2(freemempos, PAGE_SIZE); /* Create the l2 tables up to VM_MAX_KERNEL_ADDRESS */ freemempos = pmap_bootstrap_l2(l1pt, va, freemempos); /* And the l3 tables for the early devmap */ From owner-svn-src-head@freebsd.org Tue May 22 13:21:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08A31EF57F0; Tue, 22 May 2018 13:21:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA70A73CC5; Tue, 22 May 2018 13:21:44 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B94114932; Tue, 22 May 2018 13:21:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MDLiEd002007; Tue, 22 May 2018 13:21:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MDLiXe002006; Tue, 22 May 2018 13:21:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805221321.w4MDLiXe002006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 May 2018 13:21:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334037 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 334037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 13:21:45 -0000 Author: andrew Date: Tue May 22 13:21:44 2018 New Revision: 334037 URL: https://svnweb.freebsd.org/changeset/base/334037 Log: Only set realmem based on memory where the EXFLAG_NOALLOC is unset. This will allow us to query the maps at any time without disturbing this value. Obtained from: ABT Systems Ltd Sponsored by: Turing Robotic Industries Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Tue May 22 11:57:10 2018 (r334036) +++ head/sys/arm/arm/physmem.c Tue May 22 13:21:44 2018 (r334037) @@ -168,20 +168,21 @@ arm_physmem_print_tables(void) * Returns the number of pages of non-excluded memory added to the avail list. */ static size_t -regions_to_avail(vm_paddr_t *avail, uint32_t exflags, long *pavail) +regions_to_avail(vm_paddr_t *avail, uint32_t exflags, long *pavail, + long *prealmem) { size_t acnt, exi, hwi; uint64_t end, start, xend, xstart; - long availmem; + long availmem, totalmem; const struct region *exp, *hwp; - realmem = 0; + totalmem = 0; availmem = 0; acnt = 0; for (hwi = 0, hwp = hwregions; hwi < hwcnt; ++hwi, ++hwp) { start = hwp->addr; end = hwp->size + start; - realmem += pm_btop((vm_offset_t)(end - start)); + totalmem += pm_btop((vm_offset_t)(end - start)); for (exi = 0, exp = exregions; exi < excnt; ++exi, ++exp) { /* * If the excluded region does not match given flags, @@ -261,8 +262,10 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, panic("Not enough space in the dump/phys_avail arrays"); } - if (pavail) + if (pavail != NULL) *pavail = availmem; + if (prealmem != NULL) + *prealmem = realmem; return (acnt); } @@ -386,8 +389,9 @@ arm_physmem_init_kernel_globals(void) { size_t nextidx; - regions_to_avail(dump_avail, EXFLAG_NODUMP, NULL); - nextidx = regions_to_avail(phys_avail, EXFLAG_NOALLOC, &physmem); + regions_to_avail(dump_avail, EXFLAG_NODUMP, NULL, NULL); + nextidx = regions_to_avail(phys_avail, EXFLAG_NOALLOC, &physmem, + &realmem); if (nextidx == 0) panic("No memory entries in phys_avail"); Maxmem = atop(phys_avail[nextidx - 1]); From owner-svn-src-head@freebsd.org Tue May 22 13:25:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D083EF596C; Tue, 22 May 2018 13:25:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F8FD740B9; Tue, 22 May 2018 13:25:16 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20D791497A; Tue, 22 May 2018 13:25:16 +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 w4MDPGc4005125; Tue, 22 May 2018 13:25:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MDPG1X005124; Tue, 22 May 2018 13:25:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805221325.w4MDPG1X005124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 May 2018 13:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334038 - head/sys/amd64/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/include X-SVN-Commit-Revision: 334038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 13:25:16 -0000 Author: kib Date: Tue May 22 13:25:15 2018 New Revision: 334038 URL: https://svnweb.freebsd.org/changeset/base/334038 Log: Enable IBRS when entering an interrupt handler from usermode. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/include/asmacros.h Modified: head/sys/amd64/include/asmacros.h ============================================================================== --- head/sys/amd64/include/asmacros.h Tue May 22 13:21:44 2018 (r334037) +++ head/sys/amd64/include/asmacros.h Tue May 22 13:25:15 2018 (r334038) @@ -260,6 +260,7 @@ X\vec_name: jz 1f /* yes, leave PCB_FULL_IRET alone */ movq PCPU(CURPCB),%r8 andl $~PCB_FULL_IRET,PCB_FLAGS(%r8) + call handle_ibrs_entry 1: .endm From owner-svn-src-head@freebsd.org Tue May 22 13:28:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D60C9EF5AA2; Tue, 22 May 2018 13:28:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 85D6F74359; Tue, 22 May 2018 13:28:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67BFE1497D; Tue, 22 May 2018 13:28:05 +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 w4MDS5ur005426; Tue, 22 May 2018 13:28:05 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MDS5ln005425; Tue, 22 May 2018 13:28:05 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201805221328.w4MDS5ln005425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 22 May 2018 13:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334039 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 334039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 13:28:06 -0000 Author: ae Date: Tue May 22 13:28:05 2018 New Revision: 334039 URL: https://svnweb.freebsd.org/changeset/base/334039 Log: Restore the ability to keep states after parent rule deletion. This feature is disabled by default and was removed when dynamic states implementation changed to be lockless. Now it is reimplemented with small differences - when dyn_keep_states sysctl variable is enabled, dyn_match_ipv[46]_state() function doesn't match child states of deleted rule. And thus they are keept alive until expired. ipfw_dyn_lookup_state() function does check that state was not orphaned, and if so, it returns pointer to default_rule and its position in the rules map. The main visible difference is that orphaned states still have the same rule number that they have before parent rule deleted, because now a state has many fields related to rule and changing them all atomically to point to default_rule seems hard enough. Reported by: MFC after: 2 days Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Tue May 22 13:25:15 2018 (r334038) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Tue May 22 13:28:05 2018 (r334039) @@ -311,6 +311,9 @@ static VNET_DEFINE(struct callout, dyn_timeout); static VNET_DEFINE(uint32_t, curr_max_length); #define V_curr_max_length VNET(curr_max_length) +static VNET_DEFINE(uint32_t, dyn_keep_states); +#define V_dyn_keep_states VNET(dyn_keep_states) + static VNET_DEFINE(uma_zone_t, dyn_data_zone); static VNET_DEFINE(uma_zone_t, dyn_parent_zone); static VNET_DEFINE(uma_zone_t, dyn_ipv4_zone); @@ -361,6 +364,7 @@ static VNET_DEFINE(uint32_t, dyn_max); /* max # of dy static VNET_DEFINE(uint32_t, dyn_count); /* number of states */ static VNET_DEFINE(uint32_t, dyn_parent_max); /* max # of parent states */ static VNET_DEFINE(uint32_t, dyn_parent_count); /* number of parent states */ + #define V_dyn_max VNET(dyn_max) #define V_dyn_count VNET(dyn_count) #define V_dyn_parent_max VNET(dyn_parent_max) @@ -475,7 +479,11 @@ SYSCTL_U32(_net_inet_ip_fw, OID_AUTO, dyn_short_lifeti SYSCTL_U32(_net_inet_ip_fw, OID_AUTO, dyn_keepalive, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(dyn_keepalive), 0, "Enable keepalives for dynamic states."); +SYSCTL_U32(_net_inet_ip_fw, OID_AUTO, dyn_keep_states, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(dyn_keep_states), 0, + "Do not flush dynamic states on rule deletion"); + #ifdef IPFIREWALL_DYNDEBUG #define DYN_DEBUG(fmt, ...) do { \ printf("%s: " fmt "\n", __func__, __VA_ARGS__); \ @@ -1387,18 +1395,32 @@ ipfw_dyn_lookup_state(const struct ip_fw_args *args, c * that will be added into head of this bucket. * And the state that we currently have matched * should be deleted by dyn_expire_states(). + * + * In case when dyn_keep_states is enabled, return + * pointer to default rule and corresponding f_pos + * value. + * XXX: In this case we lose the cache efficiency, + * since f_pos is not cached, because it seems + * there is no easy way to atomically switch + * all fields related to parent rule of given + * state. */ - if (V_layer3_chain.map[data->f_pos] == rule) + if (V_layer3_chain.map[data->f_pos] == rule) { data->chain_id = V_layer3_chain.id; - else { + info->f_pos = data->f_pos; + } else if (V_dyn_keep_states != 0) { + rule = V_layer3_chain.default_rule; + info->f_pos = V_layer3_chain.n_rules - 1; + } else { rule = NULL; info->direction = MATCH_NONE; DYN_DEBUG("rule %p [%u, %u] is considered " "invalid in data %p", rule, data->ruleid, data->rulenum, data); + /* info->f_pos doesn't matter here. */ } - } - info->f_pos = data->f_pos; + } else + info->f_pos = data->f_pos; } DYNSTATE_CRITICAL_EXIT(); #if 0 @@ -2099,7 +2121,8 @@ dyn_match_ipv4_state(struct dyn_ipv4_state *s, const i if (s->type == O_LIMIT) return (dyn_match_range(s->data->rulenum, s->data->set, rt)); - if (dyn_match_range(s->data->rulenum, s->data->set, rt)) + if (V_dyn_keep_states == 0 && + dyn_match_range(s->data->rulenum, s->data->set, rt)) return (1); return (0); @@ -2117,7 +2140,8 @@ dyn_match_ipv6_state(struct dyn_ipv6_state *s, const i if (s->type == O_LIMIT) return (dyn_match_range(s->data->rulenum, s->data->set, rt)); - if (dyn_match_range(s->data->rulenum, s->data->set, rt)) + if (V_dyn_keep_states == 0 && + dyn_match_range(s->data->rulenum, s->data->set, rt)) return (1); return (0); From owner-svn-src-head@freebsd.org Tue May 22 13:30:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFD5FEF5E30; Tue, 22 May 2018 13:30:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 655FE74638; Tue, 22 May 2018 13:30:57 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 468A314998; Tue, 22 May 2018 13:30:57 +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 w4MDUvq4006319; Tue, 22 May 2018 13:30:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MDUvXi006318; Tue, 22 May 2018 13:30:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805221330.w4MDUvXi006318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 May 2018 13:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334040 - head/sys/i386/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/include X-SVN-Commit-Revision: 334040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 13:30:57 -0000 Author: kib Date: Tue May 22 13:30:56 2018 New Revision: 334040 URL: https://svnweb.freebsd.org/changeset/base/334040 Log: Fix double-load of %cr3 and double-copy of the stack frame for the kernel entry from userspace vm86. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/include/asmacros.h Modified: head/sys/i386/include/asmacros.h ============================================================================== --- head/sys/i386/include/asmacros.h Tue May 22 13:28:05 2018 (r334039) +++ head/sys/i386/include/asmacros.h Tue May 22 13:30:56 2018 (r334040) @@ -218,7 +218,7 @@ testl $PCB_VM86CALL, PCB_FLAGS(%eax) jnz 3f NMOVE_STACKS - jmp 2f + jmp 3f 1: testb $SEL_RPL_MASK, TF_CS(%esp) jz 3f 2: MOVE_STACKS From owner-svn-src-head@freebsd.org Tue May 22 13:45:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11FC7EF645A for ; Tue, 22 May 2018 13:45:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AB87751AD for ; Tue, 22 May 2018 13:45:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x229.google.com with SMTP id y189-v6so25315065itb.2 for ; Tue, 22 May 2018 06:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=SFMmKfyN3R2CfkAGPXMbfeabIrkdVWdGUHcf1gas2mI=; b=MwsQNo2wywOtWgyinUxzX3Av7OTfV+NrV5ZdBlkSVikSbFbSTVgT/eJCLg+Z/qfyBB 2a/AASE5hkkv/1diIXBu1hCXz/Qkx4ZdVKHxJK+3T6+BjBRL+atyAhr5HX42bSWiMJBw X+nlHh58bsEJ9KwKGWtukf0DMiG+zVzuKqkavxQLyrG7ahjBhIfHFMJEgR7plHaXAF8c ZjPSushc4yWVI+13rGNh+Bv0UF1K8ZzeBmhIP9QUX6Oqv7t2wZPGckSsEQMygptAHbHh 5A4O0/P3Jf9+LZhYf14faePKNDrqn22/maKgmT/cGRhfM1g117yzHN9EbEWVi7+UE68w dkmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=SFMmKfyN3R2CfkAGPXMbfeabIrkdVWdGUHcf1gas2mI=; b=eJktRZKUavatk7tIT61xxWB8XAEJl6k3LB/lxGr2QaVrxO0FHoUyytRyPLy0BkVcgF 5Em/NyC2Y66GIrbAfoWeAkhvobfda+yiCP6Fepw84Y0TxxnQFIwKF/bT7U23kF1pq4+y 9FPXDW0rg6BSKRyGRJxQSFG9VXYgRGDQFa/hBuzUzomFWu0bqZ6u+8MHytKGdHZv2Ys0 e9kYtme9vZqFdnXzs3CzIzgMHNo4/4U18GVRyGIn3CysWhDZ43lz2mIQXb4mTiJGjHwB yVbeb0FuitOoHD2bNACMe8jlpQD/WriUzI+Be7AvHi6UmXF1amZKiHSXZ5CF5SEo8KTn ensA== X-Gm-Message-State: ALKqPwdoJOuP/NsTTs2dxkU35lqwEXQHqdAIYTydUlb2IWlPzq7ZSoCj 2bxKSHa7E7IL+cok0Yh5Ip2SuZtENq6D+zfoygEs3g== X-Google-Smtp-Source: ADUXVKIAYoubxUeiQr7G4EGfHbqM6QOK6p4tKAvpU9W+5JE16/BHPR5ecRrttq3Y381TUw3xAs/cDHooXqFi4aEb3Sk= X-Received: by 2002:a24:42c6:: with SMTP id i189-v6mr1306141itb.73.1526996711800; Tue, 22 May 2018 06:45:11 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:a649:0:0:0:0:0 with HTTP; Tue, 22 May 2018 06:45:11 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201805212035.w4LKZH0e091649@repo.freebsd.org> <20180522110110.H1292@besplex.bde.org> From: Warner Losh Date: Tue, 22 May 2018 07:45:11 -0600 X-Google-Sender-Auth: jO_rcoCqCOSnSFSGrwkUmvzswaI Message-ID: Subject: Re: svn commit: r333995 - head/sys/teken To: Ed Schouten Cc: Bruce Evans , =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 13:45:13 -0000 On Tue, May 22, 2018 at 3:25 AM, Ed Schouten wrote: > Hi Bruce, > > 2018-05-22 3:18 GMT+02:00 Bruce Evans : > > DECSCUSR is a verbose yet cryptic abbreviation which is not even expanded > > its name. It is the only abbreviation longer than 7 characters. This > > messes up the souce formatting. > > Yeah, it's a bit silly, but that's simply how it's called: > > https://vt100.net/docs/vt510-rm/DECSCUSR.html > > I think the state machine generator doesn't mind if we added an extra > tab between all other entries to get it to line up again. Maybe that > does push us over 80 columns, though... Yea, back in the day, ANSI had official mnemonics for the escape sequences. And DEC's extensions to ANSI sequences had official mnemonics as well, but all started with DEC so you knew about them. These mnemonics were akin to the assembler at the time, where one had to keep track of the differences between HRLI and HRROS in assembler, SCUSR isn't so crazy. These days, it's a bit brief. Warner [*] These are MACRO-10 half word instructions that I've forgotten all meaning of other than they were half word instructions that did weird things depending on which letters... Half [LR src] [LR dst] . From owner-svn-src-head@freebsd.org Tue May 22 13:45:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DD61EF64A4; Tue, 22 May 2018 13:45:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1304D752E8; Tue, 22 May 2018 13:45:25 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E666114CCB; Tue, 22 May 2018 13:45:24 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MDjOJb015905; Tue, 22 May 2018 13:45:24 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MDjOUQ015904; Tue, 22 May 2018 13:45:24 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201805221345.w4MDjOUQ015904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 22 May 2018 13:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334041 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 334041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 13:45:25 -0000 Author: manu Date: Tue May 22 13:45:24 2018 New Revision: 334041 URL: https://svnweb.freebsd.org/changeset/base/334041 Log: bus_dma(9): Correct arm64 BUS_DMA_COHERENT implementation note BUS_DMA_COHERENT isn't supported in bus_dmamap_create but bus_dma_tag_create. Document it properly. Submitted by: andrew Modified: head/share/man/man9/bus_dma.9 Modified: head/share/man/man9/bus_dma.9 ============================================================================== --- head/share/man/man9/bus_dma.9 Tue May 22 13:30:56 2018 (r334040) +++ head/share/man/man9/bus_dma.9 Tue May 22 13:45:24 2018 (r334041) @@ -446,6 +446,15 @@ allocated with Also, due to resource sharing with other tags, this flag does not guarantee that resources will be allocated or reserved exclusively for this tag. It should be treated only as a minor optimization. +.It Dv BUS_DMA_COHERENT +Indicate that the DMA engine and CPU are cache-coherent. +Cached memory may be used to back allocations created by +.Fn bus_dmamem_alloc . +For +.Fn bus_dma_tag_create , +the +.Dv BUS_DMA_COHERENT +flag is currently implemented on arm64. .El .It Fa lockfunc Optional lock manipulation function (may be @@ -504,7 +513,7 @@ For .Fn bus_dmamap_create , the .Dv BUS_DMA_COHERENT -flag is currently implemented on arm64 and sparc64. +flag is currently implemented on sparc64. .El .It Fa mapp Pointer to a From owner-svn-src-head@freebsd.org Tue May 22 13:45:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCAC6EF653C; Tue, 22 May 2018 13:45:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 723C57540A; Tue, 22 May 2018 13:45:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5388014CCC; Tue, 22 May 2018 13:45:41 +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 w4MDjfRA015958; Tue, 22 May 2018 13:45:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MDjfSg015957; Tue, 22 May 2018 13:45:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805221345.w4MDjfSg015957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 May 2018 13:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334042 - head/sys/i386/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/include X-SVN-Commit-Revision: 334042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 13:45:41 -0000 Author: kib Date: Tue May 22 13:45:40 2018 New Revision: 334042 URL: https://svnweb.freebsd.org/changeset/base/334042 Log: Use local unique labels inside most often used macros. Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/include/asmacros.h Modified: head/sys/i386/include/asmacros.h ============================================================================== --- head/sys/i386/include/asmacros.h Tue May 22 13:45:24 2018 (r334041) +++ head/sys/i386/include/asmacros.h Tue May 22 13:45:40 2018 (r334042) @@ -189,9 +189,9 @@ movl PCPU(KESP0), %edx movl $TF_SZ, %ecx testl $PSL_VM, TF_EFLAGS(%esp) - jz 1001f + jz .L\@.1 addl $VM86_STACK_SPACE, %ecx -1001: subl %ecx, %edx +.L\@.1: subl %ecx, %edx movl %edx, %edi movl %esp, %esi rep; movsb @@ -199,9 +199,9 @@ .endm .macro LOAD_KCR3 - call 1000f -1000: popl %eax - movl (tramp_idleptd - 1000b)(%eax), %eax + call .L\@.1 +.L\@.1: popl %eax + movl (tramp_idleptd - .L\@.1)(%eax), %eax movl %eax, %cr3 .endm @@ -212,17 +212,17 @@ .macro KENTER testl $PSL_VM, TF_EFLAGS(%esp) - jz 1f + jz .L\@.1 LOAD_KCR3 movl PCPU(CURPCB), %eax testl $PCB_VM86CALL, PCB_FLAGS(%eax) - jnz 3f + jnz .L\@.3 NMOVE_STACKS - jmp 3f -1: testb $SEL_RPL_MASK, TF_CS(%esp) - jz 3f -2: MOVE_STACKS -3: + jmp .L\@.3 +.L\@.1: testb $SEL_RPL_MASK, TF_CS(%esp) + jz .L\@.3 +.L\@.2: MOVE_STACKS +.L\@.3: .endm #endif /* LOCORE */ From owner-svn-src-head@freebsd.org Tue May 22 14:26:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FA4FEF7D89; Tue, 22 May 2018 14:26:59 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C963277916; Tue, 22 May 2018 14:26:58 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA85315355; Tue, 22 May 2018 14:26:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MEQwsq036787; Tue, 22 May 2018 14:26:58 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MEQwdY036786; Tue, 22 May 2018 14:26:58 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805221426.w4MEQwdY036786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 May 2018 14:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334045 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 334045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 14:26:59 -0000 Author: andrew Date: Tue May 22 14:26:58 2018 New Revision: 334045 URL: https://svnweb.freebsd.org/changeset/base/334045 Log: Pass the array length into regions_to_avail. On arm64 we will need to get the phys_avail array from before the kernel is excluded to create teh DMAP region. In preperation for this pass in the array length into regions_to_avail. Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Tue May 22 14:25:40 2018 (r334044) +++ head/sys/arm/arm/physmem.c Tue May 22 14:26:58 2018 (r334045) @@ -168,8 +168,8 @@ arm_physmem_print_tables(void) * Returns the number of pages of non-excluded memory added to the avail list. */ static size_t -regions_to_avail(vm_paddr_t *avail, uint32_t exflags, long *pavail, - long *prealmem) +regions_to_avail(vm_paddr_t *avail, uint32_t exflags, size_t maxavail, + long *pavail, long *prealmem) { size_t acnt, exi, hwi; uint64_t end, start, xend, xstart; @@ -258,7 +258,7 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, } availmem += pm_btop((vm_offset_t)(end - start)); } - if (acnt >= MAX_AVAIL_ENTRIES) + if (acnt >= maxavail) panic("Not enough space in the dump/phys_avail arrays"); } @@ -389,9 +389,10 @@ arm_physmem_init_kernel_globals(void) { size_t nextidx; - regions_to_avail(dump_avail, EXFLAG_NODUMP, NULL, NULL); - nextidx = regions_to_avail(phys_avail, EXFLAG_NOALLOC, &physmem, - &realmem); + regions_to_avail(dump_avail, EXFLAG_NODUMP, MAX_AVAIL_ENTRIES, NULL, + NULL); + nextidx = regions_to_avail(phys_avail, EXFLAG_NOALLOC, + MAX_AVAIL_ENTRIES, &physmem, &realmem); if (nextidx == 0) panic("No memory entries in phys_avail"); Maxmem = atop(phys_avail[nextidx - 1]); From owner-svn-src-head@freebsd.org Tue May 22 14:35:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5892DEF831D; Tue, 22 May 2018 14:35:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C97178355; Tue, 22 May 2018 14:35:34 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2EE71550D; Tue, 22 May 2018 14:35:33 +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 w4MEZXUh041964; Tue, 22 May 2018 14:35:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MEZXnW041963; Tue, 22 May 2018 14:35:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805221435.w4MEZXnW041963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 22 May 2018 14:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334046 - head/tools/tools/intel-ucode-split X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/tools/intel-ucode-split X-SVN-Commit-Revision: 334046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 14:35:34 -0000 Author: emaste Date: Tue May 22 14:35:33 2018 New Revision: 334046 URL: https://svnweb.freebsd.org/changeset/base/334046 Log: intel-ucode-split: add -n flag to skip creating output files Sponsored by: The FreeBSD Foundation Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c ============================================================================== --- head/tools/tools/intel-ucode-split/intel-ucode-split.c Tue May 22 14:26:58 2018 (r334045) +++ head/tools/tools/intel-ucode-split/intel-ucode-split.c Tue May 22 14:35:33 2018 (r334046) @@ -112,7 +112,7 @@ static void usage(void) { - printf("ucode-split [-v] microcode_file\n"); + printf("ucode-split [-nv] microcode_file\n"); exit(1); } @@ -124,11 +124,14 @@ main(int argc, char *argv[]) size_t len, resid; ssize_t rv; int c, ifd, ofd; - bool vflag; + bool nflag, vflag; - vflag = false; - while ((c = getopt(argc, argv, "v")) != -1) { + nflag = vflag = false; + while ((c = getopt(argc, argv, "nv")) != -1) { switch (c) { + case 'n': + nflag = true; + break; case 'v': vflag = true; break; @@ -166,40 +169,48 @@ main(int argc, char *argv[]) if (vflag) dump_header(&hdr); - sig_str = format_signature(hdr.processor_signature); - asprintf(&output_file, "%s.%02x", sig_str, - hdr.processor_flags & 0xff); - free(sig_str); - if (output_file == NULL) - err(1, "asprintf"); - ofd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, 0600); - if (ofd < 0) - err(1, "open"); - - /* Write header. */ - rv = write(ofd, &hdr, sizeof(hdr)); - if (rv < (ssize_t)sizeof(hdr)) - err(1, "write"); - - /* Copy data. */ resid = (hdr.total_size != 0 ? hdr.total_size : 2048) - sizeof(hdr); if (resid > 1 << 24) /* Arbitrary chosen maximum size. */ errx(1, "header total_size too large"); - while (resid > 0) { - len = resid < bufsize ? resid : bufsize; - rv = read(ifd, buf, len); - if (rv < 0) - err(1, "read"); - else if (rv < (ssize_t)len) - errx(1, "truncated microcode data"); - if (write(ofd, buf, len) < (ssize_t)len) + + if (nflag) { + if (lseek(ifd, resid, SEEK_CUR) == -1) + err(1, "lseek"); + printf("\n"); + } else { + sig_str = format_signature(hdr.processor_signature); + asprintf(&output_file, "%s.%02x", sig_str, + hdr.processor_flags & 0xff); + free(sig_str); + if (output_file == NULL) + err(1, "asprintf"); + ofd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, + 0600); + if (ofd < 0) + err(1, "open"); + + /* Write header. */ + rv = write(ofd, &hdr, sizeof(hdr)); + if (rv < (ssize_t)sizeof(hdr)) err(1, "write"); - resid -= len; + + /* Copy data. */ + while (resid > 0) { + len = resid < bufsize ? resid : bufsize; + rv = read(ifd, buf, len); + if (rv < 0) + err(1, "read"); + else if (rv < (ssize_t)len) + errx(1, "truncated microcode data"); + if (write(ofd, buf, len) < (ssize_t)len) + err(1, "write"); + resid -= len; + } + if (vflag) + printf("written to %s\n\n", output_file); + close(ofd); + free(output_file); } - if (vflag) - printf("written to %s\n\n", output_file); - close(ofd); - free(output_file); } } From owner-svn-src-head@freebsd.org Tue May 22 15:13:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C44A6EF9584; Tue, 22 May 2018 15:13:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76E087A2BB; Tue, 22 May 2018 15:13:26 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58A0415B70; Tue, 22 May 2018 15:13:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MFDQCX061998; Tue, 22 May 2018 15:13:26 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MFDQKL061997; Tue, 22 May 2018 15:13:26 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201805221513.w4MFDQKL061997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 22 May 2018 15:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334048 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334048 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:13:26 -0000 Author: mjg Date: Tue May 22 15:13:25 2018 New Revision: 334048 URL: https://svnweb.freebsd.org/changeset/base/334048 Log: sx: fixup a braino in r334024 If a thread waiting on sx dropped Giant it would not be properly reacquired on exit from the routine, later resulting in panics indicating Giant is not held (when it should be). The bug was not present in the original patch sent to pho, I wittingly added it just prior to the commit and only smoke-tested it. Reported by: pho Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Tue May 22 14:36:46 2018 (r334047) +++ head/sys/kern/kern_sx.c Tue May 22 15:13:25 2018 (r334048) @@ -879,6 +879,7 @@ retry_sleepq: if (in_critical) critical_exit(); #endif + GIANT_RESTORE(); #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) if (__predict_true(!doing_lockprof)) return (error); @@ -898,7 +899,6 @@ out_lockstat: if (!error) LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, contested, waittime, file, line, LOCKSTAT_WRITER); - GIANT_RESTORE(); return (error); } From owner-svn-src-head@freebsd.org Tue May 22 15:35:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 002FFEFA12C; Tue, 22 May 2018 15:35:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 745F07B670; Tue, 22 May 2018 15:35:39 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54FCE15EE2; Tue, 22 May 2018 15:35:39 +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 w4MFZdlx072486; Tue, 22 May 2018 15:35:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MFZd1C072484; Tue, 22 May 2018 15:35:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805221535.w4MFZd1C072484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 May 2018 15:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334049 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 334049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:35:40 -0000 Author: markj Date: Tue May 22 15:35:38 2018 New Revision: 334049 URL: https://svnweb.freebsd.org/changeset/base/334049 Log: Simplify lagg_input(). No functional change intended. MFC after: 2 weeks Modified: head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Tue May 22 15:13:25 2018 (r334048) +++ head/sys/net/if_lagg.c Tue May 22 15:35:38 2018 (r334049) @@ -1680,7 +1680,7 @@ lagg_input(struct ifnet *ifp, struct mbuf *m) LAGG_RLOCK(); if ((scifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - (lp->lp_flags & LAGG_PORT_DISABLED) || + lp->lp_detaching != 0 || sc->sc_proto == LAGG_PROTO_NONE) { LAGG_RUNLOCK(); m_freem(m); @@ -1689,17 +1689,10 @@ lagg_input(struct ifnet *ifp, struct mbuf *m) ETHER_BPF_MTAP(scifp, m); - if (lp->lp_detaching != 0) { + m = lagg_proto_input(sc, lp, m); + if (m != NULL && (scifp->if_flags & IFF_MONITOR) != 0) { m_freem(m); m = NULL; - } else - m = lagg_proto_input(sc, lp, m); - - if (m != NULL) { - if (scifp->if_flags & IFF_MONITOR) { - m_freem(m); - m = NULL; - } } LAGG_RUNLOCK(); Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Tue May 22 15:13:25 2018 (r334048) +++ head/sys/net/if_lagg.h Tue May 22 15:35:38 2018 (r334049) @@ -42,9 +42,8 @@ #define LAGG_PORT_ACTIVE 0x00000004 /* port is active */ #define LAGG_PORT_COLLECTING 0x00000008 /* port is receiving frames */ #define LAGG_PORT_DISTRIBUTING 0x00000010 /* port is sending frames */ -#define LAGG_PORT_DISABLED 0x00000020 /* port is disabled */ #define LAGG_PORT_BITS "\20\01MASTER\02STACK\03ACTIVE\04COLLECTING" \ - "\05DISTRIBUTING\06DISABLED" + "\05DISTRIBUTING" /* Supported lagg PROTOs */ typedef enum { From owner-svn-src-head@freebsd.org Tue May 22 15:38:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFA4BEFA2A7; Tue, 22 May 2018 15:38:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DDFB7B95A; Tue, 22 May 2018 15:38: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EF7515EE6; Tue, 22 May 2018 15:38: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 w4MFcpMR072769; Tue, 22 May 2018 15:38:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MFcpkO072768; Tue, 22 May 2018 15:38:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805221538.w4MFcpkO072768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 May 2018 15:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334050 - head/sys/dev/cpuctl X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/cpuctl X-SVN-Commit-Revision: 334050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:38:52 -0000 Author: markj Date: Tue May 22 15:38:51 2018 New Revision: 334050 URL: https://svnweb.freebsd.org/changeset/base/334050 Log: Flush caches before initiating a microcode update on Intel CPUs. This apparently works around issues with updates of certain Broadwell CPUs. Reviewed by: emaste, kib, sbruno MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D15520 Modified: head/sys/dev/cpuctl/cpuctl.c Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Tue May 22 15:35:38 2018 (r334049) +++ head/sys/dev/cpuctl/cpuctl.c Tue May 22 15:38:51 2018 (r334050) @@ -367,8 +367,10 @@ update_intel(int cpu, cpuctl_update_args_t *args, stru rdmsr_safe(MSR_BIOS_SIGN, &rev0); /* Get current microcode revision. */ /* - * Perform update. + * Perform update. Flush caches first to work around seeingly + * undocumented errata applying to some Broadwell CPUs. */ + wbinvd(); wrmsr_safe(MSR_BIOS_UPDT_TRIG, (uintptr_t)(ptr)); wrmsr_safe(MSR_BIOS_SIGN, 0); From owner-svn-src-head@freebsd.org Tue May 22 15:44:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA5D5EFA497; Tue, 22 May 2018 15:44:59 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 296BF7BDC0; Tue, 22 May 2018 15:44:58 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4MFiukD030797; Tue, 22 May 2018 08:44:56 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4MFiuHn030796; Tue, 22 May 2018 08:44:56 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805221544.w4MFiuHn030796@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334050 - head/sys/dev/cpuctl In-Reply-To: <201805221538.w4MFcpkO072768@repo.freebsd.org> To: Mark Johnston Date: Tue, 22 May 2018 08:44:56 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:44:59 -0000 > Author: markj > Date: Tue May 22 15:38:51 2018 > New Revision: 334050 > URL: https://svnweb.freebsd.org/changeset/base/334050 > > Log: > Flush caches before initiating a microcode update on Intel CPUs. > > This apparently works around issues with updates of certain Broadwell > CPUs. > > Reviewed by: emaste, kib, sbruno > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D15520 > > Modified: > head/sys/dev/cpuctl/cpuctl.c > > Modified: head/sys/dev/cpuctl/cpuctl.c > ============================================================================== > --- head/sys/dev/cpuctl/cpuctl.c Tue May 22 15:35:38 2018 (r334049) > +++ head/sys/dev/cpuctl/cpuctl.c Tue May 22 15:38:51 2018 (r334050) > @@ -367,8 +367,10 @@ update_intel(int cpu, cpuctl_update_args_t *args, stru > rdmsr_safe(MSR_BIOS_SIGN, &rev0); /* Get current microcode revision. */ > > /* > - * Perform update. > + * Perform update. Flush caches first to work around seeingly Did you mean seemingly? > + * undocumented errata applying to some Broadwell CPUs. > */ > + wbinvd(); > wrmsr_safe(MSR_BIOS_UPDT_TRIG, (uintptr_t)(ptr)); > wrmsr_safe(MSR_BIOS_SIGN, 0); > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue May 22 15:49:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DB9EEFA5CE; Tue, 22 May 2018 15:49:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5162D7C066; Tue, 22 May 2018 15:49:24 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 332D016088; Tue, 22 May 2018 15:49:24 +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 w4MFnO2C077742; Tue, 22 May 2018 15:49:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MFnOip077741; Tue, 22 May 2018 15:49:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805221549.w4MFnOip077741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 May 2018 15:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334051 - head/sys/dev/cpuctl X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/cpuctl X-SVN-Commit-Revision: 334051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:49:24 -0000 Author: markj Date: Tue May 22 15:49:23 2018 New Revision: 334051 URL: https://svnweb.freebsd.org/changeset/base/334051 Log: Typo. Reported by: rgrimes, vangyzen X-MFC with: r334050 Modified: head/sys/dev/cpuctl/cpuctl.c Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Tue May 22 15:38:51 2018 (r334050) +++ head/sys/dev/cpuctl/cpuctl.c Tue May 22 15:49:23 2018 (r334051) @@ -367,7 +367,7 @@ update_intel(int cpu, cpuctl_update_args_t *args, stru rdmsr_safe(MSR_BIOS_SIGN, &rev0); /* Get current microcode revision. */ /* - * Perform update. Flush caches first to work around seeingly + * Perform update. Flush caches first to work around seemingly * undocumented errata applying to some Broadwell CPUs. */ wbinvd(); From owner-svn-src-head@freebsd.org Tue May 22 15:52:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22DB3EFA9FF; Tue, 22 May 2018 15:52:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAA7C7C57A; Tue, 22 May 2018 15:52:11 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BB191622C; Tue, 22 May 2018 15:52:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MFqBZX081240; Tue, 22 May 2018 15:52:11 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MFqBdK081239; Tue, 22 May 2018 15:52:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805221552.w4MFqBdK081239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 May 2018 15:52:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334052 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 334052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:52:12 -0000 Author: andrew Date: Tue May 22 15:52:11 2018 New Revision: 334052 URL: https://svnweb.freebsd.org/changeset/base/334052 Log: Revert r334035 for now. It breaks the boot on some boards as er expect to be able to read UEFI RuntimeData memory via the DMAP region. Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Tue May 22 15:49:23 2018 (r334051) +++ head/sys/arm64/arm64/pmap.c Tue May 22 15:52:11 2018 (r334052) @@ -586,100 +586,33 @@ pmap_early_vtophys(vm_offset_t l1pt, vm_offset_t va) return ((l2[l2_slot] & ~ATTR_MASK) + (va & L2_OFFSET)); } -static vm_offset_t -pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, - vm_offset_t freemempos) +static void +pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, vm_paddr_t max_pa) { - pt_entry_t *l2; vm_offset_t va; - vm_paddr_t l2_pa, pa; - u_int l1_slot, l2_slot, prev_l1_slot; + vm_paddr_t pa; + u_int l1_slot; int i; dmap_phys_base = min_pa & ~L1_OFFSET; dmap_phys_max = 0; dmap_max_addr = 0; - l2 = NULL; - prev_l1_slot = -1; -#define DMAP_TABLES ((DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS) >> L0_SHIFT) - memset(pagetable_dmap, 0, PAGE_SIZE * DMAP_TABLES); - for (i = 0; i < (physmap_idx * 2); i += 2) { - pa = physmap[i] & ~L2_OFFSET; + pa = physmap[i] & ~L1_OFFSET; va = pa - dmap_phys_base + DMAP_MIN_ADDRESS; - /* Create L2 mappings at the start of the region */ - if ((pa & L1_OFFSET) != 0) { - l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); - if (l1_slot != prev_l1_slot) { - prev_l1_slot = l1_slot; - l2 = (pt_entry_t *)freemempos; - l2_pa = pmap_early_vtophys(kern_l1, - (vm_offset_t)l2); - freemempos += PAGE_SIZE; - - pmap_load_store(&pagetable_dmap[l1_slot], - (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE); - - memset(l2, 0, PAGE_SIZE); - } - KASSERT(l2 != NULL, - ("pmap_bootstrap_dmap: NULL l2 map")); - for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; - pa += L2_SIZE, va += L2_SIZE) { - /* - * We are on a boundary, stop to - * create a level 1 block - */ - if ((pa & L1_OFFSET) == 0) - break; - - l2_slot = pmap_l2_index(va); - KASSERT(l2_slot != 0, ("...")); - pmap_load_store(&l2[l2_slot], - (pa & ~L2_OFFSET) | ATTR_DEFAULT | ATTR_XN | - ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); - } - KASSERT(va == (pa - dmap_phys_base + DMAP_MIN_ADDRESS), - ("...")); - } - - for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1] && - (physmap[i + 1] - pa) >= L1_SIZE; + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; pa += L1_SIZE, va += L1_SIZE) { l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); + /* We already have an entry */ + if (pagetable_dmap[l1_slot] != 0) + continue; pmap_load_store(&pagetable_dmap[l1_slot], (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN | ATTR_IDX(CACHED_MEMORY) | L1_BLOCK); } - /* Create L2 mappings at the end of the region */ - if (pa < physmap[i + 1]) { - l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); - if (l1_slot != prev_l1_slot) { - prev_l1_slot = l1_slot; - l2 = (pt_entry_t *)freemempos; - l2_pa = pmap_early_vtophys(kern_l1, - (vm_offset_t)l2); - freemempos += PAGE_SIZE; - - pmap_load_store(&pagetable_dmap[l1_slot], - (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE); - - memset(l2, 0, PAGE_SIZE); - } - KASSERT(l2 != NULL, - ("pmap_bootstrap_dmap: NULL l2 map")); - for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; - pa += L2_SIZE, va += L2_SIZE) { - l2_slot = pmap_l2_index(va); - pmap_load_store(&l2[l2_slot], - (pa & ~L2_OFFSET) | ATTR_DEFAULT | ATTR_XN | - ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); - } - } - if (pa > dmap_phys_max) { dmap_phys_max = pa; dmap_max_addr = va; @@ -687,8 +620,6 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t mi } cpu_tlb_flushID(); - - return (freemempos); } static vm_offset_t @@ -791,11 +722,8 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ max_pa = physmap[i + 1]; } - freemempos = KERNBASE + kernlen; - freemempos = roundup2(freemempos, PAGE_SIZE); - /* Create a direct map region early so we can use it for pa -> va */ - freemempos = pmap_bootstrap_dmap(l1pt, min_pa, freemempos); + pmap_bootstrap_dmap(l1pt, min_pa, max_pa); va = KERNBASE; start_pa = pa = KERNBASE - kern_delta; @@ -827,6 +755,8 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ va = roundup2(va, L1_SIZE); + freemempos = KERNBASE + kernlen; + freemempos = roundup2(freemempos, PAGE_SIZE); /* Create the l2 tables up to VM_MAX_KERNEL_ADDRESS */ freemempos = pmap_bootstrap_l2(l1pt, va, freemempos); /* And the l3 tables for the early devmap */ From owner-svn-src-head@freebsd.org Tue May 22 15:52:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 553BCEFAA31; Tue, 22 May 2018 15:52:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 071D37C6A1; Tue, 22 May 2018 15:52:24 +0000 (UTC) (envelope-from jhb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD59816241; Tue, 22 May 2018 15:52:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MFqNu9082215; Tue, 22 May 2018 15:52:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MFqMiI082208; Tue, 22 May 2018 15:52:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201805221552.w4MFqMiI082208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 22 May 2018 15:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334053 - head/lib/libkvm X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/libkvm X-SVN-Commit-Revision: 334053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:52:24 -0000 Author: jhb Date: Tue May 22 15:52:22 2018 New Revision: 334053 URL: https://svnweb.freebsd.org/changeset/base/334053 Log: Use __SCCSID for SCCS IDs in libkvm sources. Rather than using #ifdef's around a static char array, use the existing helper macro from for SCCS IDs. To preserve existing behavior, add -DNO__SCCSID to CFLAGS to not include SCCS IDs in the built library by default. Reviewed by: brooks, dab (older version) Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D15459 Modified: head/lib/libkvm/Makefile head/lib/libkvm/kvm.c head/lib/libkvm/kvm_amd64.c head/lib/libkvm/kvm_getloadavg.c head/lib/libkvm/kvm_i386.c head/lib/libkvm/kvm_proc.c head/lib/libkvm/kvm_sparc64.c Modified: head/lib/libkvm/Makefile ============================================================================== --- head/lib/libkvm/Makefile Tue May 22 15:52:11 2018 (r334052) +++ head/lib/libkvm/Makefile Tue May 22 15:52:22 2018 (r334053) @@ -6,7 +6,7 @@ LIB= kvm SHLIBDIR?= /lib SHLIB_MAJOR= 7 -CFLAGS+=-DLIBC_SCCS -I${.CURDIR} +CFLAGS+=-DNO__SCCSID -I${.CURDIR} WARNS?= 6 Modified: head/lib/libkvm/kvm.c ============================================================================== --- head/lib/libkvm/kvm.c Tue May 22 15:52:11 2018 (r334052) +++ head/lib/libkvm/kvm.c Tue May 22 15:52:22 2018 (r334053) @@ -35,12 +35,7 @@ #include __FBSDID("$FreeBSD$"); - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)kvm.c 8.2 (Berkeley) 2/13/94"; -#endif -#endif /* LIBC_SCCS and not lint */ +__SCCSID("@(#)kvm.c 8.2 (Berkeley) 2/13/94"); #include #include Modified: head/lib/libkvm/kvm_amd64.c ============================================================================== --- head/lib/libkvm/kvm_amd64.c Tue May 22 15:52:11 2018 (r334052) +++ head/lib/libkvm/kvm_amd64.c Tue May 22 15:52:22 2018 (r334053) @@ -35,12 +35,7 @@ #include __FBSDID("$FreeBSD$"); - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"; -#endif -#endif /* LIBC_SCCS and not lint */ +__SCCSID("@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"); /* * AMD64 machine dependent routines for kvm. Hopefully, the forthcoming Modified: head/lib/libkvm/kvm_getloadavg.c ============================================================================== --- head/lib/libkvm/kvm_getloadavg.c Tue May 22 15:52:11 2018 (r334052) +++ head/lib/libkvm/kvm_getloadavg.c Tue May 22 15:52:22 2018 (r334053) @@ -31,12 +31,7 @@ #include __FBSDID("$FreeBSD$"); - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)kvm_getloadavg.c 8.1 (Berkeley) 6/4/93"; -#endif -#endif /* LIBC_SCCS and not lint */ +__SCCSID("@(#)kvm_getloadavg.c 8.1 (Berkeley) 6/4/93"); #include #include Modified: head/lib/libkvm/kvm_i386.c ============================================================================== --- head/lib/libkvm/kvm_i386.c Tue May 22 15:52:11 2018 (r334052) +++ head/lib/libkvm/kvm_i386.c Tue May 22 15:52:22 2018 (r334053) @@ -35,12 +35,7 @@ #include __FBSDID("$FreeBSD$"); - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"; -#endif -#endif /* LIBC_SCCS and not lint */ +__SCCSID("@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"); /* * i386 machine dependent routines for kvm. Hopefully, the forthcoming Modified: head/lib/libkvm/kvm_proc.c ============================================================================== --- head/lib/libkvm/kvm_proc.c Tue May 22 15:52:11 2018 (r334052) +++ head/lib/libkvm/kvm_proc.c Tue May 22 15:52:22 2018 (r334053) @@ -33,14 +33,9 @@ * SUCH DAMAGE. */ -#if 0 -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93"; -#endif /* LIBC_SCCS and not lint */ -#endif - #include __FBSDID("$FreeBSD$"); +__SCCSID("@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93"); /* * Proc traversal interface for kvm. ps and w are (probably) the exclusive Modified: head/lib/libkvm/kvm_sparc64.c ============================================================================== --- head/lib/libkvm/kvm_sparc64.c Tue May 22 15:52:11 2018 (r334052) +++ head/lib/libkvm/kvm_sparc64.c Tue May 22 15:52:22 2018 (r334053) @@ -37,12 +37,7 @@ #include __FBSDID("$FreeBSD$"); - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"; -#endif -#endif /* LIBC_SCCS and not lint */ +__SCCSID("@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"); /* * sparc64 machine dependent routines for kvm. From owner-svn-src-head@freebsd.org Tue May 22 15:53:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1664BEFAAB2; Tue, 22 May 2018 15:53:00 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id AF46D7C81B; Tue, 22 May 2018 15:52:59 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from [IPv6:2001:630:212:2a8:2860:ce38:1891:503c] (unknown [IPv6:2001:630:212:2a8:2860:ce38:1891:503c]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 2662F4E795; Tue, 22 May 2018 15:52:51 +0000 (UTC) From: Andrew Turner Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: svn commit: r334052 - head/sys/arm64/arm64 Date: Tue, 22 May 2018 16:52:49 +0100 References: <201805221552.w4MFqBdK081239@repo.freebsd.org> To: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201805221552.w4MFqBdK081239@repo.freebsd.org> Message-Id: X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:53:00 -0000 > On 22 May 2018, at 16:52, Andrew Turner wrote: > > Author: andrew > Date: Tue May 22 15:52:11 2018 > New Revision: 334052 > URL: https://svnweb.freebsd.org/changeset/base/334052 > > Log: > Revert r334035 for now. It breaks the boot on some boards as er expect to > be able to read UEFI RuntimeData memory via the DMAP region. Reported by: tuexen Andrew From owner-svn-src-head@freebsd.org Tue May 22 15:54:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25390EFABAF; Tue, 22 May 2018 15:54:27 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C66F57CB0D; Tue, 22 May 2018 15:54:26 +0000 (UTC) (envelope-from fabient@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A752F16258; Tue, 22 May 2018 15:54:26 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MFsQof083339; Tue, 22 May 2018 15:54:26 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MFsPQA083334; Tue, 22 May 2018 15:54:25 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201805221554.w4MFsPQA083334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Tue, 22 May 2018 15:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat X-SVN-Group: head X-SVN-Commit-Author: fabient X-SVN-Commit-Paths: in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat X-SVN-Commit-Revision: 334054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:54:27 -0000 Author: fabient Date: Tue May 22 15:54:25 2018 New Revision: 334054 URL: https://svnweb.freebsd.org/changeset/base/334054 Log: Add a SPD cache to speed up lookups. When large SPDs are used, we face two problems: - too many CPU cycles are spent during the linear searches in the SPD for each packet - too much contention on multi socket systems, since we use a single shared lock. Main changes: - added the sysctl tree 'net.key.spdcache' to control the SPD cache (disabled by default). - cache the sp indexes that are used to perform SP lookups. - use a range of dedicated mutexes to protect the cache lines. Submitted by: Emeric Poupon Reviewed by: ae Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D15050 Modified: head/sys/kern/uipc_mbuf.c head/sys/netipsec/ipsec.h head/sys/netipsec/key.c head/tools/tools/crypto/ipsecstats.c head/usr.bin/netstat/ipsec.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Tue May 22 15:52:22 2018 (r334053) +++ head/sys/kern/uipc_mbuf.c Tue May 22 15:54:25 2018 (r334054) @@ -1633,9 +1633,6 @@ m_unshare(struct mbuf *m0, int how) mprev->m_len += m->m_len; mprev->m_next = m->m_next; /* unlink from chain */ m_free(m); /* reclaim mbuf */ -#if 0 - newipsecstat.ips_mbcoalesced++; -#endif } else { mprev = m; } @@ -1665,9 +1662,6 @@ m_unshare(struct mbuf *m0, int how) mprev->m_len += m->m_len; mprev->m_next = m->m_next; /* unlink from chain */ m_free(m); /* reclaim mbuf */ -#if 0 - newipsecstat.ips_clcoalesced++; -#endif continue; } Modified: head/sys/netipsec/ipsec.h ============================================================================== --- head/sys/netipsec/ipsec.h Tue May 22 15:52:22 2018 (r334053) +++ head/sys/netipsec/ipsec.h Tue May 22 15:54:25 2018 (r334054) @@ -219,8 +219,9 @@ struct ipsecstat { uint64_t ips_out_inval; /* output: generic error */ uint64_t ips_out_bundlesa; /* output: bundled SA processed */ - uint64_t ips_mbcoalesced; /* mbufs coalesced during clone */ - uint64_t ips_clcoalesced; /* clusters coalesced during clone */ + uint64_t ips_spdcache_hits; /* SPD cache hits */ + uint64_t ips_spdcache_misses; /* SPD cache misses */ + uint64_t ips_clcopied; /* clusters copied during clone */ uint64_t ips_mbinserted; /* mbufs inserted during makespace */ /* Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Tue May 22 15:52:22 2018 (r334053) +++ head/sys/netipsec/key.c Tue May 22 15:54:25 2018 (r334054) @@ -173,6 +173,48 @@ static VNET_DEFINE(u_long, sphash_mask); #define SPHASH_HASHVAL(id) (key_u32hash(id) & V_sphash_mask) #define SPHASH_HASH(id) &V_sphashtbl[SPHASH_HASHVAL(id)] +/* SPD cache */ +struct spdcache_entry { + struct secpolicyindex spidx; /* secpolicyindex */ + struct secpolicy *sp; /* cached policy to be used */ + + LIST_ENTRY(spdcache_entry) chain; +}; +LIST_HEAD(spdcache_entry_list, spdcache_entry); + +#define SPDCACHE_MAX_ENTRIES_PER_HASH 8 + +static VNET_DEFINE(u_int, key_spdcache_maxentries) = 0; +#define V_key_spdcache_maxentries VNET(key_spdcache_maxentries) +static VNET_DEFINE(u_int, key_spdcache_threshold) = 32; +#define V_key_spdcache_threshold VNET(key_spdcache_threshold) +static VNET_DEFINE(unsigned long, spd_size) = 0; +#define V_spd_size VNET(spd_size) + +#define SPDCACHE_ENABLED() (V_key_spdcache_maxentries != 0) +#define SPDCACHE_ACTIVE() \ + (SPDCACHE_ENABLED() && V_spd_size >= V_key_spdcache_threshold) + +static VNET_DEFINE(struct spdcache_entry_list *, spdcachehashtbl); +static VNET_DEFINE(u_long, spdcachehash_mask); +#define V_spdcachehashtbl VNET(spdcachehashtbl) +#define V_spdcachehash_mask VNET(spdcachehash_mask) + +#define SPDCACHE_HASHVAL(idx) \ + (key_addrprotohash(&(idx)->src, &(idx)->dst, &(idx)->ul_proto) & \ + V_spdcachehash_mask) + +/* Each cache line is protected by a mutex */ +static VNET_DEFINE(struct mtx *, spdcache_lock); +#define V_spdcache_lock VNET(spdcache_lock) + +#define SPDCACHE_LOCK_INIT(a) \ + mtx_init(&V_spdcache_lock[a], "spdcache", \ + "fast ipsec SPD cache", MTX_DEF|MTX_DUPOK) +#define SPDCACHE_LOCK_DESTROY(a) mtx_destroy(&V_spdcache_lock[a]) +#define SPDCACHE_LOCK(a) mtx_lock(&V_spdcache_lock[a]); +#define SPDCACHE_UNLOCK(a) mtx_unlock(&V_spdcache_lock[a]); + /* SAD */ TAILQ_HEAD(secashead_queue, secashead); LIST_HEAD(secashead_list, secashead); @@ -198,8 +240,9 @@ static VNET_DEFINE(u_long, sahaddrhash_mask); #define SAHHASH_NHASH_LOG2 7 #define SAHHASH_NHASH (1 << SAHHASH_NHASH_LOG2) -#define SAHADDRHASH_HASHVAL(saidx) \ - (key_saidxhash(saidx) & V_sahaddrhash_mask) +#define SAHADDRHASH_HASHVAL(idx) \ + (key_addrprotohash(&(idx)->src, &(idx)->dst, &(idx)->proto) & \ + V_sahaddrhash_mask) #define SAHADDRHASH_HASH(saidx) \ &V_sahaddrhashtbl[SAHADDRHASH_HASHVAL(saidx)] @@ -215,33 +258,34 @@ static VNET_DEFINE(u_long, savhash_mask); #define SAVHASH_HASH(spi) &V_savhashtbl[SAVHASH_HASHVAL(spi)] static uint32_t -key_saidxhash(const struct secasindex *saidx) +key_addrprotohash(const union sockaddr_union *src, + const union sockaddr_union *dst, const uint8_t *proto) { uint32_t hval; - hval = fnv_32_buf(&saidx->proto, sizeof(saidx->proto), + hval = fnv_32_buf(proto, sizeof(*proto), FNV1_32_INIT); - switch (saidx->dst.sa.sa_family) { + switch (dst->sa.sa_family) { #ifdef INET case AF_INET: - hval = fnv_32_buf(&saidx->src.sin.sin_addr, + hval = fnv_32_buf(&src->sin.sin_addr, sizeof(in_addr_t), hval); - hval = fnv_32_buf(&saidx->dst.sin.sin_addr, + hval = fnv_32_buf(&dst->sin.sin_addr, sizeof(in_addr_t), hval); break; #endif #ifdef INET6 case AF_INET6: - hval = fnv_32_buf(&saidx->src.sin6.sin6_addr, + hval = fnv_32_buf(&src->sin6.sin6_addr, sizeof(struct in6_addr), hval); - hval = fnv_32_buf(&saidx->dst.sin6.sin6_addr, + hval = fnv_32_buf(&dst->sin6.sin6_addr, sizeof(struct in6_addr), hval); break; #endif default: hval = 0; ipseclog((LOG_DEBUG, "%s: unknown address family %d", - __func__, saidx->dst.sa.sa_family)); + __func__, dst->sa.sa_family)); } return (hval); } @@ -290,8 +334,9 @@ static VNET_DEFINE(u_long, acqseqhash_mask); #define ACQHASH_NHASH_LOG2 7 #define ACQHASH_NHASH (1 << ACQHASH_NHASH_LOG2) -#define ACQADDRHASH_HASHVAL(saidx) \ - (key_saidxhash(saidx) & V_acqaddrhash_mask) +#define ACQADDRHASH_HASHVAL(idx) \ + (key_addrprotohash(&(idx)->src, &(idx)->dst, &(idx)->proto) & \ + V_acqaddrhash_mask) #define ACQSEQHASH_HASHVAL(seq) \ (key_u32hash(seq) & V_acqseqhash_mask) #define ACQADDRHASH_HASH(saidx) \ @@ -463,6 +508,17 @@ SYSCTL_INT(_net_key, KEYCTL_AH_KEYMIN, ah_keymin, SYSCTL_INT(_net_key, KEYCTL_PREFERED_OLDSA, preferred_oldsa, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(key_preferred_oldsa), 0, ""); +static SYSCTL_NODE(_net_key, OID_AUTO, spdcache, CTLFLAG_RW, 0, "SPD cache"); + +SYSCTL_UINT(_net_key_spdcache, OID_AUTO, maxentries, + CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(key_spdcache_maxentries), 0, + "Maximum number of entries in the SPD cache" + " (power of 2, 0 to disable)"); + +SYSCTL_UINT(_net_key_spdcache, OID_AUTO, threshold, + CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(key_spdcache_threshold), 0, + "Number of SPs that make the SPD cache active"); + #define __LIST_CHAINED(elm) \ (!((elm)->chain.le_next == NULL && (elm)->chain.le_prev == NULL)) @@ -473,6 +529,7 @@ MALLOC_DEFINE(M_IPSEC_SR, "ipsecrequest", "ipsec secur MALLOC_DEFINE(M_IPSEC_MISC, "ipsec-misc", "ipsec miscellaneous"); MALLOC_DEFINE(M_IPSEC_SAQ, "ipsec-saq", "ipsec sa acquire"); MALLOC_DEFINE(M_IPSEC_SAR, "ipsec-reg", "ipsec sa acquire"); +MALLOC_DEFINE(M_IPSEC_SPDCACHE, "ipsec-spdcache", "ipsec SPD cache"); static VNET_DEFINE(uma_zone_t, key_lft_zone); #define V_key_lft_zone VNET(key_lft_zone) @@ -574,6 +631,7 @@ static struct callout key_timer; #endif static void key_unlink(struct secpolicy *); +static struct secpolicy *key_do_allocsp(struct secpolicyindex *spidx, u_int dir); static struct secpolicy *key_getsp(struct secpolicyindex *); static struct secpolicy *key_getspbyid(u_int32_t); static struct mbuf *key_gather_mbuf(struct mbuf *, @@ -694,6 +752,15 @@ static struct mbuf *key_setlifetime(struct seclifetime static struct mbuf *key_setkey(struct seckey *, uint16_t); static int xform_init(struct secasvar *, u_short); +static void spdcache_init(void); +static void spdcache_clear(void); +static struct spdcache_entry *spdcache_entry_alloc( + const struct secpolicyindex *spidx, + struct secpolicy *policy); +static void spdcache_entry_free(struct spdcache_entry *entry); +static void spdcache_destroy(void); + + #define DBG_IPSEC_INITREF(t, p) do { \ refcount_init(&(p)->refcnt, 1); \ KEYDBG(KEY_STAMP, \ @@ -799,14 +866,8 @@ key_checksockaddrs(struct sockaddr *src, struct sockad return (0); } -/* - * allocating a SP for OUTBOUND or INBOUND packet. - * Must call key_freesp() later. - * OUT: NULL: not found - * others: found and return the pointer. - */ struct secpolicy * -key_allocsp(struct secpolicyindex *spidx, u_int dir) +key_do_allocsp(struct secpolicyindex *spidx, u_int dir) { SPTREE_RLOCK_TRACKER; struct secpolicy *sp; @@ -823,7 +884,73 @@ key_allocsp(struct secpolicyindex *spidx, u_int dir) } } SPTREE_RUNLOCK(); + return (sp); +} + +/* + * allocating a SP for OUTBOUND or INBOUND packet. + * Must call key_freesp() later. + * OUT: NULL: not found + * others: found and return the pointer. + */ +struct secpolicy * +key_allocsp(struct secpolicyindex *spidx, u_int dir) +{ + struct spdcache_entry *entry, *lastentry, *tmpentry; + struct secpolicy *sp; + uint32_t hashv; + int nb_entries; + + if (!SPDCACHE_ACTIVE()) { + sp = key_do_allocsp(spidx, dir); + goto out; + } + + hashv = SPDCACHE_HASHVAL(spidx); + SPDCACHE_LOCK(hashv); + nb_entries = 0; + LIST_FOREACH_SAFE(entry, &V_spdcachehashtbl[hashv], chain, tmpentry) { + /* Removed outdated entries */ + if (entry->sp != NULL && + entry->sp->state == IPSEC_SPSTATE_DEAD) { + LIST_REMOVE(entry, chain); + spdcache_entry_free(entry); + continue; + } + + nb_entries++; + if (!key_cmpspidx_exactly(&entry->spidx, spidx)) { + lastentry = entry; + continue; + } + + sp = entry->sp; + if (entry->sp != NULL) + SP_ADDREF(sp); + + IPSECSTAT_INC(ips_spdcache_hits); + + SPDCACHE_UNLOCK(hashv); + goto out; + } + + IPSECSTAT_INC(ips_spdcache_misses); + + sp = key_do_allocsp(spidx, dir); + entry = spdcache_entry_alloc(spidx, sp); + if (entry != NULL) { + if (nb_entries >= SPDCACHE_MAX_ENTRIES_PER_HASH) { + LIST_REMOVE(lastentry, chain); + spdcache_entry_free(lastentry); + } + + LIST_INSERT_HEAD(&V_spdcachehashtbl[hashv], entry, chain); + } + + SPDCACHE_UNLOCK(hashv); + +out: if (sp != NULL) { /* found a SPD entry */ sp->lastused = time_second; KEYDBG(IPSEC_STAMP, @@ -1107,9 +1234,12 @@ key_unlink(struct secpolicy *sp) } sp->state = IPSEC_SPSTATE_DEAD; TAILQ_REMOVE(&V_sptree[sp->spidx.dir], sp, chain); + V_spd_size--; LIST_REMOVE(sp, idhash); V_sp_genid++; SPTREE_WUNLOCK(); + if (SPDCACHE_ENABLED()) + spdcache_clear(); key_freesp(&sp); } @@ -1132,6 +1262,7 @@ key_insertsp(struct secpolicy *newsp) done: LIST_INSERT_HEAD(SPHASH_HASH(newsp->id), newsp, idhash); newsp->state = IPSEC_SPSTATE_ALIVE; + V_spd_size++; V_sp_genid++; } @@ -1207,9 +1338,12 @@ key_unregister_ifnet(struct secpolicy **spp, u_int cou spp[i]->state = IPSEC_SPSTATE_DEAD; TAILQ_REMOVE(&V_sptree_ifnet[spp[i]->spidx.dir], spp[i], chain); + V_spd_size--; LIST_REMOVE(spp[i], idhash); } SPTREE_WUNLOCK(); + if (SPDCACHE_ENABLED()) + spdcache_clear(); for (i = 0; i < count; i++) { m = key_setdumpsp(spp[i], SADB_X_SPDDELETE, 0, 0); @@ -1939,6 +2073,8 @@ key_spdadd(struct socket *so, struct mbuf *m, const st } key_insertsp(newsp); SPTREE_WUNLOCK(); + if (SPDCACHE_ENABLED()) + spdcache_clear(); KEYDBG(KEY_STAMP, printf("%s: SP(%p)\n", __func__, newsp)); @@ -2393,7 +2529,10 @@ key_spdflush(struct socket *so, struct mbuf *m, const LIST_REMOVE(sp, idhash); } V_sp_genid++; + V_spd_size = 0; SPTREE_WUNLOCK(); + if (SPDCACHE_ENABLED()) + spdcache_clear(); sp = TAILQ_FIRST(&drainq); while (sp != NULL) { nextsp = TAILQ_NEXT(sp, chain); @@ -4070,7 +4209,8 @@ key_cmpspidx_exactly(struct secpolicyindex *spidx0, if (spidx0->prefs != spidx1->prefs || spidx0->prefd != spidx1->prefd - || spidx0->ul_proto != spidx1->ul_proto) + || spidx0->ul_proto != spidx1->ul_proto + || spidx0->dir != spidx1->dir) return 0; return key_sockaddrcmp(&spidx0->src.sa, &spidx1->src.sa, 1) == 0 && @@ -4338,12 +4478,15 @@ key_flush_spd(time_t now) continue; } TAILQ_REMOVE(&V_sptree[sp->spidx.dir], sp, chain); + V_spd_size--; LIST_REMOVE(sp, idhash); sp->state = IPSEC_SPSTATE_DEAD; sp = nextsp; } V_sp_genid++; SPTREE_WUNLOCK(); + if (SPDCACHE_ENABLED()) + spdcache_clear(); sp = LIST_FIRST(&drainq); while (sp != NULL) { @@ -8067,6 +8210,95 @@ key_validate_ext(const struct sadb_ext *ext, int len) } void +spdcache_init(void) +{ + int i; + + TUNABLE_INT_FETCH("net.key.spdcache.maxentries", + &V_key_spdcache_maxentries); + TUNABLE_INT_FETCH("net.key.spdcache.threshold", + &V_key_spdcache_threshold); + + if (V_key_spdcache_maxentries) { + V_key_spdcache_maxentries = MAX(V_key_spdcache_maxentries, + SPDCACHE_MAX_ENTRIES_PER_HASH); + V_spdcachehashtbl = hashinit(V_key_spdcache_maxentries / + SPDCACHE_MAX_ENTRIES_PER_HASH, + M_IPSEC_SPDCACHE, &V_spdcachehash_mask); + V_key_spdcache_maxentries = (V_spdcachehash_mask + 1) + * SPDCACHE_MAX_ENTRIES_PER_HASH; + + V_spdcache_lock = malloc(sizeof(struct mtx) * + (V_spdcachehash_mask + 1), + M_IPSEC_SPDCACHE, M_WAITOK|M_ZERO); + + for (i = 0; i < V_spdcachehash_mask + 1; ++i) + SPDCACHE_LOCK_INIT(i); + } +} + +struct spdcache_entry * +spdcache_entry_alloc(const struct secpolicyindex *spidx, struct secpolicy *sp) +{ + struct spdcache_entry *entry; + + entry = malloc(sizeof(struct spdcache_entry), + M_IPSEC_SPDCACHE, M_NOWAIT|M_ZERO); + if (entry == NULL) + return NULL; + + if (sp != NULL) + SP_ADDREF(sp); + + entry->spidx = *spidx; + entry->sp = sp; + + return (entry); +} + +void +spdcache_entry_free(struct spdcache_entry *entry) +{ + + if (entry->sp != NULL) + key_freesp(&entry->sp); + free(entry, M_IPSEC_SPDCACHE); +} + +void +spdcache_clear(void) +{ + struct spdcache_entry *entry; + int i; + + for (i = 0; i < V_spdcachehash_mask + 1; ++i) { + SPDCACHE_LOCK(i); + while (!LIST_EMPTY(&V_spdcachehashtbl[i])) { + entry = LIST_FIRST(&V_spdcachehashtbl[i]); + LIST_REMOVE(entry, chain); + spdcache_entry_free(entry); + } + SPDCACHE_UNLOCK(i); + } +} + +void +spdcache_destroy(void) +{ + int i; + + if (SPDCACHE_ENABLED()) { + spdcache_clear(); + hashdestroy(V_spdcachehashtbl, M_IPSEC_SPDCACHE, V_spdcachehash_mask); + + for (i = 0; i < V_spdcachehash_mask + 1; ++i) + SPDCACHE_LOCK_DESTROY(i); + + free(V_spdcache_lock, M_IPSEC_SPDCACHE); + } +} + +void key_init(void) { int i; @@ -8090,6 +8322,8 @@ key_init(void) V_acqseqhashtbl = hashinit(ACQHASH_NHASH, M_IPSEC_SAQ, &V_acqseqhash_mask); + spdcache_init(); + for (i = 0; i <= SADB_SATYPE_MAX; i++) LIST_INIT(&V_regtree[i]); @@ -8145,6 +8379,7 @@ key_destroy(void) for (i = 0; i < V_sphash_mask + 1; i++) LIST_INIT(&V_sphashtbl[i]); SPTREE_WUNLOCK(); + spdcache_destroy(); sp = TAILQ_FIRST(&drainq); while (sp != NULL) { Modified: head/tools/tools/crypto/ipsecstats.c ============================================================================== --- head/tools/tools/crypto/ipsecstats.c Tue May 22 15:52:22 2018 (r334053) +++ head/tools/tools/crypto/ipsecstats.c Tue May 22 15:54:25 2018 (r334054) @@ -171,9 +171,9 @@ main(int argc, char *argv[]) STAT(ips.ips_out_noroute, "no route available %ju (output)"); STAT(ips.ips_out_inval, "generic error %ju (output)"); STAT(ips.ips_out_bundlesa, "bundled SA processed %ju (output)"); - printf("m_clone processing: %ju mbufs + %ju clusters coalesced\n", - (uintmax_t)ips.ips_mbcoalesced, (uintmax_t)ips.ips_clcoalesced); STAT(ips.ips_clcopied, "m_clone processing: %ju clusters copied\n"); + STAT(ips.ips_spdcache_hits, "spd cache hits %ju\n"); + STAT(ips.ips_spdcache_misses, "spd cache misses %ju\n"); STAT(ips.ips_mbinserted, "m_makespace: %ju mbufs inserted\n"); printf("header position [front/middle/end]: %ju/%ju/%ju\n", (uintmax_t)ips.ips_input_front, (uintmax_t)ips.ips_input_middle, Modified: head/usr.bin/netstat/ipsec.c ============================================================================== --- head/usr.bin/netstat/ipsec.c Tue May 22 15:52:22 2018 (r334053) +++ head/usr.bin/netstat/ipsec.c Tue May 22 15:54:25 2018 (r334054) @@ -191,6 +191,8 @@ print_ipsecstats(const struct ipsecstat *ipsecstat) #define p(f, m) if (ipsecstat->f || sflag <= 1) \ xo_emit(m, (uintmax_t)ipsecstat->f, plural(ipsecstat->f)) +#define p2(f, m) if (ipsecstat->f || sflag <= 1) \ + xo_emit(m, (uintmax_t)ipsecstat->f, plurales(ipsecstat->f)) p(ips_in_polvio, "\t{:dropped-policy-violation/%ju} " "{N:/inbound packet%s violated process security policy}\n"); @@ -210,14 +212,15 @@ print_ipsecstats(const struct ipsecstat *ipsecstat) "{N:/invalid outbound packet%s}\n"); p(ips_out_bundlesa, "\t{:send-bundled-sa/%ju} " "{N:/outbound packet%s with bundled SAs}\n"); - p(ips_mbcoalesced, "\t{:mbufs-coalesced-during-clone/%ju} " - "{N:/mbuf%s coalesced during clone}\n"); - p(ips_clcoalesced, "\t{:clusters-coalesced-during-clone/%ju} " - "{N:/cluster%s coalesced during clone}\n"); + p(ips_spdcache_hits, "\t{:spdcache-hits/%ju} " + "{N:/spd cache hit%s}\n"); + p2(ips_spdcache_misses, "\t{:spdcache-misses/%ju} " + "{N:/spd cache miss%s}\n"); p(ips_clcopied, "\t{:clusters-copied-during-clone/%ju} " "{N:/cluster%s copied during clone}\n"); p(ips_mbinserted, "\t{:mbufs-inserted/%ju} " "{N:/mbuf%s inserted during makespace}\n"); +#undef p2 #undef p xo_close_container("ipsec-statistics"); } From owner-svn-src-head@freebsd.org Tue May 22 15:58:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2F3DEFADF6; Tue, 22 May 2018 15:58:07 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52F147CEB1; Tue, 22 May 2018 15:58:07 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.4] (c-73-241-240-124.hsd1.ca.comcast.net [73.241.240.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id A00DA1FF34; Tue, 22 May 2018 15:58:06 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.d.0.180513 Date: Tue, 22 May 2018 08:58:03 -0700 Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat From: Ravi Pokala To: Fabien Thomas , , , Message-ID: <61D4DC85-A38C-44B5-BCE1-74A978A05E84@panasas.com> Thread-Topic: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat References: <201805221554.w4MFsPQA083334@repo.freebsd.org> In-Reply-To: <201805221554.w4MFsPQA083334@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 15:58:07 -0000 -----Original Message----- From: on behalf of Fabien Thomas Date: 2018-05-22, Tuesday at 08:54 To: , , Subject: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat > Author: fabient > Date: Tue May 22 15:54:25 2018 > New Revision: 334054 > URL: https://svnweb.freebsd.org/changeset/base/334054 > > Log: > Add a SPD cache to speed up lookups. What does "SPD" expand to in this context? I usually hack on platform stuff, and "Serial Presence Detect" doesn't seem applicable to this change. :-) Thanks, Ravi (rpokala@) From owner-svn-src-head@freebsd.org Tue May 22 16:01:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72D98EFB01B; Tue, 22 May 2018 16:01:16 +0000 (UTC) (envelope-from fabien.thomas@stormshield.eu) Received: from work.stormshield.eu (gwlille.netasq.com [91.212.116.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 28AB47D1E9; Tue, 22 May 2018 16:01:15 +0000 (UTC) (envelope-from fabien.thomas@stormshield.eu) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTPS id CBCE83761E47; Tue, 22 May 2018 18:00:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id BD48B3761CDF; Tue, 22 May 2018 18:00:57 +0200 (CEST) Received: from work.stormshield.eu ([127.0.0.1]) by localhost (work.stormshield.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qSG6WzHJTevW; Tue, 22 May 2018 18:00:57 +0200 (CEST) Received: from deadbeef.local.mail (support1.stormshield.eu [91.212.116.2]) by work.stormshield.eu (Postfix) with ESMTPSA id A2A1E3761B4B; Tue, 22 May 2018 18:00:57 +0200 (CEST) Date: Tue, 22 May 2018 18:00:52 +0200 From: Fabien Thomas To: Fabien Thomas , svn-src-all@freebsd.org, Ravi Pokala , src-committers@freebsd.org, svn-src-head@freebsd.org Message-ID: In-Reply-To: <61D4DC85-A38C-44B5-BCE1-74A978A05E84@panasas.com> References: <201805221554.w4MFsPQA083334@repo.freebsd.org> <61D4DC85-A38C-44B5-BCE1-74A978A05E84@panasas.com> Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat X-Mailer: Airmail (481) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 16:01:16 -0000 Le 22 mai 2018 =C3=A0 17:58:10, Ravi Pokala (rpokala=40freebsd.org) a =C3= =A9crit: -----Original Message-----=C2=A0 =46rom: on behalf of =46abien Thomas= =C2=A0 Date: 2018-05-22, Tuesday at 08:54=C2=A0 To: , , =C2=A0 Subject: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools= /crypto usr.bin/netstat=C2=A0 > Author: fabient=C2=A0 > Date: Tue May 22 15:54:25 2018=C2=A0 > New Revision: 334054=C2=A0 > URL: https://svnweb.freebsd.org/changeset/base/334054=C2=A0 >=C2=A0 > Log:=C2=A0 > Add a SPD cache to speed up lookups.=C2=A0 What does =22SPD=22 expand to in this context=3F I usually hack on platfo= rm stuff, and =22Serial Presence Detect=22 doesn't seem applicable to thi= s change. :-)=C2=A0 Yes, that was not obvious after reading the comment again. :) SPD is related to IPsec so Security Policy Database. Thanks,=C2=A0 Ravi (rpokala=40)=C2=A0 From owner-svn-src-head@freebsd.org Tue May 22 16:01:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91B49EFB087; Tue, 22 May 2018 16:01:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FEDA7D3AB; Tue, 22 May 2018 16:01:57 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 222DA163E0; Tue, 22 May 2018 16:01:57 +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 w4MG1usW085138; Tue, 22 May 2018 16:01:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MG1ufx085137; Tue, 22 May 2018 16:01:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805221601.w4MG1ufx085137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 May 2018 16:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334055 - head/sys/netinet/netdump X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/netinet/netdump X-SVN-Commit-Revision: 334055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 16:01:57 -0000 Author: markj Date: Tue May 22 16:01:56 2018 New Revision: 334055 URL: https://svnweb.freebsd.org/changeset/base/334055 Log: Initialize the dumper struct before calling set_dumper(). Fields owned by the generic code were being left uninitialized, causing problems in clear_dumper() if an error occurred. Coverity CID: 1391200 X-MFC with: r333283 Modified: head/sys/netinet/netdump/netdump_client.c Modified: head/sys/netinet/netdump/netdump_client.c ============================================================================== --- head/sys/netinet/netdump/netdump_client.c Tue May 22 15:54:25 2018 (r334054) +++ head/sys/netinet/netdump/netdump_client.c Tue May 22 16:01:56 2018 (r334055) @@ -1204,6 +1204,7 @@ netdump_ioctl(struct cdev *dev __unused, u_long cmd, c } } + memset(&dumper, 0, sizeof(dumper)); dumper.dumper_start = netdump_start; dumper.dumper_hdr = netdump_write_headers; dumper.dumper = netdump_dumper; From owner-svn-src-head@freebsd.org Tue May 22 16:03:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB843EFB2A3; Tue, 22 May 2018 16:03:42 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62C2D7D6CD; Tue, 22 May 2018 16:03:42 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 424B71640E; Tue, 22 May 2018 16:03:42 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MG3gSt088223; Tue, 22 May 2018 16:03:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MG3fPd088222; Tue, 22 May 2018 16:03:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805221603.w4MG3fPd088222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 May 2018 16:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334056 - head/sys/dev/fdt X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/dev/fdt X-SVN-Commit-Revision: 334056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 16:03:43 -0000 Author: andrew Date: Tue May 22 16:03:41 2018 New Revision: 334056 URL: https://svnweb.freebsd.org/changeset/base/334056 Log: Handle reserved memory with the no-map property. We shouldn't be mapping this memory, so we need to find it so it can be excluded from the phys_avail map. Reviewed by: manu Obtained from: ABT Systems Ltd Sponsored by: Turing Robotic Industries Differential Revision: https://reviews.freebsd.org/D15518 Modified: head/sys/dev/fdt/fdt_common.c head/sys/dev/fdt/fdt_common.h Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Tue May 22 16:01:56 2018 (r334055) +++ head/sys/dev/fdt/fdt_common.c Tue May 22 16:03:41 2018 (r334056) @@ -500,6 +500,47 @@ out: } int +fdt_get_reserved_mem(struct mem_region *reserved, int *mreserved) +{ + pcell_t reg[FDT_REG_CELLS]; + phandle_t child, root; + int addr_cells, size_cells; + int i, rv; + + root = OF_finddevice("/reserved-memory"); + if (root == -1) { + return (ENXIO); + } + + if ((rv = fdt_addrsize_cells(root, &addr_cells, &size_cells)) != 0) + return (rv); + + if (addr_cells + size_cells > FDT_REG_CELLS) + panic("Too many address and size cells %d %d", addr_cells, + size_cells); + + i = 0; + for (child = OF_child(root); child != 0; child = OF_peer(child)) { + if (!OF_hasprop(child, "no-map")) + continue; + + rv = OF_getprop(child, "reg", reg, sizeof(reg)); + if (rv <= 0) + /* XXX: Does a no-map of a dynamic range make sense? */ + continue; + + fdt_data_to_res(reg, addr_cells, size_cells, + (u_long *)&reserved[i].mr_start, + (u_long *)&reserved[i].mr_size); + i++; + } + + *mreserved = i; + + return (0); +} + +int fdt_get_mem_regions(struct mem_region *mr, int *mrcnt, uint64_t *memsize) { pcell_t reg[FDT_REG_CELLS * FDT_MEM_REGIONS]; Modified: head/sys/dev/fdt/fdt_common.h ============================================================================== --- head/sys/dev/fdt/fdt_common.h Tue May 22 16:01:56 2018 (r334055) +++ head/sys/dev/fdt/fdt_common.h Tue May 22 16:03:41 2018 (r334056) @@ -85,6 +85,7 @@ int fdt_data_to_res(pcell_t *, int, int, u_long *, u_l phandle_t fdt_find_compatible(phandle_t, const char *, int); phandle_t fdt_depth_search_compatible(phandle_t, const char *, int); int fdt_get_mem_regions(struct mem_region *, int *, uint64_t *); +int fdt_get_reserved_mem(struct mem_region *, int *); int fdt_get_reserved_regions(struct mem_region *, int *); int fdt_get_phyaddr(phandle_t, device_t, int *, void **); int fdt_get_range(phandle_t, int, u_long *, u_long *); From owner-svn-src-head@freebsd.org Tue May 22 16:19:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D4CAEFB6CE; Tue, 22 May 2018 16:19:16 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE89A7DE3E; Tue, 22 May 2018 16:19:15 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.4] (c-73-241-240-124.hsd1.ca.comcast.net [73.241.240.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id F22D32013D; Tue, 22 May 2018 16:19:14 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.d.0.180513 Date: Tue, 22 May 2018 09:19:12 -0700 Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat From: Ravi Pokala To: Fabien Thomas , Fabien Thomas , , Ravi Pokala , , Message-ID: <7C542BE0-F310-4356-ABD9-34768C3AC889@panasas.com> Thread-Topic: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat References: <201805221554.w4MFsPQA083334@repo.freebsd.org> <61D4DC85-A38C-44B5-BCE1-74A978A05E84@panasas.com> In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 16:19:16 -0000 -----Original Message----- From: Fabien Thomas Date: 2018-05-22, Tuesday at 09:00 To: Fabien Thomas , , Ravi Po= kala , , Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/too= ls/crypto usr.bin/netstat =20 > Le 22 mai 2018 =C3=A0 17:58:10, Ravi Pokala (rpokala@freebsd.org) a =C3=A9crit: >=20 >> -----Original Message-----=20 >> From: on behalf of Fabien Thomas =20 >> Date: 2018-05-22, Tuesday at 08:54=20 >> To: , , =20 >> Subject: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tool= s/crypto usr.bin/netstat=20 >>=20 >>> Author: fabient=20 >>> Date: Tue May 22 15:54:25 2018=20 >>> New Revision: 334054=20 >>> URL: https://svnweb.freebsd.org/changeset/base/334054=20 >>>=20 >>> Log:=20 >>> Add a SPD cache to speed up lookups.=20 >>=20 >> What does "SPD" expand to in this context? I usually hack on platform st= uff, and "Serial Presence Detect" doesn't seem applicable to this change. :-= )=20 >=20 > Yes, that was not obvious after reading the comment again. :) > SPD is related to IPsec so Security Policy Database. Thank you! Ravi (rpokala@) From owner-svn-src-head@freebsd.org Tue May 22 16:19:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6907DEFB71B; Tue, 22 May 2018 16:19:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A75D7DF84; Tue, 22 May 2018 16:19:49 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFB67165B5; Tue, 22 May 2018 16:19:48 +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 w4MGJm7e093284; Tue, 22 May 2018 16:19:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MGJmlE093283; Tue, 22 May 2018 16:19:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805221619.w4MGJmlE093283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 May 2018 16:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334057 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 334057 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 16:19:49 -0000 Author: markj Date: Tue May 22 16:19:48 2018 New Revision: 334057 URL: https://svnweb.freebsd.org/changeset/base/334057 Log: Ensure that "m" is initialized in vm_page_alloc_freelist_domain(). While here, remove a superfluous comment. Coverity CID: 1383559 MFC after: 3 days Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue May 22 16:03:41 2018 (r334056) +++ head/sys/vm/vm_page.c Tue May 22 16:19:48 2018 (r334057) @@ -2191,9 +2191,7 @@ vm_page_alloc_freelist_domain(int domain, int freelist vm_page_t m; u_int flags; - /* - * Do not allocate reserved pages unless the req has asked for it. - */ + m = NULL; vmd = VM_DOMAIN(domain); again: if (vm_domain_allocate(vmd, req, 1)) { From owner-svn-src-head@freebsd.org Tue May 22 16:23:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EB7EEFB97B; Tue, 22 May 2018 16:23:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCC4F7E445; Tue, 22 May 2018 16:23:14 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDBFD16743; Tue, 22 May 2018 16:23:14 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MGNE6g098076; Tue, 22 May 2018 16:23:14 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MGNElt098075; Tue, 22 May 2018 16:23:14 GMT (envelope-from np@FreeBSD.org) Message-Id: <201805221623.w4MGNElt098075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 22 May 2018 16:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334058 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 334058 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 16:23:15 -0000 Author: np Date: Tue May 22 16:23:14 2018 New Revision: 334058 URL: https://svnweb.freebsd.org/changeset/base/334058 Log: cxgbe(4): Only valid filters are expected to have a valid tid. Modified: head/sys/dev/cxgbe/t4_filter.c Modified: head/sys/dev/cxgbe/t4_filter.c ============================================================================== --- head/sys/dev/cxgbe/t4_filter.c Tue May 22 16:19:48 2018 (r334057) +++ head/sys/dev/cxgbe/t4_filter.c Tue May 22 16:23:14 2018 (r334058) @@ -316,9 +316,9 @@ get_filter(struct adapter *sc, struct t4_filter *t) mtx_lock(&sc->tids.ftid_lock); f = &sc->tids.ftid_tab[t->idx]; - MPASS(f->tid == sc->tids.ftid_base + t->idx); for (i = t->idx; i < nfilters; i++, f++) { if (f->valid) { + MPASS(f->tid == sc->tids.ftid_base + i); t->idx = i; t->l2tidx = f->l2te ? f->l2te->idx : 0; t->smtidx = f->smtidx; From owner-svn-src-head@freebsd.org Tue May 22 16:32:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35544EFBDAF; Tue, 22 May 2018 16:32:35 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB21B7EB11; Tue, 22 May 2018 16:32:34 +0000 (UTC) (envelope-from kibab@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC33C168EE; Tue, 22 May 2018 16:32:34 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MGWY4N003487; Tue, 22 May 2018 16:32:34 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MGWYBB003486; Tue, 22 May 2018 16:32:34 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201805221632.w4MGWYBB003486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Tue, 22 May 2018 16:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334059 - head/sys/cam/mmc X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: head/sys/cam/mmc X-SVN-Commit-Revision: 334059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 16:32:35 -0000 Author: kibab Date: Tue May 22 16:32:34 2018 New Revision: 334059 URL: https://svnweb.freebsd.org/changeset/base/334059 Log: Fix MMCCAM scanning for new cards. r326645 used an incorrect argument for xpt_path_inq(). Reviewed by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D15521 Modified: head/sys/cam/mmc/mmc_xpt.c Modified: head/sys/cam/mmc/mmc_xpt.c ============================================================================== --- head/sys/cam/mmc/mmc_xpt.c Tue May 22 16:23:14 2018 (r334058) +++ head/sys/cam/mmc/mmc_xpt.c Tue May 22 16:32:34 2018 (r334059) @@ -241,7 +241,7 @@ mmc_scan_lun(struct cam_periph *periph, struct cam_pat CAM_DEBUG(path, CAM_DEBUG_TRACE, ("mmc_scan_lun\n")); - xpt_path_inq(&cpi, periph->path); + xpt_path_inq(&cpi, path); if (cpi.ccb_h.status != CAM_REQ_CMP) { if (request_ccb != NULL) { From owner-svn-src-head@freebsd.org Tue May 22 16:33:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11DDFEFBE28; Tue, 22 May 2018 16:33:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8ABB7EC72; Tue, 22 May 2018 16:33: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99F6E168F5; Tue, 22 May 2018 16:33: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 w4MGX9xT003616; Tue, 22 May 2018 16:33:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MGX9tq003615; Tue, 22 May 2018 16:33:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805221633.w4MGX9tq003615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 22 May 2018 16:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334060 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 334060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 16:33:10 -0000 Author: markj Date: Tue May 22 16:33:09 2018 New Revision: 334060 URL: https://svnweb.freebsd.org/changeset/base/334060 Log: Fix the definition of td_startzero after r333466. Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue May 22 16:32:34 2018 (r334059) +++ head/sys/sys/proc.h Tue May 22 16:33:09 2018 (r334060) @@ -254,8 +254,8 @@ struct thread { u_char td_lend_user_pri; /* (t) Lend user pri. */ /* Cleared during fork1() */ -#define td_startzero td_flags - u_char td_epochnest; /* (k) Private thread epoch nest counter */ +#define td_startzero td_epochnest + u_char td_epochnest; /* (k) Epoch nest counter. */ int td_flags; /* (t) TDF_* flags. */ int td_inhibitors; /* (t) Why can not run. */ int td_pflags; /* (k) Private thread (TDP_*) flags. */ From owner-svn-src-head@freebsd.org Tue May 22 16:45:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70D8AEFC412; Tue, 22 May 2018 16:45:34 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED4007F623; Tue, 22 May 2018 16:45:33 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x242.google.com with SMTP id j42-v6so24225799qtj.12; Tue, 22 May 2018 09:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OSYGZKtH6sAFXACXdZoh9TkuznqldawEKdRlRYROOGM=; b=cD3TFYHPKbuEHRKi7tOAcbZOIVls6WWsjzU9hu2QKQj+bDdh1ho4IRQ9CxVTP8J/Pf CVT/8tqbHLYcRXh07pt2ewqK3ghkeBZIqiHgo5fAj96dn0Bj17sP/4414iZUbnbp1L4r EYbRuQu6VFroDXjoraPLjCD+fzxKDUb+SESaAAt+Rz7d/RQ48cv8/goe5JF12EoOH3RI oUDSU8qQ6mGqi6kTTTIWyCSq8tBlTa8Dtj8QlmSkvBgOZXFxrmPSLXFqSoHg2+h7AvG/ YArD5IAhOF+BK1HxACjYBu7PguF/1YG9CNq4CSlMj6LwRgHXntBynIZsAz8cxjiFfKtC fnsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OSYGZKtH6sAFXACXdZoh9TkuznqldawEKdRlRYROOGM=; b=dhnAaS6/ZYtur9Vc2359QYqtugl7/sj3S9lUtv/r34nunYmxn9GIq5Jt0WqJJ4oWyd Xu5AOww7ILIjt4LCLKCn4TBQVMaYqWmg0lNdS3yfXUEyM+MhKs7hiES+5QkBtTGij5+P 3Zxh0yfjrTvhJJC9FakIQQbRTmQdIDG17g7WaUigWTgh5TlZC+eVW7Tj731sEC+GhW3y TmTRNp2FvNYHvwE2HfFJVpO7SWOIbWQQz1WsWV5wVFbG5ccRNtm8sVBMUlsf++Vrn8MC WAcXzbiqFw0V9ycwzCzBZAMi0icbGFMoEeKHjjoly0op588g3WoWEc7A47CMjkf7RRpN Ewsw== X-Gm-Message-State: ALKqPwcQ+RiyT74kAO+6vhNsORhNBW8BdKJYUr4ppeKALUlr9wZig/RB BcsHpWk8fnwOty/kv7rkVW1+FlZVAHb3+AjwOzU= X-Google-Smtp-Source: AB8JxZrk3KUV6fyHyPkl+qXfrnijm9FixuKNwLJ1KWkMmBLDlq67dFnqhwsdT4BLBFk3UWh3cEA2WMFxcyO4IwkCU90= X-Received: by 2002:ac8:4a2:: with SMTP id s34-v6mr23383695qtg.129.1527007533273; Tue, 22 May 2018 09:45:33 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:1c4a:0:0:0:0:0 with HTTP; Tue, 22 May 2018 09:45:32 -0700 (PDT) In-Reply-To: <201805221554.w4MFsPQA083334@repo.freebsd.org> References: <201805221554.w4MFsPQA083334@repo.freebsd.org> From: Mateusz Guzik Date: Tue, 22 May 2018 18:45:32 +0200 Message-ID: Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat To: Fabien Thomas Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 16:45:34 -0000 On Tue, May 22, 2018 at 5:54 PM, Fabien Thomas wrote: > Author: fabient > Date: Tue May 22 15:54:25 2018 > New Revision: 334054 > URL: https://svnweb.freebsd.org/changeset/base/334054 > > Log: > Add a SPD cache to speed up lookups. > > When large SPDs are used, we face two problems: > > - too many CPU cycles are spent during the linear searches in the SPD > for each packet > - too much contention on multi socket systems, since we use a single > shared lock. > > > void > +spdcache_init(void) > +{ > + int i; > + > + TUNABLE_INT_FETCH("net.key.spdcache.maxentries", > + &V_key_spdcache_maxentries); > + TUNABLE_INT_FETCH("net.key.spdcache.threshold", > + &V_key_spdcache_threshold); > + > + if (V_key_spdcache_maxentries) { > + V_key_spdcache_maxentries = MAX(V_key_spdcache_maxentries, > + SPDCACHE_MAX_ENTRIES_PER_HASH); > + V_spdcachehashtbl = hashinit(V_key_spdcache_maxentries / > + SPDCACHE_MAX_ENTRIES_PER_HASH, > + M_IPSEC_SPDCACHE, &V_spdcachehash_mask); > + V_key_spdcache_maxentries = (V_spdcachehash_mask + 1) > + * SPDCACHE_MAX_ENTRIES_PER_HASH; > + > + V_spdcache_lock = malloc(sizeof(struct mtx) * > + (V_spdcachehash_mask + 1), > + M_IPSEC_SPDCACHE, M_WAITOK|M_ZERO); > + > + for (i = 0; i < V_spdcachehash_mask + 1; ++i) > + SPDCACHE_LOCK_INIT(i); > + } > +} > + > This ends up putting two locks per cacheline and sharing bucket heads across other lines. Unless you got a good reason not to, you should define a struct a which has both the lock and the list. An example of this can be found in kern/kern_lockf.c -- Mateusz Guzik From owner-svn-src-head@freebsd.org Tue May 22 18:38:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19E09EABBD5; Tue, 22 May 2018 18:38:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FFDB84322; Tue, 22 May 2018 18:38:44 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f171.google.com with SMTP id c9-v6so19677338iob.12; Tue, 22 May 2018 11:38:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=5uzd9+Kzc8vX6hkcJ8ZW2m6i77e9DMUfCJWhoVFBhCM=; b=Z6vYBRmVNpt4XCIAUae2yD7jMxYcqj2PJjP0qaHvcuiNwSCR2ZaQxx52Xv/p7kTp+5 F8O2r9uyM7oyy5drUbTCygqEsaHYeFeEibDdtcjpUAzcppgxkBAxguWWwAhJEv9Iq3sH l7eDQ+grTeyS8soRkbGPOKylhIydee/Z0X5CItAcKxtAYsd2gNXpFZxwFk2UBwlAp7g7 afWv8b3MqkQEG7hwQIWsG2N9OVQm2hcMxuGeVinlyuY0ZkOi8IGLcRLfFApFKh5y8egv StJaBUv3lT8XPFMDYnK4r36M/l0pjoFAulvEGGFvjnCmtlX5PoT39FaN6dEI3uvjtTb3 Pq7A== X-Gm-Message-State: ALKqPwfaK751PS1Zps4Za3IEageSzWtj0NqOu7GN1aHylTyOvULKAMbc Ok/Ehvaybu53XE3wX6UMFljHkBtm X-Google-Smtp-Source: AB8JxZq4uzemIxC7n1k/AaSRZmuzkXNZuo2tZGgKWunIMQoKSys+ARAV1S9qN3UKeLn0DyDYB7qIew== X-Received: by 2002:a6b:230f:: with SMTP id j15-v6mr25136724ioj.263.1527008719800; Tue, 22 May 2018 10:05:19 -0700 (PDT) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com. [209.85.223.175]) by smtp.gmail.com with ESMTPSA id v99-v6sm9528271iov.40.2018.05.22.10.05.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 10:05:19 -0700 (PDT) Received: by mail-io0-f175.google.com with SMTP id r9-v6so19348351iod.6; Tue, 22 May 2018 10:05:19 -0700 (PDT) X-Received: by 2002:a6b:b513:: with SMTP id e19-v6mr27084276iof.267.1527008719071; Tue, 22 May 2018 10:05:19 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:9696:0:0:0:0:0 with HTTP; Tue, 22 May 2018 10:05:18 -0700 (PDT) In-Reply-To: <201805221554.w4MFsPQA083334@repo.freebsd.org> References: <201805221554.w4MFsPQA083334@repo.freebsd.org> From: Conrad Meyer Date: Tue, 22 May 2018 10:05:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat To: Fabien Thomas Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 18:38:45 -0000 Can users control arbitrary key_allocsp() calls? If so, it seems concerning to expose hit/miss stats on cached security keys. On Tue, May 22, 2018 at 8:54 AM, Fabien Thomas wrote: > Author: fabient > Date: Tue May 22 15:54:25 2018 > New Revision: 334054 > URL: https://svnweb.freebsd.org/changeset/base/334054 > > Log: > Add a SPD cache to speed up lookups. > > When large SPDs are used, we face two problems: > > - too many CPU cycles are spent during the linear searches in the SPD > for each packet > - too much contention on multi socket systems, since we use a single > shared lock. > > Main changes: > > - added the sysctl tree 'net.key.spdcache' to control the SPD cache > (disabled by default). > - cache the sp indexes that are used to perform SP lookups. > - use a range of dedicated mutexes to protect the cache lines. > > Submitted by: Emeric Poupon > Reviewed by: ae > Sponsored by: Stormshield > Differential Revision: https://reviews.freebsd.org/D15050 > > Modified: > head/sys/kern/uipc_mbuf.c > head/sys/netipsec/ipsec.h > head/sys/netipsec/key.c > head/tools/tools/crypto/ipsecstats.c > head/usr.bin/netstat/ipsec.c > > Modified: head/sys/kern/uipc_mbuf.c > ============================================================================== > --- head/sys/kern/uipc_mbuf.c Tue May 22 15:52:22 2018 (r334053) > +++ head/sys/kern/uipc_mbuf.c Tue May 22 15:54:25 2018 (r334054) > @@ -1633,9 +1633,6 @@ m_unshare(struct mbuf *m0, int how) > mprev->m_len += m->m_len; > mprev->m_next = m->m_next; /* unlink from chain */ > m_free(m); /* reclaim mbuf */ > -#if 0 > - newipsecstat.ips_mbcoalesced++; > -#endif > } else { > mprev = m; > } > @@ -1665,9 +1662,6 @@ m_unshare(struct mbuf *m0, int how) > mprev->m_len += m->m_len; > mprev->m_next = m->m_next; /* unlink from chain */ > m_free(m); /* reclaim mbuf */ > -#if 0 > - newipsecstat.ips_clcoalesced++; > -#endif > continue; > } > > > Modified: head/sys/netipsec/ipsec.h > ============================================================================== > --- head/sys/netipsec/ipsec.h Tue May 22 15:52:22 2018 (r334053) > +++ head/sys/netipsec/ipsec.h Tue May 22 15:54:25 2018 (r334054) > @@ -219,8 +219,9 @@ struct ipsecstat { > uint64_t ips_out_inval; /* output: generic error */ > uint64_t ips_out_bundlesa; /* output: bundled SA processed */ > > - uint64_t ips_mbcoalesced; /* mbufs coalesced during clone */ > - uint64_t ips_clcoalesced; /* clusters coalesced during clone */ > + uint64_t ips_spdcache_hits; /* SPD cache hits */ > + uint64_t ips_spdcache_misses; /* SPD cache misses */ > + > uint64_t ips_clcopied; /* clusters copied during clone */ > uint64_t ips_mbinserted; /* mbufs inserted during makespace */ > /* > > Modified: head/sys/netipsec/key.c > ============================================================================== > --- head/sys/netipsec/key.c Tue May 22 15:52:22 2018 (r334053) > +++ head/sys/netipsec/key.c Tue May 22 15:54:25 2018 (r334054) > @@ -173,6 +173,48 @@ static VNET_DEFINE(u_long, sphash_mask); > #define SPHASH_HASHVAL(id) (key_u32hash(id) & V_sphash_mask) > #define SPHASH_HASH(id) &V_sphashtbl[SPHASH_HASHVAL(id)] > > +/* SPD cache */ > +struct spdcache_entry { > + struct secpolicyindex spidx; /* secpolicyindex */ > + struct secpolicy *sp; /* cached policy to be used */ > + > + LIST_ENTRY(spdcache_entry) chain; > +}; > +LIST_HEAD(spdcache_entry_list, spdcache_entry); > + > +#define SPDCACHE_MAX_ENTRIES_PER_HASH 8 > + > +static VNET_DEFINE(u_int, key_spdcache_maxentries) = 0; > +#define V_key_spdcache_maxentries VNET(key_spdcache_maxentries) > +static VNET_DEFINE(u_int, key_spdcache_threshold) = 32; > +#define V_key_spdcache_threshold VNET(key_spdcache_threshold) > +static VNET_DEFINE(unsigned long, spd_size) = 0; > +#define V_spd_size VNET(spd_size) > + > +#define SPDCACHE_ENABLED() (V_key_spdcache_maxentries != 0) > +#define SPDCACHE_ACTIVE() \ > + (SPDCACHE_ENABLED() && V_spd_size >= V_key_spdcache_threshold) > + > +static VNET_DEFINE(struct spdcache_entry_list *, spdcachehashtbl); > +static VNET_DEFINE(u_long, spdcachehash_mask); > +#define V_spdcachehashtbl VNET(spdcachehashtbl) > +#define V_spdcachehash_mask VNET(spdcachehash_mask) > + > +#define SPDCACHE_HASHVAL(idx) \ > + (key_addrprotohash(&(idx)->src, &(idx)->dst, &(idx)->ul_proto) & \ > + V_spdcachehash_mask) > + > +/* Each cache line is protected by a mutex */ > +static VNET_DEFINE(struct mtx *, spdcache_lock); > +#define V_spdcache_lock VNET(spdcache_lock) > + > +#define SPDCACHE_LOCK_INIT(a) \ > + mtx_init(&V_spdcache_lock[a], "spdcache", \ > + "fast ipsec SPD cache", MTX_DEF|MTX_DUPOK) > +#define SPDCACHE_LOCK_DESTROY(a) mtx_destroy(&V_spdcache_lock[a]) > +#define SPDCACHE_LOCK(a) mtx_lock(&V_spdcache_lock[a]); > +#define SPDCACHE_UNLOCK(a) mtx_unlock(&V_spdcache_lock[a]); > + > /* SAD */ > TAILQ_HEAD(secashead_queue, secashead); > LIST_HEAD(secashead_list, secashead); > @@ -198,8 +240,9 @@ static VNET_DEFINE(u_long, sahaddrhash_mask); > > #define SAHHASH_NHASH_LOG2 7 > #define SAHHASH_NHASH (1 << SAHHASH_NHASH_LOG2) > -#define SAHADDRHASH_HASHVAL(saidx) \ > - (key_saidxhash(saidx) & V_sahaddrhash_mask) > +#define SAHADDRHASH_HASHVAL(idx) \ > + (key_addrprotohash(&(idx)->src, &(idx)->dst, &(idx)->proto) & \ > + V_sahaddrhash_mask) > #define SAHADDRHASH_HASH(saidx) \ > &V_sahaddrhashtbl[SAHADDRHASH_HASHVAL(saidx)] > > @@ -215,33 +258,34 @@ static VNET_DEFINE(u_long, savhash_mask); > #define SAVHASH_HASH(spi) &V_savhashtbl[SAVHASH_HASHVAL(spi)] > > static uint32_t > -key_saidxhash(const struct secasindex *saidx) > +key_addrprotohash(const union sockaddr_union *src, > + const union sockaddr_union *dst, const uint8_t *proto) > { > uint32_t hval; > > - hval = fnv_32_buf(&saidx->proto, sizeof(saidx->proto), > + hval = fnv_32_buf(proto, sizeof(*proto), > FNV1_32_INIT); > - switch (saidx->dst.sa.sa_family) { > + switch (dst->sa.sa_family) { > #ifdef INET > case AF_INET: > - hval = fnv_32_buf(&saidx->src.sin.sin_addr, > + hval = fnv_32_buf(&src->sin.sin_addr, > sizeof(in_addr_t), hval); > - hval = fnv_32_buf(&saidx->dst.sin.sin_addr, > + hval = fnv_32_buf(&dst->sin.sin_addr, > sizeof(in_addr_t), hval); > break; > #endif > #ifdef INET6 > case AF_INET6: > - hval = fnv_32_buf(&saidx->src.sin6.sin6_addr, > + hval = fnv_32_buf(&src->sin6.sin6_addr, > sizeof(struct in6_addr), hval); > - hval = fnv_32_buf(&saidx->dst.sin6.sin6_addr, > + hval = fnv_32_buf(&dst->sin6.sin6_addr, > sizeof(struct in6_addr), hval); > break; > #endif > default: > hval = 0; > ipseclog((LOG_DEBUG, "%s: unknown address family %d", > - __func__, saidx->dst.sa.sa_family)); > + __func__, dst->sa.sa_family)); > } > return (hval); > } > @@ -290,8 +334,9 @@ static VNET_DEFINE(u_long, acqseqhash_mask); > > #define ACQHASH_NHASH_LOG2 7 > #define ACQHASH_NHASH (1 << ACQHASH_NHASH_LOG2) > -#define ACQADDRHASH_HASHVAL(saidx) \ > - (key_saidxhash(saidx) & V_acqaddrhash_mask) > +#define ACQADDRHASH_HASHVAL(idx) \ > + (key_addrprotohash(&(idx)->src, &(idx)->dst, &(idx)->proto) & \ > + V_acqaddrhash_mask) > #define ACQSEQHASH_HASHVAL(seq) \ > (key_u32hash(seq) & V_acqseqhash_mask) > #define ACQADDRHASH_HASH(saidx) \ > @@ -463,6 +508,17 @@ SYSCTL_INT(_net_key, KEYCTL_AH_KEYMIN, ah_keymin, > SYSCTL_INT(_net_key, KEYCTL_PREFERED_OLDSA, preferred_oldsa, > CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(key_preferred_oldsa), 0, ""); > > +static SYSCTL_NODE(_net_key, OID_AUTO, spdcache, CTLFLAG_RW, 0, "SPD cache"); > + > +SYSCTL_UINT(_net_key_spdcache, OID_AUTO, maxentries, > + CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(key_spdcache_maxentries), 0, > + "Maximum number of entries in the SPD cache" > + " (power of 2, 0 to disable)"); > + > +SYSCTL_UINT(_net_key_spdcache, OID_AUTO, threshold, > + CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(key_spdcache_threshold), 0, > + "Number of SPs that make the SPD cache active"); > + > #define __LIST_CHAINED(elm) \ > (!((elm)->chain.le_next == NULL && (elm)->chain.le_prev == NULL)) > > @@ -473,6 +529,7 @@ MALLOC_DEFINE(M_IPSEC_SR, "ipsecrequest", "ipsec secur > MALLOC_DEFINE(M_IPSEC_MISC, "ipsec-misc", "ipsec miscellaneous"); > MALLOC_DEFINE(M_IPSEC_SAQ, "ipsec-saq", "ipsec sa acquire"); > MALLOC_DEFINE(M_IPSEC_SAR, "ipsec-reg", "ipsec sa acquire"); > +MALLOC_DEFINE(M_IPSEC_SPDCACHE, "ipsec-spdcache", "ipsec SPD cache"); > > static VNET_DEFINE(uma_zone_t, key_lft_zone); > #define V_key_lft_zone VNET(key_lft_zone) > @@ -574,6 +631,7 @@ static struct callout key_timer; > #endif > > static void key_unlink(struct secpolicy *); > +static struct secpolicy *key_do_allocsp(struct secpolicyindex *spidx, u_int dir); > static struct secpolicy *key_getsp(struct secpolicyindex *); > static struct secpolicy *key_getspbyid(u_int32_t); > static struct mbuf *key_gather_mbuf(struct mbuf *, > @@ -694,6 +752,15 @@ static struct mbuf *key_setlifetime(struct seclifetime > static struct mbuf *key_setkey(struct seckey *, uint16_t); > static int xform_init(struct secasvar *, u_short); > > +static void spdcache_init(void); > +static void spdcache_clear(void); > +static struct spdcache_entry *spdcache_entry_alloc( > + const struct secpolicyindex *spidx, > + struct secpolicy *policy); > +static void spdcache_entry_free(struct spdcache_entry *entry); > +static void spdcache_destroy(void); > + > + > #define DBG_IPSEC_INITREF(t, p) do { \ > refcount_init(&(p)->refcnt, 1); \ > KEYDBG(KEY_STAMP, \ > @@ -799,14 +866,8 @@ key_checksockaddrs(struct sockaddr *src, struct sockad > return (0); > } > > -/* > - * allocating a SP for OUTBOUND or INBOUND packet. > - * Must call key_freesp() later. > - * OUT: NULL: not found > - * others: found and return the pointer. > - */ > struct secpolicy * > -key_allocsp(struct secpolicyindex *spidx, u_int dir) > +key_do_allocsp(struct secpolicyindex *spidx, u_int dir) > { > SPTREE_RLOCK_TRACKER; > struct secpolicy *sp; > @@ -823,7 +884,73 @@ key_allocsp(struct secpolicyindex *spidx, u_int dir) > } > } > SPTREE_RUNLOCK(); > + return (sp); > +} > > + > +/* > + * allocating a SP for OUTBOUND or INBOUND packet. > + * Must call key_freesp() later. > + * OUT: NULL: not found > + * others: found and return the pointer. > + */ > +struct secpolicy * > +key_allocsp(struct secpolicyindex *spidx, u_int dir) > +{ > + struct spdcache_entry *entry, *lastentry, *tmpentry; > + struct secpolicy *sp; > + uint32_t hashv; > + int nb_entries; > + > + if (!SPDCACHE_ACTIVE()) { > + sp = key_do_allocsp(spidx, dir); > + goto out; > + } > + > + hashv = SPDCACHE_HASHVAL(spidx); > + SPDCACHE_LOCK(hashv); > + nb_entries = 0; > + LIST_FOREACH_SAFE(entry, &V_spdcachehashtbl[hashv], chain, tmpentry) { > + /* Removed outdated entries */ > + if (entry->sp != NULL && > + entry->sp->state == IPSEC_SPSTATE_DEAD) { > + LIST_REMOVE(entry, chain); > + spdcache_entry_free(entry); > + continue; > + } > + > + nb_entries++; > + if (!key_cmpspidx_exactly(&entry->spidx, spidx)) { > + lastentry = entry; > + continue; > + } > + > + sp = entry->sp; > + if (entry->sp != NULL) > + SP_ADDREF(sp); > + > + IPSECSTAT_INC(ips_spdcache_hits); > + > + SPDCACHE_UNLOCK(hashv); > + goto out; > + } > + > + IPSECSTAT_INC(ips_spdcache_misses); > + > + sp = key_do_allocsp(spidx, dir); > + entry = spdcache_entry_alloc(spidx, sp); > + if (entry != NULL) { > + if (nb_entries >= SPDCACHE_MAX_ENTRIES_PER_HASH) { > + LIST_REMOVE(lastentry, chain); > + spdcache_entry_free(lastentry); > + } > + > + LIST_INSERT_HEAD(&V_spdcachehashtbl[hashv], entry, chain); > + } > + > + SPDCACHE_UNLOCK(hashv); > + > +out: > if (sp != NULL) { /* found a SPD entry */ > sp->lastused = time_second; > KEYDBG(IPSEC_STAMP, > @@ -1107,9 +1234,12 @@ key_unlink(struct secpolicy *sp) > } > sp->state = IPSEC_SPSTATE_DEAD; > TAILQ_REMOVE(&V_sptree[sp->spidx.dir], sp, chain); > + V_spd_size--; > LIST_REMOVE(sp, idhash); > V_sp_genid++; > SPTREE_WUNLOCK(); > + if (SPDCACHE_ENABLED()) > + spdcache_clear(); > key_freesp(&sp); > } > > @@ -1132,6 +1262,7 @@ key_insertsp(struct secpolicy *newsp) > done: > LIST_INSERT_HEAD(SPHASH_HASH(newsp->id), newsp, idhash); > newsp->state = IPSEC_SPSTATE_ALIVE; > + V_spd_size++; > V_sp_genid++; > } > > @@ -1207,9 +1338,12 @@ key_unregister_ifnet(struct secpolicy **spp, u_int cou > spp[i]->state = IPSEC_SPSTATE_DEAD; > TAILQ_REMOVE(&V_sptree_ifnet[spp[i]->spidx.dir], > spp[i], chain); > + V_spd_size--; > LIST_REMOVE(spp[i], idhash); > } > SPTREE_WUNLOCK(); > + if (SPDCACHE_ENABLED()) > + spdcache_clear(); > > for (i = 0; i < count; i++) { > m = key_setdumpsp(spp[i], SADB_X_SPDDELETE, 0, 0); > @@ -1939,6 +2073,8 @@ key_spdadd(struct socket *so, struct mbuf *m, const st > } > key_insertsp(newsp); > SPTREE_WUNLOCK(); > + if (SPDCACHE_ENABLED()) > + spdcache_clear(); > > KEYDBG(KEY_STAMP, > printf("%s: SP(%p)\n", __func__, newsp)); > @@ -2393,7 +2529,10 @@ key_spdflush(struct socket *so, struct mbuf *m, const > LIST_REMOVE(sp, idhash); > } > V_sp_genid++; > + V_spd_size = 0; > SPTREE_WUNLOCK(); > + if (SPDCACHE_ENABLED()) > + spdcache_clear(); > sp = TAILQ_FIRST(&drainq); > while (sp != NULL) { > nextsp = TAILQ_NEXT(sp, chain); > @@ -4070,7 +4209,8 @@ key_cmpspidx_exactly(struct secpolicyindex *spidx0, > > if (spidx0->prefs != spidx1->prefs > || spidx0->prefd != spidx1->prefd > - || spidx0->ul_proto != spidx1->ul_proto) > + || spidx0->ul_proto != spidx1->ul_proto > + || spidx0->dir != spidx1->dir) > return 0; > > return key_sockaddrcmp(&spidx0->src.sa, &spidx1->src.sa, 1) == 0 && > @@ -4338,12 +4478,15 @@ key_flush_spd(time_t now) > continue; > } > TAILQ_REMOVE(&V_sptree[sp->spidx.dir], sp, chain); > + V_spd_size--; > LIST_REMOVE(sp, idhash); > sp->state = IPSEC_SPSTATE_DEAD; > sp = nextsp; > } > V_sp_genid++; > SPTREE_WUNLOCK(); > + if (SPDCACHE_ENABLED()) > + spdcache_clear(); > > sp = LIST_FIRST(&drainq); > while (sp != NULL) { > @@ -8067,6 +8210,95 @@ key_validate_ext(const struct sadb_ext *ext, int len) > } > > void > +spdcache_init(void) > +{ > + int i; > + > + TUNABLE_INT_FETCH("net.key.spdcache.maxentries", > + &V_key_spdcache_maxentries); > + TUNABLE_INT_FETCH("net.key.spdcache.threshold", > + &V_key_spdcache_threshold); > + > + if (V_key_spdcache_maxentries) { > + V_key_spdcache_maxentries = MAX(V_key_spdcache_maxentries, > + SPDCACHE_MAX_ENTRIES_PER_HASH); > + V_spdcachehashtbl = hashinit(V_key_spdcache_maxentries / > + SPDCACHE_MAX_ENTRIES_PER_HASH, > + M_IPSEC_SPDCACHE, &V_spdcachehash_mask); > + V_key_spdcache_maxentries = (V_spdcachehash_mask + 1) > + * SPDCACHE_MAX_ENTRIES_PER_HASH; > + > + V_spdcache_lock = malloc(sizeof(struct mtx) * > + (V_spdcachehash_mask + 1), > + M_IPSEC_SPDCACHE, M_WAITOK|M_ZERO); > + > + for (i = 0; i < V_spdcachehash_mask + 1; ++i) > + SPDCACHE_LOCK_INIT(i); > + } > +} > + > +struct spdcache_entry * > +spdcache_entry_alloc(const struct secpolicyindex *spidx, struct secpolicy *sp) > +{ > + struct spdcache_entry *entry; > + > + entry = malloc(sizeof(struct spdcache_entry), > + M_IPSEC_SPDCACHE, M_NOWAIT|M_ZERO); > + if (entry == NULL) > + return NULL; > + > + if (sp != NULL) > + SP_ADDREF(sp); > + > + entry->spidx = *spidx; > + entry->sp = sp; > + > + return (entry); > +} > + > +void > +spdcache_entry_free(struct spdcache_entry *entry) > +{ > + > + if (entry->sp != NULL) > + key_freesp(&entry->sp); > + free(entry, M_IPSEC_SPDCACHE); > +} > + > +void > +spdcache_clear(void) > +{ > + struct spdcache_entry *entry; > + int i; > + > + for (i = 0; i < V_spdcachehash_mask + 1; ++i) { > + SPDCACHE_LOCK(i); > + while (!LIST_EMPTY(&V_spdcachehashtbl[i])) { > + entry = LIST_FIRST(&V_spdcachehashtbl[i]); > + LIST_REMOVE(entry, chain); > + spdcache_entry_free(entry); > + } > + SPDCACHE_UNLOCK(i); > + } > +} > + > +void > +spdcache_destroy(void) > +{ > + int i; > + > + if (SPDCACHE_ENABLED()) { > + spdcache_clear(); > + hashdestroy(V_spdcachehashtbl, M_IPSEC_SPDCACHE, V_spdcachehash_mask); > + > + for (i = 0; i < V_spdcachehash_mask + 1; ++i) > + SPDCACHE_LOCK_DESTROY(i); > + > + free(V_spdcache_lock, M_IPSEC_SPDCACHE); > + } > +} > + > +void > key_init(void) > { > int i; > @@ -8090,6 +8322,8 @@ key_init(void) > V_acqseqhashtbl = hashinit(ACQHASH_NHASH, M_IPSEC_SAQ, > &V_acqseqhash_mask); > > + spdcache_init(); > + > for (i = 0; i <= SADB_SATYPE_MAX; i++) > LIST_INIT(&V_regtree[i]); > > @@ -8145,6 +8379,7 @@ key_destroy(void) > for (i = 0; i < V_sphash_mask + 1; i++) > LIST_INIT(&V_sphashtbl[i]); > SPTREE_WUNLOCK(); > + spdcache_destroy(); > > sp = TAILQ_FIRST(&drainq); > while (sp != NULL) { > > Modified: head/tools/tools/crypto/ipsecstats.c > ============================================================================== > --- head/tools/tools/crypto/ipsecstats.c Tue May 22 15:52:22 2018 (r334053) > +++ head/tools/tools/crypto/ipsecstats.c Tue May 22 15:54:25 2018 (r334054) > @@ -171,9 +171,9 @@ main(int argc, char *argv[]) > STAT(ips.ips_out_noroute, "no route available %ju (output)"); > STAT(ips.ips_out_inval, "generic error %ju (output)"); > STAT(ips.ips_out_bundlesa, "bundled SA processed %ju (output)"); > - printf("m_clone processing: %ju mbufs + %ju clusters coalesced\n", > - (uintmax_t)ips.ips_mbcoalesced, (uintmax_t)ips.ips_clcoalesced); > STAT(ips.ips_clcopied, "m_clone processing: %ju clusters copied\n"); > + STAT(ips.ips_spdcache_hits, "spd cache hits %ju\n"); > + STAT(ips.ips_spdcache_misses, "spd cache misses %ju\n"); > STAT(ips.ips_mbinserted, "m_makespace: %ju mbufs inserted\n"); > printf("header position [front/middle/end]: %ju/%ju/%ju\n", > (uintmax_t)ips.ips_input_front, (uintmax_t)ips.ips_input_middle, > > Modified: head/usr.bin/netstat/ipsec.c > ============================================================================== > --- head/usr.bin/netstat/ipsec.c Tue May 22 15:52:22 2018 (r334053) > +++ head/usr.bin/netstat/ipsec.c Tue May 22 15:54:25 2018 (r334054) > @@ -191,6 +191,8 @@ print_ipsecstats(const struct ipsecstat *ipsecstat) > > #define p(f, m) if (ipsecstat->f || sflag <= 1) \ > xo_emit(m, (uintmax_t)ipsecstat->f, plural(ipsecstat->f)) > +#define p2(f, m) if (ipsecstat->f || sflag <= 1) \ > + xo_emit(m, (uintmax_t)ipsecstat->f, plurales(ipsecstat->f)) > > p(ips_in_polvio, "\t{:dropped-policy-violation/%ju} " > "{N:/inbound packet%s violated process security policy}\n"); > @@ -210,14 +212,15 @@ print_ipsecstats(const struct ipsecstat *ipsecstat) > "{N:/invalid outbound packet%s}\n"); > p(ips_out_bundlesa, "\t{:send-bundled-sa/%ju} " > "{N:/outbound packet%s with bundled SAs}\n"); > - p(ips_mbcoalesced, "\t{:mbufs-coalesced-during-clone/%ju} " > - "{N:/mbuf%s coalesced during clone}\n"); > - p(ips_clcoalesced, "\t{:clusters-coalesced-during-clone/%ju} " > - "{N:/cluster%s coalesced during clone}\n"); > + p(ips_spdcache_hits, "\t{:spdcache-hits/%ju} " > + "{N:/spd cache hit%s}\n"); > + p2(ips_spdcache_misses, "\t{:spdcache-misses/%ju} " > + "{N:/spd cache miss%s}\n"); > p(ips_clcopied, "\t{:clusters-copied-during-clone/%ju} " > "{N:/cluster%s copied during clone}\n"); > p(ips_mbinserted, "\t{:mbufs-inserted/%ju} " > "{N:/mbuf%s inserted during makespace}\n"); > +#undef p2 > #undef p > xo_close_container("ipsec-statistics"); > } > From owner-svn-src-head@freebsd.org Tue May 22 19:11:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25B37EAC5DC; Tue, 22 May 2018 19:11:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA859853CD; Tue, 22 May 2018 19:11:07 +0000 (UTC) (envelope-from trasz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABC36181B0; Tue, 22 May 2018 19:11:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MJB7OA082298; Tue, 22 May 2018 19:11:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MJB6Af082295; Tue, 22 May 2018 19:11:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201805221911.w4MJB6Af082295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 22 May 2018 19:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334061 - head/sys/dev/usb/template X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/dev/usb/template X-SVN-Commit-Revision: 334061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 19:11:08 -0000 Author: trasz Date: Tue May 22 19:11:06 2018 New Revision: 334061 URL: https://svnweb.freebsd.org/changeset/base/334061 Log: Add new PIDs for Audio, CDCE, MTP, and Mass Storage, from https://github.com/obdev/v-usb/blob/master/usbdrv/USB-IDs-for-free.txt. Big thanks to Christian Starkjohann for allocating those. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/template/usb_template_audio.c head/sys/dev/usb/template/usb_template_cdce.c head/sys/dev/usb/template/usb_template_msc.c head/sys/dev/usb/template/usb_template_mtp.c Modified: head/sys/dev/usb/template/usb_template_audio.c ============================================================================== --- head/sys/dev/usb/template/usb_template_audio.c Tue May 22 16:33:09 2018 (r334060) +++ head/sys/dev/usb/template/usb_template_audio.c Tue May 22 19:11:06 2018 (r334061) @@ -79,7 +79,7 @@ enum { }; #define AUDIO_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define AUDIO_DEFAULT_PRODUCT_ID 0x05dc +#define AUDIO_DEFAULT_PRODUCT_ID 0x27e0 #define AUDIO_DEFAULT_MIXER "Mixer interface" #define AUDIO_DEFAULT_RECORD "Record interface" #define AUDIO_DEFAULT_PLAYBACK "Playback interface" Modified: head/sys/dev/usb/template/usb_template_cdce.c ============================================================================== --- head/sys/dev/usb/template/usb_template_cdce.c Tue May 22 16:33:09 2018 (r334060) +++ head/sys/dev/usb/template/usb_template_cdce.c Tue May 22 19:11:06 2018 (r334061) @@ -80,7 +80,7 @@ enum { }; #define ETH_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define ETH_DEFAULT_PRODUCT_ID 0x05dc +#define ETH_DEFAULT_PRODUCT_ID 0x27e1 #define ETH_DEFAULT_MAC "2A02030405060789AB" #define ETH_DEFAULT_CONTROL "USB Ethernet Comm Interface" #define ETH_DEFAULT_DATA "USB Ethernet Data Interface" Modified: head/sys/dev/usb/template/usb_template_msc.c ============================================================================== --- head/sys/dev/usb/template/usb_template_msc.c Tue May 22 16:33:09 2018 (r334060) +++ head/sys/dev/usb/template/usb_template_msc.c Tue May 22 19:11:06 2018 (r334061) @@ -77,7 +77,7 @@ enum { }; #define MSC_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define MSC_DEFAULT_PRODUCT_ID 0x05dc +#define MSC_DEFAULT_PRODUCT_ID 0x27df #define MSC_DEFAULT_INTERFACE "USB Mass Storage Interface" #define MSC_DEFAULT_CONFIGURATION "Default Config" #define MSC_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER Modified: head/sys/dev/usb/template/usb_template_mtp.c ============================================================================== --- head/sys/dev/usb/template/usb_template_mtp.c Tue May 22 16:33:09 2018 (r334060) +++ head/sys/dev/usb/template/usb_template_mtp.c Tue May 22 19:11:06 2018 (r334061) @@ -86,7 +86,7 @@ enum { }; #define MTP_DEFAULT_VENDOR_ID USB_TEMPLATE_VENDOR -#define MTP_DEFAULT_PRODUCT_ID 0x05dc +#define MTP_DEFAULT_PRODUCT_ID 0x27e2 #define MTP_DEFAULT_INTERFACE "USB MTP Interface" #define MTP_DEFAULT_CONFIGURATION "Default Config" #define MTP_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER From owner-svn-src-head@freebsd.org Tue May 22 19:24:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7865BEACFDE; Tue, 22 May 2018 19:24:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C96985E44; Tue, 22 May 2018 19:24:58 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3589184AC; Tue, 22 May 2018 19:24:57 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MJOvYT091582; Tue, 22 May 2018 19:24:57 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MJOvEH091581; Tue, 22 May 2018 19:24:57 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201805221924.w4MJOvEH091581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 22 May 2018 19:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334062 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334062 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 19:24:58 -0000 Author: mjg Date: Tue May 22 19:24:57 2018 New Revision: 334062 URL: https://svnweb.freebsd.org/changeset/base/334062 Log: Move preemption handling out of critical_exit. In preperataion for making the enter/exit pair inline. Reviewed by: kib Modified: head/sys/kern/kern_switch.c Modified: head/sys/kern/kern_switch.c ============================================================================== --- head/sys/kern/kern_switch.c Tue May 22 19:11:06 2018 (r334061) +++ head/sys/kern/kern_switch.c Tue May 22 19:24:57 2018 (r334062) @@ -209,48 +209,49 @@ critical_enter(void) (long)td->td_proc->p_pid, td->td_name, td->td_critnest); } -void -critical_exit(void) +static void __noinline +critical_exit_preempt(void) { struct thread *td; int flags; td = curthread; - KASSERT(td->td_critnest != 0, - ("critical_exit: td_critnest == 0")); + KASSERT(td->td_owepreempt != 0, + ("critical_exit: td_owepreempt == 0")); + if (td->td_critnest != 0) + return; + if (kdb_active) + return; - if (td->td_critnest == 1) { - td->td_critnest = 0; + /* + * Microoptimization: we committed to switch, + * disable preemption in interrupt handlers + * while spinning for the thread lock. + */ + td->td_critnest = 1; + thread_lock(td); + td->td_critnest--; + flags = SW_INVOL | SW_PREEMPT; + if (TD_IS_IDLETHREAD(td)) + flags |= SWT_IDLE; + else + flags |= SWT_OWEPREEMPT; + mi_switch(flags, NULL); + thread_unlock(td); +} - /* - * Interrupt handlers execute critical_exit() on - * leave, and td_owepreempt may be left set by an - * interrupt handler only when td_critnest > 0. If we - * are decrementing td_critnest from 1 to 0, read - * td_owepreempt after decrementing, to not miss the - * preempt. Disallow compiler to reorder operations. - */ - __compiler_membar(); - if (td->td_owepreempt && !kdb_active) { - /* - * Microoptimization: we committed to switch, - * disable preemption in interrupt handlers - * while spinning for the thread lock. - */ - td->td_critnest = 1; - thread_lock(td); - td->td_critnest--; - flags = SW_INVOL | SW_PREEMPT; - if (TD_IS_IDLETHREAD(td)) - flags |= SWT_IDLE; - else - flags |= SWT_OWEPREEMPT; - mi_switch(flags, NULL); - thread_unlock(td); - } - } else - td->td_critnest--; +void +critical_exit(void) +{ + struct thread *td; + td = curthread; + KASSERT(td->td_critnest != 0, + ("critical_exit: td_critnest == 0")); + td->td_critnest--; + __compiler_membar(); + if (__predict_false(td->td_owepreempt)) + critical_exit_preempt(); CTR4(KTR_CRITICAL, "critical_exit by thread %p (%ld, %s) to %d", td, (long)td->td_proc->p_pid, td->td_name, td->td_critnest); } From owner-svn-src-head@freebsd.org Tue May 22 20:00:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13025EADD0B; Tue, 22 May 2018 20:00:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B566D86F5B; Tue, 22 May 2018 20:00:57 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 976D7189B2; Tue, 22 May 2018 20:00:57 +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 w4MK0vLn007358; Tue, 22 May 2018 20:00:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MK0vCj007355; Tue, 22 May 2018 20:00:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805222000.w4MK0vCj007355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 22 May 2018 20:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334063 - in head/sys/dev/usb: . net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys/dev/usb: . net X-SVN-Commit-Revision: 334063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 20:00:58 -0000 Author: emaste Date: Tue May 22 20:00:56 2018 New Revision: 334063 URL: https://svnweb.freebsd.org/changeset/base/334063 Log: if_muge: only attach to LAN7800 Chip ID This driver was developed for the LAN7800 and the register-compatible LAN7515 (found on Raspberry Pi 3B+) and has only been tested on those devices. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/net/if_muge.c head/sys/dev/usb/net/if_mugereg.h head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Tue May 22 19:24:57 2018 (r334062) +++ head/sys/dev/usb/net/if_muge.c Tue May 22 20:00:56 2018 (r334063) @@ -168,7 +168,8 @@ struct muge_softc { /* Settings for the mac control (MAC_CSR) register. */ uint32_t sc_rfe_ctl; uint32_t sc_mdix_ctl; - uint32_t sc_rev_id; + uint16_t chipid; + uint16_t chiprev; uint32_t sc_mchash_table[ETH_DP_SEL_VHF_HASH_LEN]; uint32_t sc_pfilter_table[MUGE_NUM_PFILTER_ADDRS_][2]; @@ -974,15 +975,20 @@ lan78xx_chip_init(struct muge_softc *sc) } /* Read and display the revision register. */ - if ((err = lan78xx_read_reg(sc, ETH_ID_REV, &sc->sc_rev_id)) < 0) { + if ((err = lan78xx_read_reg(sc, ETH_ID_REV, &buf)) < 0) { muge_warn_printf(sc, "failed to read ETH_ID_REV (err = %d)\n", err); goto init_failed; } - - device_printf(sc->sc_ue.ue_dev, "chip 0x%04lx, rev. %04lx\n", - (sc->sc_rev_id & ETH_ID_REV_CHIP_ID_MASK_) >> 16, - (sc->sc_rev_id & ETH_ID_REV_CHIP_REV_MASK_)); + sc->chipid = (buf & ETH_ID_REV_CHIP_ID_MASK_) >> 16; + sc->chiprev = buf & ETH_ID_REV_CHIP_REV_MASK_; + if (sc->chipid != ETH_ID_REV_CHIP_ID_7800_) { + muge_warn_printf(sc, "Chip ID 0x%04x not yet supported\n", + sc->chipid); + goto init_failed; + } + device_printf(sc->sc_ue.ue_dev, "Chip ID 0x%04x rev %04x\n", sc->chipid, + sc->chiprev); /* Respond to BULK-IN tokens with a NAK when RX FIFO is empty. */ if ((err = lan78xx_read_reg(sc, ETH_USB_CFG0, &buf)) != 0) { Modified: head/sys/dev/usb/net/if_mugereg.h ============================================================================== --- head/sys/dev/usb/net/if_mugereg.h Tue May 22 19:24:57 2018 (r334062) +++ head/sys/dev/usb/net/if_mugereg.h Tue May 22 20:00:56 2018 (r334063) @@ -47,6 +47,9 @@ #define ETH_ID_REV 0x000 #define ETH_ID_REV_CHIP_ID_MASK_ 0xFFFF0000UL #define ETH_ID_REV_CHIP_REV_MASK_ 0x0000FFFFUL +#define ETH_ID_REV_CHIP_ID_7800_ 0x7800 +#define ETH_ID_REV_CHIP_ID_7801_ 0x7801 +#define ETH_ID_REV_CHIP_ID_7850_ 0x7850 /* Device interrupt status register. */ #define ETH_INT_STS 0x00C Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue May 22 19:24:57 2018 (r334062) +++ head/sys/dev/usb/usbdevs Tue May 22 20:00:56 2018 (r334063) @@ -4322,6 +4322,7 @@ product SMC2 2514HUB 0x2514 USB Hub product SMC3 2662WUSB 0xa002 2662W-AR Wireless product SMC2 LAN7800_ETH 0x7800 USB/Ethernet product SMC2 LAN7801_ETH 0x7801 USB/Ethernet +product SMC2 LAN7850_ETH 0x7850 USB/Ethernet product SMC2 LAN9500_ETH 0x9500 USB/Ethernet product SMC2 LAN9505_ETH 0x9505 USB/Ethernet product SMC2 LAN9530_ETH 0x9530 USB/Ethernet From owner-svn-src-head@freebsd.org Tue May 22 20:23:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F17EEAE53B; Tue, 22 May 2018 20:23:02 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.stack.nl", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 290D187C28; Tue, 22 May 2018 20:23:02 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from toad2.stack.nl (toad2.stack.nl [IPv6:2001:610:1108:5010::161]) by mailout.stack.nl (Postfix) with ESMTP id 0038F33; Tue, 22 May 2018 22:22:59 +0200 (CEST) Received: by toad2.stack.nl (Postfix, from userid 1677) id EB90F892B2; Tue, 22 May 2018 22:22:59 +0200 (CEST) Date: Tue, 22 May 2018 22:22:59 +0200 From: Jilles Tjoelker To: "O. Hartmann" Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, David Wolfskill , bdrewery@FreeBSD.org Subject: Re: svn commit: r334008 - head/bin/sh Message-ID: <20180522202259.GA44110@stack.nl> References: <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> <201805220445.w4M4jroR019550@slippy.cwsent.com> <20180522101737.52e76c0f@freyja.zeit4.iv.bundesimmobilien.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180522101737.52e76c0f@freyja.zeit4.iv.bundesimmobilien.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 20:23:02 -0000 On Tue, May 22, 2018 at 10:17:41AM +0200, O. Hartmann wrote: > On Mon, 21 May 2018 21:45:53 -0700 > Cy Schubert wrote: > > In message <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> > > , "O. H > > artmann" writes: > > > On Mon, 21 May 2018 21:52:48 +0000 (UTC) > > > Jilles Tjoelker wrote: > > > > Author: jilles > > > > Date: Mon May 21 21:52:48 2018 > > > > New Revision: 334008 > > > > URL: https://svnweb.freebsd.org/changeset/base/334008 > > > > Log: > > > > sh: Split CNL syntax category to avoid a check on state[level].syntax > > > > No functional change is intended. > > > > Modified: > > > > head/bin/sh/mksyntax.c > > > > head/bin/sh/parser.c > [snip] > > > Have this been tested? Doesn't compile for me: > > > [...] > > > Building /usr/obj/usr/src/amd64.amd64/kerberos5/libexec/hprop/hprop > > > --- all_subdir_rescue --- > > > --- parser.o --- > > > /usr/src/bin/sh/parser.c:1440:9: error: use of undeclared identifier 'CQNL' > > > case CQNL: > > > ^ > > > --- all_subdir_gnu --- > > > Building /usr/obj/usr/src/amd64.amd64/gnu/usr.bin/gdb/libgdb/amd64bsd-nat.o > > > --- all_subdir_rescue --- > > > 1 error generated. > > > *** [parser.o] Error code 1 > > > make[6]: stopped in /usr/src/bin/sh > > CQNL is defined in /usr/obj/opt/src/svn-current/amd64.amd64/bin/sh/synta > > x.h, generated by mksyntax. > > slippy$ ag -s CQNL /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/*. > > h > > /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/syntax.h > > 11:#define CQNL 2 /* newline character in quotes */ > > slippy$ > > Remove the file if it's not defined in your syntax.h. > > Just out of interest, do you use meta mode? > I think such a question is of common interest if errors/bugs like that occur: > Yes, I use/compile world/kernel with META mode. The change itself is fine. It built for me and for Jenkins (ci.freebsd.org). What is not fine is an incremental build with meta mode. Apparently, the syntax.h: .NOMETA rule added in r301285 causes bmake to build some files against the old syntax.h, even though syntax.c and syntax.h will be rebuilt. To fix this, it may be possible to generate a meta file for syntax.h based on the one for syntax.c. The same would be done for builtins.[ch] and nodes.[ch]. Conceptually simpler is accepting what make would like: one command generates one file only. This is not really new with meta mode since a somewhat ugly .ORDER declaration had been necessary before. The .c content can go inside a #ifdef in the .h file so the .c file need not be autogenerated, or the tools can be run twice, once to generate the .c file and once to generate the .h file. In both cases, the tools will be somewhat uglier in order to simplify the build system. -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Tue May 22 20:50:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52F54EAF081; Tue, 22 May 2018 20:50:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 047D268B24; Tue, 22 May 2018 20:50:20 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D94BD191C1; Tue, 22 May 2018 20:50:19 +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 w4MKoJ18032729; Tue, 22 May 2018 20:50:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MKoJnd032728; Tue, 22 May 2018 20:50:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805222050.w4MKoJnd032728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 May 2018 20:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334064 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 334064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 20:50:20 -0000 Author: kib Date: Tue May 22 20:50:19 2018 New Revision: 334064 URL: https://svnweb.freebsd.org/changeset/base/334064 Log: Fix UP build. Reported by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/x86/cpu_machdep.c Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Tue May 22 20:00:56 2018 (r334063) +++ head/sys/x86/x86/cpu_machdep.c Tue May 22 20:50:19 2018 (r334064) @@ -69,9 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SMP #include -#endif #include #include From owner-svn-src-head@freebsd.org Tue May 22 22:16:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAEDAEB17FE; Tue, 22 May 2018 22:16:49 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CE236B8E0; Tue, 22 May 2018 22:16:49 +0000 (UTC) (envelope-from kibab@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DAE71A077; Tue, 22 May 2018 22:16:49 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4MMGnVm077708; Tue, 22 May 2018 22:16:49 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4MMGnrG077707; Tue, 22 May 2018 22:16:49 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201805222216.w4MMGnrG077707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Tue, 22 May 2018 22:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334065 - head/sys/cam/mmc X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: head/sys/cam/mmc X-SVN-Commit-Revision: 334065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 22:16:50 -0000 Author: kibab Date: Tue May 22 22:16:49 2018 New Revision: 334065 URL: https://svnweb.freebsd.org/changeset/base/334065 Log: Implement initial MMC partitions support for MMCCAM. For MMC cards, add partitions found on the card as separate disk(9) devices. Don't do anything with RPMB partition for now. Lots of code is copied almost 1:1 from the mmcsd.c in the old stack, credits Marius Strobl (marius@FreeBSD.org) Reviewed by: marius Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D12762 Modified: head/sys/cam/mmc/mmc_da.c Modified: head/sys/cam/mmc/mmc_da.c ============================================================================== --- head/sys/cam/mmc/mmc_da.c Tue May 22 20:50:19 2018 (r334064) +++ head/sys/cam/mmc/mmc_da.c Tue May 22 22:16:49 2018 (r334065) @@ -88,35 +88,66 @@ typedef enum { } sdda_flags; typedef enum { - SDDA_STATE_INIT, - SDDA_STATE_INVALID, - SDDA_STATE_NORMAL + SDDA_STATE_INIT, + SDDA_STATE_INVALID, + SDDA_STATE_NORMAL, + SDDA_STATE_PART_SWITCH, } sdda_state; +#define SDDA_FMT_BOOT "sdda%dboot" +#define SDDA_FMT_GP "sdda%dgp" +#define SDDA_FMT_RPMB "sdda%drpmb" +#define SDDA_LABEL_ENH "enh" + +#define SDDA_PART_NAMELEN (16 + 1) + +struct sdda_softc; + +struct sdda_part { + struct disk *disk; + struct bio_queue_head bio_queue; + sdda_flags flags; + struct sdda_softc *sc; + u_int cnt; + u_int type; + bool ro; + char name[SDDA_PART_NAMELEN]; +}; + struct sdda_softc { - struct bio_queue_head bio_queue; int outstanding_cmds; /* Number of active commands */ int refcount; /* Active xpt_action() calls */ sdda_state state; - sdda_flags flags; struct mmc_data *mmcdata; + struct cam_periph *periph; // sdda_quirks quirks; struct task start_init_task; - struct disk *disk; - uint32_t raw_csd[4]; + uint32_t raw_csd[4]; uint8_t raw_ext_csd[512]; /* MMC only? */ - struct mmc_csd csd; - struct mmc_cid cid; + struct mmc_csd csd; + struct mmc_cid cid; struct mmc_scr scr; - /* Calculated from CSD */ - uint64_t sector_count; - uint64_t mediasize; + /* Calculated from CSD */ + uint64_t sector_count; + uint64_t mediasize; - /* Calculated from CID */ + /* Calculated from CID */ char card_id_string[64];/* Formatted CID info (serial, MFG, etc) */ char card_sn_string[16];/* Formatted serial # for disk->d_ident */ /* Determined from CSD + is highspeed card*/ uint32_t card_f_max; + + /* Generic switch timeout */ + uint32_t cmd6_time; + /* MMC partitions support */ + struct sdda_part *part[MMC_PART_MAX]; + uint8_t part_curr; /* Partition currently switched to */ + uint8_t part_requested; /* What partition we're currently switching to */ + uint32_t part_time; /* Partition switch timeout [us] */ + off_t enh_base; /* Enhanced user data area slice base ... */ + off_t enh_size; /* ... and size [bytes] */ + int log_count; + struct timeval log_time; }; #define ccb_bp ppriv_ptr1 @@ -135,10 +166,27 @@ static int sddaerror(union ccb *ccb, u_int32_t cam_f u_int32_t sense_flags); static uint16_t get_rca(struct cam_periph *periph); -static cam_status sdda_hook_into_geom(struct cam_periph *periph); static void sdda_start_init(void *context, union ccb *start_ccb); static void sdda_start_init_task(void *context, int pending); +static void sdda_process_mmc_partitions(struct cam_periph *periph, union ccb *start_ccb); +static uint32_t sdda_get_host_caps(struct cam_periph *periph, union ccb *ccb); +static void sdda_init_switch_part(struct cam_periph *periph, union ccb *start_ccb, u_int part); +static inline uint32_t mmc_get_sector_size(struct cam_periph *periph) {return MMC_SECTOR_SIZE;} + +/* TODO: actually issue GET_TRAN_SETTINGS to get R/O status */ +static inline bool sdda_get_read_only(struct cam_periph *periph, union ccb *start_ccb) +{ + + return (false); +} + +static uint32_t mmc_get_spec_vers(struct cam_periph *periph); +static uint64_t mmc_get_media_size(struct cam_periph *periph); +static uint32_t mmc_get_cmd6_timeout(struct cam_periph *periph); +static void sdda_add_part(struct cam_periph *periph, u_int type, + const char *name, u_int cnt, off_t media_size, bool ro); + static struct periph_driver sddadriver = { sddainit, "sdda", @@ -364,11 +412,14 @@ mmc_format_card_id_string(struct sdda_softc *sc, struc static int sddaopen(struct disk *dp) { + struct sdda_part *part; struct cam_periph *periph; struct sdda_softc *softc; int error; - periph = (struct cam_periph *)dp->d_drv1; + part = (struct sdda_part *)dp->d_drv1; + softc = part->sc; + periph = softc->periph; if (cam_periph_acquire(periph) != 0) { return(ENXIO); } @@ -382,8 +433,7 @@ sddaopen(struct disk *dp) CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddaopen\n")); - softc = (struct sdda_softc *)periph->softc; - softc->flags |= SDDA_FLAG_OPEN; + part->flags |= SDDA_FLAG_OPEN; cam_periph_unhold(periph); cam_periph_unlock(periph); @@ -393,14 +443,14 @@ sddaopen(struct disk *dp) static int sddaclose(struct disk *dp) { + struct sdda_part *part; struct cam_periph *periph; struct sdda_softc *softc; -// union ccb *ccb; -// int error; - periph = (struct cam_periph *)dp->d_drv1; - softc = (struct sdda_softc *)periph->softc; - softc->flags &= ~SDDA_FLAG_OPEN; + part = (struct sdda_part *)dp->d_drv1; + softc = part->sc; + periph = softc->periph; + part->flags &= ~SDDA_FLAG_OPEN; cam_periph_lock(periph); @@ -417,9 +467,21 @@ static void sddaschedule(struct cam_periph *periph) { struct sdda_softc *softc = (struct sdda_softc *)periph->softc; + struct sdda_part *part; + struct bio *bp; + int i; /* Check if we have more work to do. */ - if (bioq_first(&softc->bio_queue)) { + /* Find partition that has outstanding commands. Prefer current partition. */ + bp = bioq_first(&softc->part[softc->part_curr]->bio_queue); + if (bp == NULL) { + for (i = 0; i < MMC_PART_MAX; i++) { + if ((part = softc->part[i]) != NULL && + (bp = bioq_first(&softc->part[i]->bio_queue)) != NULL) + break; + } + } + if (bp != NULL) { xpt_schedule(periph, CAM_PRIORITY_NORMAL); } } @@ -433,10 +495,12 @@ static void sddastrategy(struct bio *bp) { struct cam_periph *periph; + struct sdda_part *part; struct sdda_softc *softc; - periph = (struct cam_periph *)bp->bio_disk->d_drv1; - softc = (struct sdda_softc *)periph->softc; + part = (struct sdda_part *)bp->bio_disk->d_drv1; + softc = part->sc; + periph = softc->periph; cam_periph_lock(periph); @@ -454,7 +518,7 @@ sddastrategy(struct bio *bp) /* * Place it in the queue of disk activities for this disk */ - bioq_disksort(&softc->bio_queue, bp); + bioq_disksort(&part->bio_queue, bp); /* * Schedule ourselves for performing the work. @@ -490,8 +554,10 @@ static void sddadiskgonecb(struct disk *dp) { struct cam_periph *periph; + struct sdda_part *part; - periph = (struct cam_periph *)dp->d_drv1; + part = (struct sdda_part *)dp->d_drv1; + periph = part->sc->periph; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddadiskgonecb\n")); cam_periph_release(periph); @@ -501,6 +567,7 @@ static void sddaoninvalidate(struct cam_periph *periph) { struct sdda_softc *softc; + struct sdda_part *part; softc = (struct sdda_softc *)periph->softc; @@ -517,23 +584,35 @@ sddaoninvalidate(struct cam_periph *periph) * with XPT_ABORT_CCB. */ CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("bioq_flush start\n")); - bioq_flush(&softc->bio_queue, NULL, ENXIO); + for (int i = 0; i < MMC_PART_MAX; i++) { + if ((part = softc->part[i]) != NULL) { + bioq_flush(&part->bio_queue, NULL, ENXIO); + disk_gone(part->disk); + } + } CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("bioq_flush end\n")); - disk_gone(softc->disk); } static void sddacleanup(struct cam_periph *periph) { struct sdda_softc *softc; + struct sdda_part *part; + int i; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddacleanup\n")); softc = (struct sdda_softc *)periph->softc; cam_periph_unlock(periph); - disk_destroy(softc->disk); + for (i = 0; i < MMC_PART_MAX; i++) { + if ((part = softc->part[i]) != NULL) { + disk_destroy(part->disk); + free(part, M_DEVBUF); + softc->part[i] = NULL; + } + } free(softc, M_DEVBUF); cam_periph_lock(periph); } @@ -597,22 +676,24 @@ sddaasync(void *callback_arg, u_int32_t code, case AC_ADVINFO_CHANGED: { uintptr_t buftype; + int i; + CAM_DEBUG(path, CAM_DEBUG_TRACE, ("=> AC_ADVINFO_CHANGED\n")); buftype = (uintptr_t)arg; if (buftype == CDAI_TYPE_PHYS_PATH) { struct sdda_softc *softc; + struct sdda_part *part; softc = periph->softc; - disk_attr_changed(softc->disk, "GEOM::physpath", - M_NOWAIT); + for (i = 0; i < MMC_PART_MAX; i++) { + if ((part = softc->part[i]) != NULL) { + disk_attr_changed(part->disk, "GEOM::physpath", + M_NOWAIT); + } + } } break; } - case AC_SENT_BDR: - case AC_BUS_RESET: - { - CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("AC_BUS_RESET")); - } default: CAM_DEBUG(path, CAM_DEBUG_TRACE, ("=> default?!\n")); cam_periph_async(periph, code, path, arg); @@ -624,34 +705,35 @@ sddaasync(void *callback_arg, u_int32_t code, static int sddagetattr(struct bio *bp) { - int ret; struct cam_periph *periph; + struct sdda_softc *softc; + struct sdda_part *part; + int ret; - periph = (struct cam_periph *)bp->bio_disk->d_drv1; + part = (struct sdda_part *)bp->bio_disk->d_drv1; + softc = part->sc; + periph = softc->periph; cam_periph_lock(periph); ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, periph->path); cam_periph_unlock(periph); if (ret == 0) bp->bio_completed = bp->bio_length; - return ret; + return (ret); } static cam_status sddaregister(struct cam_periph *periph, void *arg) { struct sdda_softc *softc; -// struct ccb_pathinq cpi; struct ccb_getdev *cgd; -// char announce_buf[80], buf1[32]; -// caddr_t match; union ccb *request_ccb; /* CCB representing the probe request */ CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddaregister\n")); cgd = (struct ccb_getdev *)arg; if (cgd == NULL) { printf("sddaregister: no getdev CCB, can't register device\n"); - return(CAM_REQ_CMP_ERR); + return (CAM_REQ_CMP_ERR); } softc = (struct sdda_softc *)malloc(sizeof(*softc), M_DEVBUF, @@ -660,14 +742,14 @@ sddaregister(struct cam_periph *periph, void *arg) if (softc == NULL) { printf("sddaregister: Unable to probe new device. " "Unable to allocate softc\n"); - return(CAM_REQ_CMP_ERR); + return (CAM_REQ_CMP_ERR); } - bioq_init(&softc->bio_queue); softc->state = SDDA_STATE_INIT; softc->mmcdata = - (struct mmc_data *) malloc(sizeof(struct mmc_data), M_DEVBUF, M_NOWAIT|M_ZERO); + (struct mmc_data *)malloc(sizeof(struct mmc_data), M_DEVBUF, M_NOWAIT|M_ZERO); periph->softc = softc; + softc->periph = periph; request_ccb = (union ccb*) arg; xpt_schedule(periph, CAM_PRIORITY_XPT); @@ -677,100 +759,6 @@ sddaregister(struct cam_periph *periph, void *arg) return (CAM_REQ_CMP); } -static cam_status -sdda_hook_into_geom(struct cam_periph *periph) -{ - struct sdda_softc *softc; - struct ccb_pathinq cpi; - struct ccb_getdev cgd; - u_int maxio; - - softc = (struct sdda_softc*) periph->softc; - - xpt_path_inq(&cpi, periph->path); - - bzero(&cgd, sizeof(cgd)); - xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_GDEV_TYPE; - xpt_action((union ccb *)&cgd); - - /* - * Register this media as a disk - */ - (void)cam_periph_hold(periph, PRIBIO); - cam_periph_unlock(periph); - - softc->disk = disk_alloc(); - softc->disk->d_rotation_rate = 0; - softc->disk->d_devstat = devstat_new_entry(periph->periph_name, - periph->unit_number, 512, - DEVSTAT_ALL_SUPPORTED, - DEVSTAT_TYPE_DIRECT | - XPORT_DEVSTAT_TYPE(cpi.transport), - DEVSTAT_PRIORITY_DISK); - softc->disk->d_open = sddaopen; - softc->disk->d_close = sddaclose; - softc->disk->d_strategy = sddastrategy; - softc->disk->d_getattr = sddagetattr; -// softc->disk->d_dump = sddadump; - softc->disk->d_gone = sddadiskgonecb; - softc->disk->d_name = "sdda"; - softc->disk->d_drv1 = periph; - maxio = cpi.maxio; /* Honor max I/O size of SIM */ - if (maxio == 0) - maxio = DFLTPHYS; /* traditional default */ - else if (maxio > MAXPHYS) - maxio = MAXPHYS; /* for safety */ - softc->disk->d_maxsize = maxio; - softc->disk->d_unit = periph->unit_number; - softc->disk->d_flags = DISKFLAG_CANDELETE; - strlcpy(softc->disk->d_descr, softc->card_id_string, - MIN(sizeof(softc->disk->d_descr), sizeof(softc->card_id_string))); - strlcpy(softc->disk->d_ident, softc->card_sn_string, - MIN(sizeof(softc->disk->d_ident), sizeof(softc->card_sn_string))); - softc->disk->d_hba_vendor = cpi.hba_vendor; - softc->disk->d_hba_device = cpi.hba_device; - softc->disk->d_hba_subvendor = cpi.hba_subvendor; - softc->disk->d_hba_subdevice = cpi.hba_subdevice; - - softc->disk->d_sectorsize = 512; - softc->disk->d_mediasize = softc->mediasize; - softc->disk->d_stripesize = 0; - softc->disk->d_fwsectors = 0; - softc->disk->d_fwheads = 0; - - /* - * Acquire a reference to the periph before we register with GEOM. - * We'll release this reference once GEOM calls us back (via - * sddadiskgonecb()) telling us that our provider has been freed. - */ - if (cam_periph_acquire(periph) != 0) { - xpt_print(periph->path, "%s: lost periph during " - "registration!\n", __func__); - cam_periph_lock(periph); - return (CAM_REQ_CMP_ERR); - } - disk_create(softc->disk, DISK_VERSION); - cam_periph_lock(periph); - cam_periph_unhold(periph); - - xpt_announce_periph(periph, softc->card_id_string); - - /* - * Add async callbacks for bus reset and - * bus device reset calls. I don't bother - * checking if this fails as, in most cases, - * the system will function just fine without - * them and the only alternative would be to - * not attach the device on failure. - */ - xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | - AC_GETDEV_CHANGED | AC_ADVINFO_CHANGED, - sddaasync, periph, periph->path); - - return(CAM_REQ_CMP); -} - static int mmc_exec_app_cmd(struct cam_periph *periph, union ccb *ccb, struct mmc_command *cmd) { @@ -871,11 +859,8 @@ mmc_send_ext_csd(struct cam_periph *periph, union ccb err = cam_periph_runccb(ccb, sddaerror, CAM_FLAG_NONE, /*sense_flags*/0, NULL); if (err != 0) - return err; - if (!(ccb->mmcio.cmd.resp[0] & R1_APP_CMD)) - return MMC_ERR_FAILED; - - return MMC_ERR_NONE; + return (err); + return (MMC_ERR_NONE); } static void @@ -895,14 +880,15 @@ mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr * scr->bus_widths = mmc_get_bits(raw_scr, 64, 48, 4); } -static int -mmc_switch(struct cam_periph *periph, union ccb *ccb, - uint8_t set, uint8_t index, uint8_t value) +static inline void +mmc_switch_fill_mmcio(union ccb *ccb, + uint8_t set, uint8_t index, uint8_t value, u_int timeout) { int arg = (MMC_SWITCH_FUNC_WR << 24) | (index << 16) | (value << 8) | set; + cam_fill_mmcio(&ccb->mmcio, /*retries*/ 0, /*cbfcnp*/ NULL, @@ -911,25 +897,56 @@ mmc_switch(struct cam_periph *periph, union ccb *ccb, /*mmc_arg*/ arg, /*mmc_flags*/ MMC_RSP_R1B | MMC_CMD_AC, /*mmc_data*/ NULL, - /*timeout*/ 0); + /*timeout*/ timeout); +} +static int +mmc_switch(struct cam_periph *periph, union ccb *ccb, + uint8_t set, uint8_t index, uint8_t value, u_int timeout) +{ + + mmc_switch_fill_mmcio(ccb, set, index, value, timeout); cam_periph_runccb(ccb, sddaerror, CAM_FLAG_NONE, /*sense_flags*/0, NULL); if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP)) { if (ccb->mmcio.cmd.error != 0) { CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_PERIPH, ("%s: MMC command failed", __func__)); - return EIO; + return (EIO); } - return 0; /* Normal return */ + return (0); /* Normal return */ } else { CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_PERIPH, ("%s: CAM request failed\n", __func__)); - return EIO; + return (EIO); } } +static uint32_t +mmc_get_spec_vers(struct cam_periph *periph) { + struct sdda_softc *softc = (struct sdda_softc *)periph->softc; + + return (softc->csd.spec_vers); +} + +static uint64_t +mmc_get_media_size(struct cam_periph *periph) { + struct sdda_softc *softc = (struct sdda_softc *)periph->softc; + + return (softc->mediasize); +} + +static uint32_t +mmc_get_cmd6_timeout(struct cam_periph *periph) +{ + struct sdda_softc *softc = (struct sdda_softc *)periph->softc; + + if (mmc_get_spec_vers(periph) >= 6) + return (softc->raw_ext_csd[EXT_CSD_GEN_CMD6_TIME] * 10); + return (500 * 1000); +} + static int mmc_sd_switch(struct cam_periph *periph, union ccb *ccb, uint8_t mode, uint8_t grp, uint8_t value, @@ -976,6 +993,7 @@ mmc_set_timing(struct cam_periph *periph, u_char switch_res[64]; int err; uint8_t value; + struct sdda_softc *softc = (struct sdda_softc *)periph->softc; struct mmc_params *mmcp = &periph->path->device->mmc_ident_data; CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, @@ -992,7 +1010,7 @@ mmc_set_timing(struct cam_periph *periph, } if (mmcp->card_features & CARD_FEATURE_MMC) { err = mmc_switch(periph, ccb, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_HS_TIMING, value); + EXT_CSD_HS_TIMING, value, softc->cmd6_time); } else { err = mmc_sd_switch(periph, ccb, SD_SWITCH_MODE_SET, SD_SWITCH_GROUP1, value, switch_res); } @@ -1031,6 +1049,7 @@ sdda_start_init_task(void *context, int pending) { static void sdda_set_bus_width(struct cam_periph *periph, union ccb *ccb, int width) { + struct sdda_softc *softc = (struct sdda_softc *)periph->softc; struct mmc_params *mmcp = &periph->path->device->mmc_ident_data; int err; @@ -1053,7 +1072,7 @@ sdda_set_bus_width(struct cam_periph *periph, union cc panic("Invalid bus width %d", width); } err = mmc_switch(periph, ccb, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_BUS_WIDTH, value); + EXT_CSD_BUS_WIDTH, value, softc->cmd6_time); } else { /* For SD cards we send ACMD6 with the required bus width in arg */ struct mmc_command cmd; @@ -1081,22 +1100,71 @@ sdda_set_bus_width(struct cam_periph *periph, union cc xpt_action(ccb); } -static inline const char *bus_width_str(enum mmc_bus_width w) { +static inline const char +*part_type(u_int type) +{ + + switch (type) { + case EXT_CSD_PART_CONFIG_ACC_RPMB: + return ("RPMB"); + case EXT_CSD_PART_CONFIG_ACC_DEFAULT: + return ("default"); + case EXT_CSD_PART_CONFIG_ACC_BOOT0: + return ("boot0"); + case EXT_CSD_PART_CONFIG_ACC_BOOT1: + return ("boot1"); + case EXT_CSD_PART_CONFIG_ACC_GP0: + case EXT_CSD_PART_CONFIG_ACC_GP1: + case EXT_CSD_PART_CONFIG_ACC_GP2: + case EXT_CSD_PART_CONFIG_ACC_GP3: + return ("general purpose"); + default: + return ("(unknown type)"); + } +} + +static inline const char +*bus_width_str(enum mmc_bus_width w) +{ + switch (w) { case bus_width_1: - return "1-bit"; + return ("1-bit"); case bus_width_4: - return "4-bit"; + return ("4-bit"); case bus_width_8: - return "8-bit"; + return ("8-bit"); } } +static uint32_t +sdda_get_host_caps(struct cam_periph *periph, union ccb *ccb) +{ + struct ccb_trans_settings_mmc *cts; + + cts = &ccb->cts.proto_specific.mmc; + + ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + ccb->ccb_h.flags = CAM_DIR_NONE; + ccb->ccb_h.retry_count = 0; + ccb->ccb_h.timeout = 100; + ccb->ccb_h.cbfcnp = NULL; + xpt_action(ccb); + + if (ccb->ccb_h.status != CAM_REQ_CMP) + panic("Cannot get host caps"); + return (cts->host_caps); +} + static void -sdda_start_init(void *context, union ccb *start_ccb) { - struct cam_periph *periph; - periph = (struct cam_periph *)context; +sdda_start_init(void *context, union ccb *start_ccb) +{ + struct cam_periph *periph = (struct cam_periph *)context; + struct ccb_trans_settings_mmc *cts; + uint32_t host_caps; + uint32_t sec_count; int err; + int host_f_max; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sdda_start_init\n")); /* periph was held for us when this task was enqueued */ @@ -1113,10 +1181,16 @@ sdda_start_init(void *context, union ccb *start_ccb) { if (mmcp->card_features & CARD_FEATURE_MMC) { mmc_decode_csd_mmc(mmcp->card_csd, &softc->csd); mmc_decode_cid_mmc(mmcp->card_cid, &softc->cid); - if (softc->csd.spec_vers >= 4) + if (mmc_get_spec_vers(periph) >= 4) { err = mmc_send_ext_csd(periph, start_ccb, (uint8_t *)&softc->raw_ext_csd, sizeof(softc->raw_ext_csd)); + if (err != 0) { + CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, + ("Cannot read EXT_CSD, err %d", err)); + return; + } + } } else { mmc_decode_csd_sd(mmcp->card_csd, &softc->csd); mmc_decode_cid_sd(mmcp->card_cid, &softc->cid); @@ -1124,13 +1198,14 @@ sdda_start_init(void *context, union ccb *start_ccb) { softc->sector_count = softc->csd.capacity / 512; softc->mediasize = softc->csd.capacity; + softc->cmd6_time = mmc_get_cmd6_timeout(periph); /* MMC >= 4.x have EXT_CSD that has its own opinion about capacity */ - if (softc->csd.spec_vers >= 4) { - uint32_t sec_count = softc->raw_ext_csd[EXT_CSD_SEC_CNT] + - (softc->raw_ext_csd[EXT_CSD_SEC_CNT + 1] << 8) + - (softc->raw_ext_csd[EXT_CSD_SEC_CNT + 2] << 16) + - (softc->raw_ext_csd[EXT_CSD_SEC_CNT + 3] << 24); + if (mmc_get_spec_vers(periph) >= 4) { + sec_count = softc->raw_ext_csd[EXT_CSD_SEC_CNT] + + (softc->raw_ext_csd[EXT_CSD_SEC_CNT + 1] << 8) + + (softc->raw_ext_csd[EXT_CSD_SEC_CNT + 2] << 16) + + (softc->raw_ext_csd[EXT_CSD_SEC_CNT + 3] << 24); if (sec_count != 0) { softc->sector_count = sec_count; softc->mediasize = softc->sector_count * 512; @@ -1140,28 +1215,25 @@ sdda_start_init(void *context, union ccb *start_ccb) { } CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, - ("Capacity: %"PRIu64", sectors: %"PRIu64"\n", - softc->mediasize, - softc->sector_count)); + ("Capacity: %"PRIu64", sectors: %"PRIu64"\n", + softc->mediasize, + softc->sector_count)); mmc_format_card_id_string(softc, mmcp); /* Update info for CAM */ device->serial_num_len = strlen(softc->card_sn_string); - device->serial_num = - (u_int8_t *)malloc((device->serial_num_len + 1), - M_CAMXPT, M_NOWAIT); + device->serial_num = (u_int8_t *)malloc((device->serial_num_len + 1), + M_CAMXPT, M_NOWAIT); strlcpy(device->serial_num, softc->card_sn_string, device->serial_num_len); device->device_id_len = strlen(softc->card_id_string); - device->device_id = - (u_int8_t *)malloc((device->device_id_len + 1), - M_CAMXPT, M_NOWAIT); + device->device_id = (u_int8_t *)malloc((device->device_id_len + 1), + M_CAMXPT, M_NOWAIT); strlcpy(device->device_id, softc->card_id_string, device->device_id_len); strlcpy(mmcp->model, softc->card_id_string, sizeof(mmcp->model)); /* Set the clock frequency that the card can handle */ - struct ccb_trans_settings_mmc *cts; cts = &start_ccb->cts.proto_specific.mmc; /* First, get the host's max freq */ @@ -1174,8 +1246,8 @@ sdda_start_init(void *context, union ccb *start_ccb) { if (start_ccb->ccb_h.status != CAM_REQ_CMP) panic("Cannot get max host freq"); - int host_f_max = cts->host_f_max; - uint32_t host_caps = cts->host_caps; + host_f_max = cts->host_f_max; + host_caps = cts->host_caps; if (cts->ios.bus_width != bus_width_1) panic("Bus width in ios is not 1-bit"); @@ -1207,7 +1279,7 @@ sdda_start_init(void *context, union ccb *start_ccb) { } } - if (mmcp->card_features & CARD_FEATURE_MMC && softc->csd.spec_vers >= 4) { + if (mmcp->card_features & CARD_FEATURE_MMC && mmc_get_spec_vers(periph) >= 4) { if (softc->raw_ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_HS_52) softc->card_f_max = MMC_TYPE_HS_52_MAX; @@ -1260,47 +1332,365 @@ finish_hs_tests: if (err != MMC_ERR_NONE) CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("Cannot switch card to high-speed mode")); } + softc->state = SDDA_STATE_NORMAL; - sdda_hook_into_geom(periph); + + /* MMC partitions support */ + if (mmcp->card_features & CARD_FEATURE_MMC && mmc_get_spec_vers(periph) >= 4) { + sdda_process_mmc_partitions(periph, start_ccb); + } else if (mmcp->card_features & CARD_FEATURE_SD20) { + /* For SD[HC] cards, just add one partition that is the whole card */ + sdda_add_part(periph, 0, "sdda", + periph->unit_number, + mmc_get_media_size(periph), + sdda_get_read_only(periph, start_ccb)); + softc->part_curr = 0; + } + + xpt_announce_periph(periph, softc->card_id_string); + /* + * Add async callbacks for bus reset and bus device reset calls. + * I don't bother checking if this fails as, in most cases, + * the system will function just fine without them and the only + * alternative would be to not attach the device on failure. + */ + xpt_register_async(AC_LOST_DEVICE | AC_GETDEV_CHANGED | + AC_ADVINFO_CHANGED, sddaasync, periph, periph->path); } +static void +sdda_add_part(struct cam_periph *periph, u_int type, const char *name, + u_int cnt, off_t media_size, bool ro) +{ + struct sdda_softc *sc = (struct sdda_softc *)periph->softc; + struct sdda_part *part; + struct ccb_pathinq cpi; + u_int maxio; + + CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, + ("Partition type '%s', size %ju %s\n", + part_type(type), + media_size, + ro ? "(read-only)" : "")); + + part = sc->part[type] = malloc(sizeof(*part), M_DEVBUF, + M_WAITOK | M_ZERO); + + part->cnt = cnt; + part->type = type; + part->ro = ro; + part->sc = sc; + snprintf(part->name, sizeof(part->name), name, periph->unit_number); + + /* + * Due to the nature of RPMB partition it doesn't make much sense + * to add it as a disk. It would be more appropriate to create a + * userland tool to operate on the partition or leverage the existing + * tools from sysutils/mmc-utils. + */ + if (type == EXT_CSD_PART_CONFIG_ACC_RPMB) { + /* TODO: Create device, assign IOCTL handler */ + CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, + ("Don't know what to do with RPMB partitions yet\n")); + return; + } + + bioq_init(&part->bio_queue); + + bzero(&cpi, sizeof(cpi)); + xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE); + cpi.ccb_h.func_code = XPT_PATH_INQ; + xpt_action((union ccb *)&cpi); + + /* + * Register this media as a disk + */ + (void)cam_periph_hold(periph, PRIBIO); + cam_periph_unlock(periph); + + part->disk = disk_alloc(); + part->disk->d_rotation_rate = DISK_RR_NON_ROTATING; + part->disk->d_devstat = devstat_new_entry(part->name, + cnt, 512, + DEVSTAT_ALL_SUPPORTED, + DEVSTAT_TYPE_DIRECT | XPORT_DEVSTAT_TYPE(cpi.transport), + DEVSTAT_PRIORITY_DISK); + + part->disk->d_open = sddaopen; + part->disk->d_close = sddaclose; + part->disk->d_strategy = sddastrategy; + part->disk->d_getattr = sddagetattr; +// sc->disk->d_dump = sddadump; + part->disk->d_gone = sddadiskgonecb; + part->disk->d_name = part->name; + part->disk->d_drv1 = part; + maxio = cpi.maxio; /* Honor max I/O size of SIM */ + if (maxio == 0) + maxio = DFLTPHYS; /* traditional default */ + else if (maxio > MAXPHYS) + maxio = MAXPHYS; /* for safety */ + part->disk->d_maxsize = maxio; + part->disk->d_unit = cnt; + part->disk->d_flags = 0; + strlcpy(part->disk->d_descr, sc->card_id_string, + MIN(sizeof(part->disk->d_descr), sizeof(sc->card_id_string))); + strlcpy(part->disk->d_ident, sc->card_sn_string, + MIN(sizeof(part->disk->d_ident), sizeof(sc->card_sn_string))); + part->disk->d_hba_vendor = cpi.hba_vendor; + part->disk->d_hba_device = cpi.hba_device; + part->disk->d_hba_subvendor = cpi.hba_subvendor; + part->disk->d_hba_subdevice = cpi.hba_subdevice; + + part->disk->d_sectorsize = mmc_get_sector_size(periph); + part->disk->d_mediasize = media_size; + part->disk->d_stripesize = 0; + part->disk->d_fwsectors = 0; + part->disk->d_fwheads = 0; + + /* + * Acquire a reference to the periph before we register with GEOM. + * We'll release this reference once GEOM calls us back (via + * sddadiskgonecb()) telling us that our provider has been freed. + */ + if (cam_periph_acquire(periph) != 0) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + cam_periph_lock(periph); + return; + } + disk_create(part->disk, DISK_VERSION); + cam_periph_lock(periph); + cam_periph_unhold(periph); +} + +/* + * For MMC cards, process EXT_CSD and add partitions that are supported by + * this device. + */ +static void +sdda_process_mmc_partitions(struct cam_periph *periph, union ccb *ccb) +{ + struct sdda_softc *sc = (struct sdda_softc *)periph->softc; + struct mmc_params *mmcp = &periph->path->device->mmc_ident_data; + off_t erase_size, sector_size, size, wp_size; + int i; + const uint8_t *ext_csd; + uint8_t rev; + bool comp, ro; + + ext_csd = sc->raw_ext_csd; + + /* + * Enhanced user data area and general purpose partitions are only + * supported in revision 1.4 (EXT_CSD_REV == 4) and later, the RPMB + * partition in revision 1.5 (MMC v4.41, EXT_CSD_REV == 5) and later. + */ + rev = ext_csd[EXT_CSD_REV]; + + /* + * Ignore user-creatable enhanced user data area and general purpose + * partitions partitions as long as partitioning hasn't been finished. + */ + comp = (ext_csd[EXT_CSD_PART_SET] & EXT_CSD_PART_SET_COMPLETED) != 0; + + /* + * Add enhanced user data area slice, unless it spans the entirety of + * the user data area. The enhanced area is of a multiple of high + * capacity write protect groups ((ERASE_GRP_SIZE + HC_WP_GRP_SIZE) * + * 512 KB) and its offset given in either sectors or bytes, depending + * on whether it's a high capacity device or not. + * NB: The slicer and its slices need to be registered before adding + * the disk for the corresponding user data area as re-tasting is + * racy. + */ + sector_size = mmc_get_sector_size(periph); + size = ext_csd[EXT_CSD_ENH_SIZE_MULT] + + (ext_csd[EXT_CSD_ENH_SIZE_MULT + 1] << 8) + + (ext_csd[EXT_CSD_ENH_SIZE_MULT + 2] << 16); + if (rev >= 4 && comp == TRUE && size > 0 && + (ext_csd[EXT_CSD_PART_SUPPORT] & + EXT_CSD_PART_SUPPORT_ENH_ATTR_EN) != 0 && + (ext_csd[EXT_CSD_PART_ATTR] & (EXT_CSD_PART_ATTR_ENH_USR)) != 0) { + erase_size = ext_csd[EXT_CSD_ERASE_GRP_SIZE] * 1024 * + MMC_SECTOR_SIZE; + wp_size = ext_csd[EXT_CSD_HC_WP_GRP_SIZE]; + size *= erase_size * wp_size; + if (size != mmc_get_media_size(periph) * sector_size) { + sc->enh_size = size; + sc->enh_base = (ext_csd[EXT_CSD_ENH_START_ADDR] + + (ext_csd[EXT_CSD_ENH_START_ADDR + 1] << 8) + + (ext_csd[EXT_CSD_ENH_START_ADDR + 2] << 16) + + (ext_csd[EXT_CSD_ENH_START_ADDR + 3] << 24)) * + ((mmcp->card_features & CARD_FEATURE_SDHC) ? 1: MMC_SECTOR_SIZE); + } else + CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, + ("enhanced user data area spans entire device")); + } + + /* + * Add default partition. This may be the only one or the user + * data area in case partitions are supported. + */ + ro = sdda_get_read_only(periph, ccb); + sdda_add_part(periph, EXT_CSD_PART_CONFIG_ACC_DEFAULT, "sdda", + periph->unit_number, mmc_get_media_size(periph), ro); + sc->part_curr = EXT_CSD_PART_CONFIG_ACC_DEFAULT; + + if (mmc_get_spec_vers(periph) < 3) + return; + + /* Belatedly announce enhanced user data slice. */ + if (sc->enh_size != 0) { + CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, + ("enhanced user data area off 0x%jx size %ju bytes\n", + sc->enh_base, sc->enh_size)); + } + + /* + * Determine partition switch timeout (provided in units of 10 ms) + * and ensure it's at least 300 ms as some eMMC chips lie. + */ + sc->part_time = max(ext_csd[EXT_CSD_PART_SWITCH_TO] * 10 * 1000, + 300 * 1000); + + /* Add boot partitions, which are of a fixed multiple of 128 KB. */ + size = ext_csd[EXT_CSD_BOOT_SIZE_MULT] * MMC_BOOT_RPMB_BLOCK_SIZE; + if (size > 0 && (sdda_get_host_caps(periph, ccb) & MMC_CAP_BOOT_NOACC) == 0) { + sdda_add_part(periph, EXT_CSD_PART_CONFIG_ACC_BOOT0, + SDDA_FMT_BOOT, 0, size, + ro | ((ext_csd[EXT_CSD_BOOT_WP_STATUS] & + EXT_CSD_BOOT_WP_STATUS_BOOT0_MASK) != 0)); + sdda_add_part(periph, EXT_CSD_PART_CONFIG_ACC_BOOT1, + SDDA_FMT_BOOT, 1, size, + ro | ((ext_csd[EXT_CSD_BOOT_WP_STATUS] & + EXT_CSD_BOOT_WP_STATUS_BOOT1_MASK) != 0)); + } + + /* Add RPMB partition, which also is of a fixed multiple of 128 KB. */ + size = ext_csd[EXT_CSD_RPMB_MULT] * MMC_BOOT_RPMB_BLOCK_SIZE; + if (rev >= 5 && size > 0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed May 23 00:30:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADEF3EE773E; Wed, 23 May 2018 00:30:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 467F56FA2A; Wed, 23 May 2018 00:30:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 0C113181A8; Wed, 23 May 2018 00:30:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 68CE07CCB; Wed, 23 May 2018 00:30:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id Iz0FxV2x8nw2; Wed, 23 May 2018 00:30:26 +0000 (UTC) Subject: Re: svn commit: r334008 - head/bin/sh DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 56D177CC6 To: "O. Hartmann" , Cy Schubert , David Wolfskill Cc: Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> <201805220445.w4M4jroR019550@slippy.cwsent.com> <20180522101737.52e76c0f@freyja.zeit4.iv.bundesimmobilien.de> <20180522202259.GA44110@stack.nl> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: Date: Tue, 22 May 2018 17:30:18 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180522202259.GA44110@stack.nl> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h9FUzeznMmrfYkSnvursw8TAsp9pdqrTw" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 00:30:36 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --h9FUzeznMmrfYkSnvursw8TAsp9pdqrTw Content-Type: multipart/mixed; boundary="WB3TjWEFzLLIxfVKLj9vFmXhc1Ab8AkDB"; protected-headers="v1" From: Bryan Drewery To: "O. Hartmann" , Cy Schubert , David Wolfskill Cc: Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r334008 - head/bin/sh References: <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> <201805220445.w4M4jroR019550@slippy.cwsent.com> <20180522101737.52e76c0f@freyja.zeit4.iv.bundesimmobilien.de> <20180522202259.GA44110@stack.nl> In-Reply-To: <20180522202259.GA44110@stack.nl> --WB3TjWEFzLLIxfVKLj9vFmXhc1Ab8AkDB Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/22/2018 1:22 PM, Jilles Tjoelker wrote: > On Tue, May 22, 2018 at 10:17:41AM +0200, O. Hartmann wrote: >> On Mon, 21 May 2018 21:45:53 -0700 >> Cy Schubert wrote: >>> In message <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.= de> >>> , "O. H >>> artmann" writes: >>>> On Mon, 21 May 2018 21:52:48 +0000 (UTC) >>>> Jilles Tjoelker wrote: >=20 >>>>> Author: jilles >>>>> Date: Mon May 21 21:52:48 2018 >>>>> New Revision: 334008 >>>>> URL: https://svnweb.freebsd.org/changeset/base/334008 >=20 >>>>> Log: >>>>> sh: Split CNL syntax category to avoid a check on state[level].sy= ntax >=20 >>>>> No functional change is intended. >=20 >>>>> Modified: >>>>> head/bin/sh/mksyntax.c >>>>> head/bin/sh/parser.c >> [snip] >=20 >>>> Have this been tested? Doesn't compile for me: >=20 >>>> [...] >>>> Building /usr/obj/usr/src/amd64.amd64/kerberos5/libexec/hprop/hprop >>>> --- all_subdir_rescue --- >>>> --- parser.o --- >>>> /usr/src/bin/sh/parser.c:1440:9: error: use of undeclared identifier= 'CQNL' >>>> case CQNL: >>>> ^ >>>> --- all_subdir_gnu --- >>>> Building /usr/obj/usr/src/amd64.amd64/gnu/usr.bin/gdb/libgdb/amd64bs= d-nat.o >>>> --- all_subdir_rescue --- >>>> 1 error generated. >>>> *** [parser.o] Error code 1 >=20 >>>> make[6]: stopped in /usr/src/bin/sh >=20 >>> CQNL is defined in /usr/obj/opt/src/svn-current/amd64.amd64/bin/sh/sy= nta >>> x.h, generated by mksyntax. >=20 >>> slippy$ ag -s CQNL /export/obj/opt/src/svn-current/amd64.amd64/bin/sh= /*. >>> h >>> /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/syntax.h >>> 11:#define CQNL 2 /* newline character in quotes */ >>> slippy$=20 >=20 >>> Remove the file if it's not defined in your syntax.h. >=20 >>> Just out of interest, do you use meta mode? >=20 >> I think such a question is of common interest if errors/bugs like that= occur: >> Yes, I use/compile world/kernel with META mode. >=20 > The change itself is fine. It built for me and for Jenkins > (ci.freebsd.org). What is not fine is an incremental build with meta > mode. Apparently, the syntax.h: .NOMETA rule added in r301285 causes > bmake to build some files against the old syntax.h, even though syntax.= c > and syntax.h will be rebuilt. >=20 > To fix this, it may be possible to generate a meta file for syntax.h > based on the one for syntax.c. The same would be done for builtins.[ch]= > and nodes.[ch]. >=20 > Conceptually simpler is accepting what make would like: one command > generates one file only. This is not really new with meta mode since a Yeah bmake (both with and without meta mode) is lacking in properly handling 1 target generating multiple files. It's a big frustration of mine as every pattern I've seen does not do the right thing. I'll look into this case more. For now just remove the syntax.h file from the objdir or remove the bin/sh dir. > somewhat ugly .ORDER declaration had been necessary before. The .c > content can go inside a #ifdef in the .h file so the .c file need not b= e > autogenerated, or the tools can be run twice, once to generate the .c > file and once to generate the .h file. In both cases, the tools will be= > somewhat uglier in order to simplify the build system. >=20 --=20 Regards, Bryan Drewery --WB3TjWEFzLLIxfVKLj9vFmXhc1Ab8AkDB-- --h9FUzeznMmrfYkSnvursw8TAsp9pdqrTw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJbBLYgAAoJEDXXcbtuRpfPVIkIAMdoeA7RIHx10dc871Y0oaj5 jVPhSYe7xF5f22qXiA6h1aV0lQ6c/oYZ1xuzLEWyP4sawrDQgHp086fyLYJBlBh1 wOQAgWltk08hblar3K1qDITrhpkgxPUgo9nYw/XlSfIOM7GoSMDmIaTirXWYsSDW TTiox3MRr88FGyYzPdfEKysiT/OBwWueY4oNFuDSEv3L16RXAezjq2IuLmNzJE+6 s/W2S2ZfD7g4F5OE6nahyIJ03m292F71TzrExreIQr1I8nTOsyZ+yeNpBsvXn4xO 8ZlbrvdRih/6MvLy7NO00i5MLD/jIIhkKk3W7N8Vkdtrw2BJpSe+NQAteI35F04= =kZ3o -----END PGP SIGNATURE----- --h9FUzeznMmrfYkSnvursw8TAsp9pdqrTw-- From owner-svn-src-head@freebsd.org Wed May 23 01:20:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E1A4EE886E; Wed, 23 May 2018 01:20:32 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 210A370D56; Wed, 23 May 2018 01:20:32 +0000 (UTC) (envelope-from phil@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01C531BDF8; Wed, 23 May 2018 01:20:32 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N1KVcM069969; Wed, 23 May 2018 01:20:31 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N1KVdK069965; Wed, 23 May 2018 01:20:31 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201805230120.w4N1KVdK069965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Wed, 23 May 2018 01:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334068 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/doc/_static contrib/libxo/doc/_templates contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved con... X-SVN-Group: head X-SVN-Commit-Author: phil X-SVN-Commit-Paths: in head: contrib/libxo contrib/libxo/doc contrib/libxo/doc/_static contrib/libxo/doc/_templates contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/tests/gettext/... X-SVN-Commit-Revision: 334068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 01:20:32 -0000 Author: phil Date: Wed May 23 01:20:31 2018 New Revision: 334068 URL: https://svnweb.freebsd.org/changeset/base/334068 Log: Import libxo-0.9.0: - Add xo_format_is_numeric() with improved logic to decide if format strings are numeric, so json output quotes them - Convert docs to sphinx/rst - update tests Includes fix for PR 221676: https://github.com/Juniper/libxo/commit/27d3021cc3cc8cfbe9ddee5930cd7a9afea8f68f#diff-5a0d468963477f7daedb8308c219dd80 PR: 221676 MFC after: 5 days Added: head/contrib/libxo/doc/_static/ - copied from r334067, vendor/Juniper/libxo/dist/doc/_static/ head/contrib/libxo/doc/_templates/ - copied from r334067, vendor/Juniper/libxo/dist/doc/_templates/ head/contrib/libxo/doc/api.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/api.rst head/contrib/libxo/doc/conf.py - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/conf.py head/contrib/libxo/doc/example.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/example.rst head/contrib/libxo/doc/faq.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/faq.rst head/contrib/libxo/doc/field-formatting.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/field-formatting.rst head/contrib/libxo/doc/field-modifiers.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/field-modifiers.rst head/contrib/libxo/doc/field-roles.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/field-roles.rst head/contrib/libxo/doc/format-strings.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/format-strings.rst head/contrib/libxo/doc/formatting.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/formatting.rst head/contrib/libxo/doc/getting.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/getting.rst head/contrib/libxo/doc/howto.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/howto.rst head/contrib/libxo/doc/index.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/index.rst head/contrib/libxo/doc/intro.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/intro.rst head/contrib/libxo/doc/options.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/options.rst head/contrib/libxo/doc/xo.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/xo.rst head/contrib/libxo/doc/xohtml.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/xohtml.rst head/contrib/libxo/doc/xolint.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/xolint.rst head/contrib/libxo/doc/xopo.rst - copied unchanged from r334067, vendor/Juniper/libxo/dist/doc/xopo.rst Modified: head/contrib/libxo/configure.ac head/contrib/libxo/doc/Makefile.am head/contrib/libxo/doc/libxo-manual.html head/contrib/libxo/libxo/libxo.c head/contrib/libxo/tests/core/saved/test_01.E.out head/contrib/libxo/tests/core/saved/test_01.H.out head/contrib/libxo/tests/core/saved/test_01.HIPx.out head/contrib/libxo/tests/core/saved/test_01.HP.out head/contrib/libxo/tests/core/saved/test_01.J.out head/contrib/libxo/tests/core/saved/test_01.JP.out head/contrib/libxo/tests/core/saved/test_01.T.out head/contrib/libxo/tests/core/saved/test_01.X.out head/contrib/libxo/tests/core/saved/test_01.XP.out head/contrib/libxo/tests/core/saved/test_12.J.out head/contrib/libxo/tests/core/saved/test_12.JP.out head/contrib/libxo/tests/core/test_01.c head/contrib/libxo/tests/gettext/saved/gt_01.J.out head/contrib/libxo/tests/gettext/saved/gt_01.JP.out head/lib/libxo/add.man head/lib/libxo/xo_config.h head/usr.bin/xohtml/xohtml.sh Directory Properties: head/contrib/libxo/ (props changed) Modified: head/contrib/libxo/configure.ac ============================================================================== --- head/contrib/libxo/configure.ac Wed May 23 01:12:39 2018 (r334067) +++ head/contrib/libxo/configure.ac Wed May 23 01:20:31 2018 (r334068) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.8.4], [phil@juniper.net]) +AC_INIT([libxo], [0.9.0], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: head/contrib/libxo/doc/Makefile.am ============================================================================== --- head/contrib/libxo/doc/Makefile.am Wed May 23 01:12:39 2018 (r334067) +++ head/contrib/libxo/doc/Makefile.am Wed May 23 01:20:31 2018 (r334068) @@ -68,3 +68,8 @@ else doc docs: @${ECHO} "The 'oxtradoc' tool is not installed; see libslax.org" endif + +SPHINX = python3.4 -msphinx + +html sphinx sphinx-html: + ${SPHINX} -M html ${srcdir} . Copied: head/contrib/libxo/doc/api.rst (from r334067, vendor/Juniper/libxo/dist/doc/api.rst) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libxo/doc/api.rst Wed May 23 01:20:31 2018 (r334068, copy of r334067, vendor/Juniper/libxo/dist/doc/api.rst) @@ -0,0 +1,1620 @@ +.. index: API + +The libxo API +============= + +This section gives details about the functions in libxo, how to call +them, and the actions they perform. + +.. index:: Handles +.. _handles: + +Handles +------- + +libxo uses "handles" to control its rendering functionality. The +handle contains state and buffered data, as well as callback functions +to process data. + +Handles give an abstraction for libxo that encapsulates the state of a +stream of output. Handles have the data type "`xo_handle_t`" and are +opaque to the caller. + +The library has a default handle that is automatically initialized. +By default, this handle will send text style output (`XO_STYLE_TEXT`) to +standard output. The xo_set_style and xo_set_flags functions can be +used to change this behavior. + +For the typical command that is generating output on standard output, +there is no need to create an explicit handle, but they are available +when needed, e.g., for daemons that generate multiple streams of +output. + +Many libxo functions take a handle as their first parameter; most that +do not use the default handle. Any function taking a handle can be +passed NULL to access the default handle. For the convenience of +callers, the libxo library includes handle-less functions that +implicitly use the default handle. + +For example, the following are equivalent:: + + xo_emit("test"); + xo_emit_h(NULL, "test"); + +Handles are created using `xo_create` and destroy using +`xo_destroy`. + +.. index:: xo_create + +xo_create +~~~~~~~~~ + +.. c:function:: xo_handle_t *xo_create (xo_style_t style, xo_xof_flags_t flags) + + The `xo_create` function allocates a new handle which can be passed + to further libxo function calls. The `xo_handle_t` structure is + opaque. + + :param xo_style_t style: Output style (XO_STYLE\_*) + :param xo_xof_flags_t flags: Flags for this handle (XOF\_*) + :return: New libxo handle + :rtype: xo_handle_t \* + + :: + + EXAMPLE: + xo_handle_t *xop = xo_create(XO_STYLE_JSON, XOF_WARN | XOF_PRETTY); + .... + xo_emit_h(xop, "testing\n"); + + See also :ref:`output-styles` and :ref:`flags`. + +.. index:: xo_create_to_file +.. index:: XOF_CLOSE_FP + +xo_create_to_file +~~~~~~~~~~~~~~~~~ + +.. c:function:: + xo_handle_t *xo_create_to_file (FILE *fp, unsigned style, unsigned flags) + + The `xo_create_to_file` function is aconvenience function is + provided for situations when output should be written to a different + file, rather than the default of standard output. + + The `XOF_CLOSE_FP` flag can be set on the returned handle to trigger a + call to fclose() for the FILE pointer when the handle is destroyed, + avoiding the need for the caller to perform this task. + + :param fp: FILE to use as base for this handle + :type fp: FILE * + :param xo_style_t style: Output style (XO_STYLE\_*) + :param xo_xof_flags_t flags: Flags for this handle (XOF\_*) + :return: New libxo handle + :rtype: xo_handle_t \* + +.. index:: xo_set_writer +.. index:: xo_write_func_t +.. index:: xo_close_func_t +.. index:: xo_flush_func_t + +xo_set_writer +~~~~~~~~~~~~~ + +.. c:function:: + void xo_set_writer (xo_handle_t *xop, void *opaque, \ + xo_write_func_t write_func, xo_close_func_t close_func, \ + xo_flush_func_t flush_func) + + The `xo_set_writer` function allows custom functions which can + tailor how libxo writes data. The `opaque` argument is recorded and + passed back to the functions, allowing the function to acquire + context information. The *write_func* function writes data to the + output stream. The *close_func* function can release this opaque + data and any other resources as needed. The *flush_func* function + is called to flush buffered data associated with the opaque object. + + :param xop: Handle to modify (or NULL for default handle) + :type xop: xo_handle_t * + :param opaque: Pointer to opaque data passed to the given functions + :type opaque: void * + :param xo_write_func_t write_func: New write function + :param xo_close_func_t close_func: New close function + :param xo_flush_func_t flush_func: New flush function + :returns: void + +.. index:: xo_get_style + +xo_get_style +~~~~~~~~~~~~ + +.. c:function:: xo_style_t xo_get_style(xo_handle_t *xop) + + Use the `xo_get_style` function to find the current output style for + a given handle. To use the default handle, pass a `NULL` handle. + + :param xop: Handle to interrogate (or NULL for default handle) + :type xop: xo_handle_t * + :returns: Output style (XO_STYLE\_*) + :rtype: xo_style_t + + :: + + EXAMPLE:: + style = xo_get_style(NULL); + +.. index:: XO_STYLE_TEXT +.. index:: XO_STYLE_XML +.. index:: XO_STYLE_JSON +.. index:: XO_STYLE_HTML + +.. _output-styles: + +Output Styles (XO_STYLE\_\*) +++++++++++++++++++++++++++++ + +The libxo functions accept a set of output styles: + +=============== ========================= + Flag Description +=============== ========================= + XO_STYLE_TEXT Traditional text output + XO_STYLE_XML XML encoded data + XO_STYLE_JSON JSON encoded data + XO_STYLE_HTML HTML encoded data +=============== ========================= + +The "XML", "JSON", and "HTML" output styles all use the UTF-8 +character encoding. "TEXT" using locale-based encoding. + +.. index:: xo_set_style + +xo_set_style +~~~~~~~~~~~~ + +.. c:function:: void xo_set_style(xo_handle_t *xop, xo_style_t style) + + The `xo_set_style` function is used to change the output style + setting for a handle. To use the default handle, pass a `NULL` + handle. + + :param xop: Handle to modify + :type xop: xo_handle_t * + :param xo_style_t style: Output style (XO_STYLE\_*) + :returns: void + + :: + + EXAMPLE: + xo_set_style(NULL, XO_STYLE_XML); + +.. index:: xo_set_style_name + +xo_set_style_name +~~~~~~~~~~~~~~~~~ + +.. c:function:: int xo_set_style_name (xo_handle_t *xop, const char *style) + + The `xo_set_style_name` function can be used to set the style based + on a name encoded as a string: The name can be any of the supported + styles: "text", "xml", "json", or "html". + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + :param style: Text name of the style + :type style: const char \* + :returns: zero for success, non-zero for error + :rtype: int + + :: + + EXAMPLE: + xo_set_style_name(NULL, "html"); + +.. index:: xo_set_flags + +xo_set_flags +~~~~~~~~~~~~ + +.. c:function:: void xo_set_flags(xo_handle_t *xop, xo_xof_flags_t flags) + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + :param xo_xof_flags_t flags: Flags to add for the handle + :returns: void + + Use the `xo_set_flags` function to turn on flags for a given libxo + handle. To use the default handle, pass a `NULL` handle. + + :: + + EXAMPLE: + xo_set_flags(NULL, XOF_PRETTY | XOF_WARN); + +.. index:: Flags; XOF_* +.. index:: XOF_CLOSE_FP +.. index:: XOF_COLOR +.. index:: XOF_COLOR_ALLOWED +.. index:: XOF_DTRT +.. index:: XOF_INFO +.. index:: XOF_KEYS +.. index:: XOF_NO_ENV +.. index:: XOF_NO_HUMANIZE +.. index:: XOF_PRETTY +.. index:: XOF_UNDERSCORES +.. index:: XOF_UNITS +.. index:: XOF_WARN +.. index:: XOF_WARN_XML +.. index:: XOF_XPATH +.. index:: XOF_COLUMNS +.. index:: XOF_FLUSH + +.. _flags: + +Flags (XOF\_\*) ++++++++++++++++ + +The set of valid flags include: + +=================== ========================================= + Flag Description +=================== ========================================= + XOF_CLOSE_FP Close file pointer on `xo_destroy` + XOF_COLOR Enable color and effects in output + XOF_COLOR_ALLOWED Allow color/effect for terminal output + XOF_DTRT Enable "do the right thing" mode + XOF_INFO Display info data attributes (HTML) + XOF_KEYS Emit the key attribute (XML) + XOF_NO_ENV Do not use the :ref:`libxo-options` env var + XOF_NO_HUMANIZE Display humanization (TEXT, HTML) + XOF_PRETTY Make "pretty printed" output + XOF_UNDERSCORES Replaces hyphens with underscores + XOF_UNITS Display units (XML, HMTL) + XOF_WARN Generate warnings for broken calls + XOF_WARN_XML Generate warnings in XML on stdout + XOF_XPATH Emit XPath expressions (HTML) + XOF_COLUMNS Force xo_emit to return columns used + XOF_FLUSH Flush output after each `xo_emit` call +=================== ========================================= + +The `XOF_CLOSE_FP` flag will trigger the call of the *close_func* +(provided via `xo_set_writer`) when the handle is destroyed. + +The `XOF_COLOR` flag enables color and effects in output regardless +of output device, while the `XOF_COLOR_ALLOWED` flag allows color +and effects only if the output device is a terminal. + +The `XOF_PRETTY` flag requests "pretty printing", which will trigger +the addition of indentation and newlines to enhance the readability of +XML, JSON, and HTML output. Text output is not affected. + +The `XOF_WARN` flag requests that warnings will trigger diagnostic +output (on standard error) when the library notices errors during +operations, or with arguments to functions. Without warnings enabled, +such conditions are ignored. + +Warnings allow developers to debug their interaction with libxo. +The function `xo_failure` can used as a breakpoint for a debugger, +regardless of whether warnings are enabled. + +If the style is `XO_STYLE_HTML`, the following additional flags can be +used: + +=============== ========================================= + Flag Description +=============== ========================================= + XOF_XPATH Emit "data-xpath" attributes + XOF_INFO Emit additional info fields +=============== ========================================= + +The `XOF_XPATH` flag enables the emission of XPath expressions detailing +the hierarchy of XML elements used to encode the data field, if the +XPATH style of output were requested. + +The `XOF_INFO` flag encodes additional informational fields for HTML +output. See :ref:`field-information` for details. + +If the style is `XO_STYLE_XML`, the following additional flags can be +used: + +=============== ========================================= + Flag Description +=============== ========================================= + XOF_KEYS Flag "key" fields for XML +=============== ========================================= + +The `XOF_KEYS` flag adds "key" attribute to the XML encoding for +field definitions that use the "k" modifier. The key attribute has +the value "key":: + + xo_emit("{k:name}", item); + + XML: + truck + +.. index:: xo_clear_flags + +xo_clear_flags +++++++++++++++ + +.. c:function:: void xo_clear_flags (xo_handle_t *xop, xo_xof_flags_t flags) + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + :param xo_xof_flags_t flags: Flags to clear for the handle + :returns: void + + Use the `xo_clear_flags` function to turn off the given flags in a + specific handle. To use the default handle, pass a `NULL` handle. + +.. index:: xo_set_options + +xo_set_options +++++++++++++++ + +.. c:function:: int xo_set_options (xo_handle_t *xop, const char *input) + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + :param input: string containing options to set + :type input: const char * + :returns: zero for success, non-zero for error + :rtype: int + + The `xo_set_options` function accepts a comma-separated list of + output styles and modifier flags and enables them for a specific + handle. The options are identical to those listed in + :ref:`options`. To use the default handle, pass a `NULL` handle. + +.. index:: xo_destroy + +xo_destroy +++++++++++ + +.. c:function:: void xo_destroy(xo_handle_t *xop) + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + :returns: void + + The `xo_destroy` function releases a handle and any resources it is + using. Calling `xo_destroy` with a `NULL` handle will release any + resources associated with the default handle. + +.. index:: xo_emit + +Emitting Content (xo_emit) +-------------------------- + +The functions in this section are used to emit output. + +The "fmt" argument is a string containing field descriptors as +specified in :ref:`format-strings`. The use of a handle is optional and +`NULL` can be passed to access the internal "default" handle. See +:ref:`handles`. + +The remaining arguments to `xo_emit` and `xo_emit_h` are a set of +arguments corresponding to the fields in the format string. Care must +be taken to ensure the argument types match the fields in the format +string, since an inappropriate cast can ruin your day. The vap +argument to `xo_emit_hv` points to a variable argument list that can +be used to retrieve arguments via `va_arg`. + +.. c:function:: int xo_emit (const char *fmt, ...) + + :param fmt: The format string, followed by zero or more arguments + :returns: If XOF_COLUMNS is set, the number of columns used; otherwise the number of bytes emitted + :rtype: int + +.. c:function:: int xo_emit_h (xo_handle_t *xop, const char *fmt, ...) + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + :param fmt: The format string, followed by zero or more arguments + :returns: If XOF_COLUMNS is set, the number of columns used; otherwise the number of bytes emitted + :rtype: int + +.. c:function:: int xo_emit_hv (xo_handle_t *xop, const char *fmt, va_list vap) + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + :param fmt: The format string + :param va_list vap: A set of variadic arguments + :returns: If XOF_COLUMNS is set, the number of columns used; otherwise the number of bytes emitted + :rtype: int + +.. index:: xo_emit_field + +Single Field Emitting Functions (xo_emit_field) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The functions in this section can also make output, but only make a +single field at a time. These functions are intended to avoid the +scenario where one would otherwise need to compose a format +descriptors using `snprintf`. The individual parts of the format +descriptor are passed in distinctly. + +.. c:function:: int xo_emit_field (const char *rolmod, const char *contents, const char *fmt, const char *efmt, ...) + + :param rolmod: A comma-separated list of field roles and field modifiers + :type rolmod: const char * + :param contents: The "contents" portion of the field description string + :type contents: const char * + :param fmt: Content format string + :type fmt: const char * + :param efmt: Encoding format string, followed by additional arguments + :type efmt: const char * + :returns: If XOF_COLUMNS is set, the number of columns used; otherwise the number of bytes emitted + :rtype: int + + :: + + EXAMPLE:: + xo_emit_field("T", "Host name is ", NULL, NULL); + xo_emit_field("V", "host-name", NULL, NULL, host-name); + +.. c:function:: int xo_emit_field_h (xo_handle_t *xop, const char *rolmod, const char *contents, const char *fmt, const char *efmt, ...) + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + :param rolmod: A comma-separated list of field roles and field modifiers + :type rolmod: const char * + :param contents: The "contents" portion of the field description string + :type contents: const char * + :param fmt: Content format string + :type fmt: const char * + :param efmt: Encoding format string, followed by additional arguments + :type efmt: const char * + :returns: If XOF_COLUMNS is set, the number of columns used; otherwise the number of bytes emitted + :rtype: int + +.. c:function:: int xo_emit_field_hv (xo_handle_t *xop, const char *rolmod, const char *contents, const char *fmt, const char *efmt, va_list vap) + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + :param rolmod: A comma-separated list of field roles and field modifiers + :type rolmod: const char * + :param contents: The "contents" portion of the field description string + :type contents: const char * + :param fmt: Content format string + :type fmt: const char * + :param efmt: Encoding format string + :type efmt: const char * + :param va_list vap: A set of variadic arguments + :returns: If XOF_COLUMNS is set, the number of columns used; otherwise the number of bytes emitted + :rtype: int + +.. index:: xo_attr +.. _xo_attr: + +Attributes (xo_attr) +~~~~~~~~~~~~~~~~~~~~ + +The functions in this section emit an XML attribute with the given name +and value. This only affects the XML output style. + +The `name` parameter give the name of the attribute to be encoded. The +`fmt` parameter gives a printf-style format string used to format the +value of the attribute using any remaining arguments, or the vap +parameter passed to `xo_attr_hv`. + +All attributes recorded via `xo_attr` are placed on the next +container, instance, leaf, or leaf list that is emitted. + +Since attributes are only emitted in XML, their use should be limited +to meta-data and additional or redundant representations of data +already emitted in other form. + +.. c:function:: int xo_attr (const char *name, const char *fmt, ...) + + :param name: Attribute name + :type name: const char * + :param fmt: Attribute value, as variadic arguments + :type fmt: const char * + :returns: -1 for error, or the number of bytes in the formatted attribute value + :rtype: int + + :: + + EXAMPLE: + xo_attr("seconds", "%ld", (unsigned long) login_time); + struct tm *tmp = localtime(login_time); + strftime(buf, sizeof(buf), "%R", tmp); + xo_emit("Logged in at {:login-time}\n", buf); + XML: + 00:14 + + +.. c:function:: int xo_attr_h (xo_handle_t *xop, const char *name, const char *fmt, ...) + + :param xop: Handle for modify (or NULL for default handle) + :type xop: xo_handle_t \* + + The `xo_attr_h` function follows the conventions of `xo_attr` but + adds an explicit libxo handle. + +.. c:function:: int xo_attr_hv (xo_handle_t *xop, const char *name, const char *fmt, va_list vap) + + The `xo_attr_h` function follows the conventions of `xo_attr_h` + but replaced the variadic list with a variadic pointer. + +.. index:: xo_flush + +Flushing Output (xo_flush) +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. c:function:: xo_ssize_t xo_flush (void) + + :returns: -1 for error, or the number of bytes generated + :rtype: xo_ssize_t + + libxo buffers data, both for performance and consistency, but also + to allow for the proper function of various advanced features. At + various times, the caller may wish to flush any data buffered within + the library. The `xo_flush` call is used for this. + + Calling `xo_flush` also triggers the flush function associated with + the handle. For the default handle, this is equivalent to + "fflush(stdio);". + +.. c:function:: xo_ssize_t xo_flush_h (xo_handle_t *xop) + + :param xop: Handle for flush (or NULL for default handle) + :type xop: xo_handle_t \* + :returns: -1 for error, or the number of bytes generated + :rtype: xo_ssize_t + + The `xo_flush_h` function follows the conventions of `xo_flush`, + but adds an explicit libxo handle. + +.. index:: xo_finish +.. index:: xo_finish_atexit +.. index:: atexit + +Finishing Output (xo_finish) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When the program is ready to exit or close a handle, a call to +`xo_finish` or `xo_finish_h` is required. This flushes any buffered +data, closes open libxo constructs, and completes any pending +operations. + +Calling this function is vital to the proper operation of libxo, +especially for the non-TEXT output styles. + +.. c:function:: xo_ssize_t xo_finish (void) + + :returns: -1 on error, or the number of bytes flushed + :rtype: xo_ssize_t + +.. c:function:: xo_ssize_t xo_finish_h (xo_handle_t *xop) + + :param xop: Handle for finish (or NULL for default handle) + :type xop: xo_handle_t \* + :returns: -1 on error, or the number of bytes flushed + :rtype: xo_ssize_t + +.. c:function:: void xo_finish_atexit (void) + + The `xo_finish_atexit` function is suitable for use with + :manpage:`atexit(3)` to ensure that `xo_finish` is called + on the default handle when the application exits. + +.. index:: UTF-8 +.. index:: xo_open_container +.. index:: xo_close_container + +Emitting Hierarchy +------------------ + +libxo represents two types of hierarchy: containers and lists. A +container appears once under a given parent where a list consists of +instances that can appear multiple times. A container is used to hold +related fields and to give the data organization and scope. + +.. index:: YANG + +.. admonition:: YANG Terminology + + libxo uses terminology from YANG (:RFC:`7950`), the data modeling + language for NETCONF: container, list, leaf, and leaf-list. + +For XML and JSON, individual fields appear inside hierarchies which +provide context and meaning to the fields. Unfortunately, these +encoding have a basic disconnect between how lists is similar objects +are represented. + +XML encodes lists as set of sequential elements:: + + phil + pallavi + sjg + +JSON encodes lists using a single name and square brackets:: + + "user": [ "phil", "pallavi", "sjg" ] + +This means libxo needs three distinct indications of hierarchy: one +for containers of hierarchy appear only once for any specific parent, +one for lists, and one for each item in a list. + +.. index:: Containers + +Containers +~~~~~~~~~~ + +A "*container*" is an element of a hierarchy that appears only once +under any specific parent. The container has no value, but serves to +contain and organize other nodes. + +To open a container, call xo_open_container() or +xo_open_container_h(). The former uses the default handle and the +latter accepts a specific handle. To close a level, use the +xo_close_container() or xo_close_container_h() functions. + +Each open call must have a matching close call. If the XOF_WARN flag +is set and the name given does not match the name of the currently open +container, a warning will be generated. + +.. c:function:: xo_ssize_t xo_open_container (const char *name) + + :param name: Name of the container + :type name: const char * + :returns: -1 on error, or the number of bytes generated + :rtype: xo_ssize_t + + The `name` parameter gives the name of the container, encoded in + UTF-8. Since ASCII is a proper subset of UTF-8, traditional C + strings can be used directly. + +.. c:function:: xo_ssize_t xo_open_container_h (xo_handle_t *xop, const char *name) + + :param xop: Handle to use (or NULL for default handle) + :type xop: xo_handle_t * + + The `xo_open_container_h` function adds a `handle` parameter. + +.. c:function:: xo_ssize_t xo_close_container (const char *name) + + :param name: Name of the container + :type name: const char * + :returns: -1 on error, or the number of bytes generated + :rtype: xo_ssize_t + +.. c:function:: xo_ssize_t xo_close_container_h (xo_handle_t *xop, const char *name) + + :param xop: Handle to use (or NULL for default handle) + :type xop: xo_handle_t * + + The `xo_close_container_h` function adds a `handle` parameter. + +Use the :index:`XOF_WARN` flag to generate a warning if the name given +on the close does not match the current open container. + +For TEXT and HTML output, containers are not rendered into output +text, though for HTML they are used to record an XPath value when the +:index:`XOF_XPATH` flag is set. + +:: + + EXAMPLE: + xo_open_container("top"); + xo_open_container("system"); + xo_emit("{:host-name/%s%s%s}", hostname, + domainname ? "." : "", domainname ?: ""); + xo_close_container("system"); + xo_close_container("top"); + TEXT: + my-host.example.org + XML: + + + my-host.example.org + + + JSON: + "top" : { + "system" : { + "host-name": "my-host.example.org" + } + } + HTML: +
my-host.example.org
+ +.. index:: xo_open_instance +.. index:: xo_close_instance +.. index:: xo_open_list +.. index:: xo_close_list + +Lists and Instances +~~~~~~~~~~~~~~~~~~~ + +A "*list*" is set of one or more instances that appear under the same +parent. The instances contain details about a specific object. One +can think of instances as objects or records. A call is needed to +open and close the list, while a distinct call is needed to open and +close each instance of the list. + +The name given to all calls must be identical, and it is strongly +suggested that the name be singular, not plural, as a matter of +style and usage expectations:: + + EXAMPLE: + xo_open_list("item"); + + for (ip = list; ip->i_title; ip++) { + xo_open_instance("item"); + xo_emit("{L:Item} '{:name/%s}':\n", ip->i_title); + xo_close_instance("item"); + } + + xo_close_list("item"); + +Getting the list and instance calls correct is critical to the proper +generation of XML and JSON data. + +Opening Lists ++++++++++++++ + +.. c:function:: xo_ssize_t xo_open_list (const char *name) + + :param name: Name of the list + :type name: const char * + :returns: -1 on error, or the number of bytes generated + :rtype: xo_ssize_t + + The `xo_open_list` function open a list of instances. + +.. c:function:: xo_ssize_t xo_open_list_h (xo_handle_t *xop, const char *name) + + :param xop: Handle to use (or NULL for default handle) + :type xop: xo_handle_t * + +Closing Lists ++++++++++++++ + +.. c:function:: xo_ssize_t xo_close_list (const char *name) + + :param name: Name of the list + :type name: const char * + :returns: -1 on error, or the number of bytes generated + :rtype: xo_ssize_t + + The `xo_close_list` function closes a list of instances. + +.. c:function:: xo_ssize_t xo_close_list_h (xo_handle_t *xop, const char *name) + + :param xop: Handle to use (or NULL for default handle) + :type xop: xo_handle_t * + + The `xo_close_container_h` function adds a `handle` parameter. + +Opening Instances ++++++++++++++++++ + +.. c:function:: xo_ssize_t xo_open_instance (const char *name) + + :param name: Name of the instance (same as the list name) + :type name: const char * + :returns: -1 on error, or the number of bytes generated + :rtype: xo_ssize_t + + The `xo_open_instance` function open a single instance. + +.. c:function:: xo_ssize_t xo_open_instance_h (xo_handle_t *xop, const char *name) + + :param xop: Handle to use (or NULL for default handle) + :type xop: xo_handle_t * + + The `xo_open_instance_h` function adds a `handle` parameter. + +Closing Instances ++++++++++++++++++ + +.. c:function:: xo_ssize_t xo_close_instance (const char *name) + + :param name: Name of the instance + :type name: const char * + :returns: -1 on error, or the number of bytes generated + :rtype: xo_ssize_t + + The `xo_close_instance` function closes an open instance. + +.. c:function:: xo_ssize_t xo_close_instance_h (xo_handle_t *xop, const char *name) + + :param xop: Handle to use (or NULL for default handle) + :type xop: xo_handle_t * + + The `xo_close_instance_h` function adds a `handle` parameter. + + :: + + EXAMPLE: + xo_open_list("user"); + for (i = 0; i < num_users; i++) { + xo_open_instance("user"); + xo_emit("{k:name}:{:uid/%u}:{:gid/%u}:{:home}\n", + pw[i].pw_name, pw[i].pw_uid, + pw[i].pw_gid, pw[i].pw_dir); + xo_close_instance("user"); + } + xo_close_list("user"); + TEXT: + phil:1001:1001:/home/phil + pallavi:1002:1002:/home/pallavi + XML: + + phil + 1001 + 1001 + /home/phil + + + pallavi + 1002 + 1002 + /home/pallavi + + JSON: + user: [ + { + "name": "phil", + "uid": 1001, + "gid": 1001, + "home": "/home/phil", + }, + { + "name": "pallavi", + "uid": 1002, + "gid": 1002, + "home": "/home/pallavi", + } + ] + +Markers +~~~~~~~ + +Markers are used to protect and restore the state of open hierarchy +constructs (containers, lists, or instances). While a marker is open, +no other open constructs can be closed. When a marker is closed, all +constructs open since the marker was opened will be closed. + +Markers use names which are not user-visible, allowing the caller to +choose appropriate internal names. + +In this example, the code whiffles through a list of fish, calling a +function to emit details about each fish. The marker "fish-guts" is +used to ensure that any constructs opened by the function are closed +properly:: + + EXAMPLE: + for (i = 0; fish[i]; i++) { + xo_open_instance("fish"); + xo_open_marker("fish-guts"); + dump_fish_details(i); + xo_close_marker("fish-guts"); + } + +.. c:function:: xo_ssize_t xo_open_marker(const char *name) + + :param name: Name of the instance + :type name: const char * + :returns: -1 on error, or the number of bytes generated + :rtype: xo_ssize_t + + The `xo_open_marker` function records the current state of open tags + in order for `xo_close_marker` to close them at some later point. + +.. c:function:: xo_ssize_t xo_open_marker_h(const char *name) + + :param xop: Handle to use (or NULL for default handle) + :type xop: xo_handle_t * + + The `xo_open_marker_h` function adds a `handle` parameter. + +.. c:function:: xo_ssize_t xo_close_marker(const char *name) + + :param name: Name of the instance + :type name: const char * + :returns: -1 on error, or the number of bytes generated + :rtype: xo_ssize_t + + The `xo_close_marker` function closes any open containers, lists, or + instances as needed to return to the state recorded when + `xo_open_marker` was called with the matching name. + +.. c:function:: xo_ssize_t xo_close_marker(const char *name) + + :param xop: Handle to use (or NULL for default handle) + :type xop: xo_handle_t * + + The `xo_close_marker_h` function adds a `handle` parameter. + +DTRT Mode +~~~~~~~~~ + +Some users may find tracking the names of open containers, lists, and +instances inconvenient. libxo offers a "Do The Right Thing" mode, where +libxo will track the names of open containers, lists, and instances so +the close function can be called without a name. To enable DTRT mode, +turn on the XOF_DTRT flag prior to making any other libxo output:: + + xo_set_flags(NULL, XOF_DTRT); + +.. index:: XOF_DTRT + +Each open and close function has a version with the suffix "_d", which +will close the open container, list, or instance:: + + xo_open_container_d("top"); + ... + xo_close_container_d(); + +This also works for lists and instances:: + + xo_open_list_d("item"); + for (...) { + xo_open_instance_d("item"); + xo_emit(...); + xo_close_instance_d(); + } + xo_close_list_d(); + +.. index:: XOF_WARN + +Note that the XOF_WARN flag will also cause libxo to track open +containers, lists, and instances. A warning is generated when the +name given to the close function and the name recorded do not match. + +Support Functions +----------------- + +.. index:: xo_parse_args +.. _xo_parse_args: + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed May 23 01:48:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42825EEA737; Wed, 23 May 2018 01:48:11 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EADB971D36; Wed, 23 May 2018 01:48:10 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1F3F1C2DF; Wed, 23 May 2018 01:48:10 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N1mA4g085050; Wed, 23 May 2018 01:48:10 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N1mALB085048; Wed, 23 May 2018 01:48:10 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805230148.w4N1mALB085048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 23 May 2018 01:48:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334069 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 334069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 01:48:11 -0000 Author: mmacy Date: Wed May 23 01:48:09 2018 New Revision: 334069 URL: https://svnweb.freebsd.org/changeset/base/334069 Log: kern_sendit: use pre-initialized rights Modified: head/sys/kern/subr_capability.c head/sys/kern/uipc_syscalls.c head/sys/sys/capsicum.h Modified: head/sys/kern/subr_capability.c ============================================================================== --- head/sys/kern/subr_capability.c Wed May 23 01:20:31 2018 (r334068) +++ head/sys/kern/subr_capability.c Wed May 23 01:48:09 2018 (r334069) @@ -92,6 +92,7 @@ __read_mostly cap_rights_t cap_renameat_source_rights; __read_mostly cap_rights_t cap_renameat_target_rights; __read_mostly cap_rights_t cap_seek_rights; __read_mostly cap_rights_t cap_send_rights; +__read_mostly cap_rights_t cap_send_connect_rights; __read_mostly cap_rights_t cap_setsockopt_rights; __read_mostly cap_rights_t cap_shutdown_rights; __read_mostly cap_rights_t cap_symlinkat_rights; @@ -140,6 +141,7 @@ __cap_rights_sysinit1(void *arg) cap_rights_init(&cap_renameat_target_rights, CAP_RENAMEAT_TARGET); cap_rights_init(&cap_seek_rights, CAP_SEEK); cap_rights_init(&cap_send_rights, CAP_SEND); + cap_rights_init(&cap_send_connect_rights, CAP_SEND, CAP_CONNECT); cap_rights_init(&cap_setsockopt_rights, CAP_SETSOCKOPT); cap_rights_init(&cap_shutdown_rights, CAP_SHUTDOWN); cap_rights_init(&cap_symlinkat_rights, CAP_SYMLINKAT); Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Wed May 23 01:20:31 2018 (r334068) +++ head/sys/kern/uipc_syscalls.c Wed May 23 01:48:09 2018 (r334069) @@ -722,7 +722,7 @@ kern_sendit(struct thread *td, int s, struct msghdr *m struct uio auio; struct iovec *iov; struct socket *so; - cap_rights_t rights; + cap_rights_t *rights; #ifdef KTRACE struct uio *ktruio = NULL; #endif @@ -730,12 +730,12 @@ kern_sendit(struct thread *td, int s, struct msghdr *m int i, error; AUDIT_ARG_FD(s); - cap_rights_init(&rights, CAP_SEND); + rights = &cap_send_rights; if (mp->msg_name != NULL) { AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); - cap_rights_set(&rights, CAP_CONNECT); + rights = &cap_send_connect_rights; } - error = getsock_cap(td, s, &rights, &fp, NULL, NULL); + error = getsock_cap(td, s, rights, &fp, NULL, NULL); if (error != 0) { m_freem(control); return (error); Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Wed May 23 01:20:31 2018 (r334068) +++ head/sys/sys/capsicum.h Wed May 23 01:48:09 2018 (r334069) @@ -441,6 +441,7 @@ extern cap_rights_t cap_renameat_source_rights; extern cap_rights_t cap_renameat_target_rights; extern cap_rights_t cap_seek_rights; extern cap_rights_t cap_send_rights; +extern cap_rights_t cap_send_connect_rights; extern cap_rights_t cap_setsockopt_rights; extern cap_rights_t cap_shutdown_rights; extern cap_rights_t cap_symlinkat_rights; From owner-svn-src-head@freebsd.org Wed May 23 02:51:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71A66EEC34A; Wed, 23 May 2018 02:51:58 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2997173967; Wed, 23 May 2018 02:51:58 +0000 (UTC) (envelope-from wollman@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AE211CE09; Wed, 23 May 2018 02:51:58 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N2pvwR017787; Wed, 23 May 2018 02:51:57 GMT (envelope-from wollman@FreeBSD.org) Received: (from wollman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N2pved017260; Wed, 23 May 2018 02:51:57 GMT (envelope-from wollman@FreeBSD.org) Message-Id: <201805230251.w4N2pved017260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wollman set sender to wollman@FreeBSD.org using -f From: Garrett Wollman Date: Wed, 23 May 2018 02:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334070 - head/usr.bin/getconf X-SVN-Group: head X-SVN-Commit-Author: wollman X-SVN-Commit-Paths: head/usr.bin/getconf X-SVN-Commit-Revision: 334070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 02:51:58 -0000 Author: wollman Date: Wed May 23 02:51:56 2018 New Revision: 334070 URL: https://svnweb.freebsd.org/changeset/base/334070 Log: Move unsigned limits to a separate table/recognizer and display them using the appropriate (unsigned) format specification. This prevents integer overflow when ULLONG_MAX and (on some architectures) ULONG_MAX are used to initialize an intmax_t and then displayed as the signed value -1. (A different approach was suggested in the bug report, which I did not use.) If other limits are defined to be unsigned, they could be moved here. PR: 164049 Reported by: Marcus Reid Modified: head/usr.bin/getconf/Makefile head/usr.bin/getconf/getconf.c head/usr.bin/getconf/getconf.h head/usr.bin/getconf/limits.gperf Modified: head/usr.bin/getconf/Makefile ============================================================================== --- head/usr.bin/getconf/Makefile Wed May 23 01:48:09 2018 (r334069) +++ head/usr.bin/getconf/Makefile Wed May 23 02:51:56 2018 (r334070) @@ -4,11 +4,12 @@ PROG= getconf -SRCS= confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c +SRCS= confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c \ + unsigned_limits.c CFLAGS+= -I${.CURDIR} CLEANFILES+= confstr.c limits.c pathconf.c progenv.c sysconf.c \ confstr.names limits.names pathconf.names sysconf.names \ - conflicting.names unique.names + conflicting.names unique.names unsigned_limits.names .SUFFIXES: .gperf .names .PHONY: conflicts Modified: head/usr.bin/getconf/getconf.c ============================================================================== --- head/usr.bin/getconf/getconf.c Wed May 23 01:48:09 2018 (r334069) +++ head/usr.bin/getconf/getconf.c Wed May 23 02:51:56 2018 (r334070) @@ -65,6 +65,7 @@ main(int argc, char **argv) int c, key, valid; const char *name, *vflag, *alt_path; intmax_t limitval; + uintmax_t ulimitval; aflag = false; vflag = NULL; @@ -115,6 +116,13 @@ main(int argc, char **argv) } if (argv[optind + 1] == NULL) { /* confstr or sysconf */ + if ((valid = find_unsigned_limit(name, &ulimitval)) != 0) { + if (valid > 0) + printf("%" PRIuMAX "\n", ulimitval); + else + printf("undefined\n"); + return 0; + } if ((valid = find_limit(name, &limitval)) != 0) { if (valid > 0) printf("%" PRIdMAX "\n", limitval); Modified: head/usr.bin/getconf/getconf.h ============================================================================== --- head/usr.bin/getconf/getconf.h Wed May 23 01:48:09 2018 (r334069) +++ head/usr.bin/getconf/getconf.h Wed May 23 02:51:56 2018 (r334070) @@ -37,6 +37,7 @@ typedef long long intmax_t; #endif int find_confstr(const char *name, int *key); +int find_unsigned_limit(const char *name, uintmax_t *value); int find_limit(const char *name, intmax_t *value); int find_pathconf(const char *name, int *key); int find_progenv(const char *name, const char **alt_path); Modified: head/usr.bin/getconf/limits.gperf ============================================================================== --- head/usr.bin/getconf/limits.gperf Wed May 23 01:48:09 2018 (r334069) +++ head/usr.bin/getconf/limits.gperf Wed May 23 02:51:56 2018 (r334070) @@ -86,11 +86,6 @@ SCHAR_MIN, SCHAR_MIN SHRT_MAX, SHRT_MAX SHRT_MIN, SHRT_MIN SSIZE_MAX, SSIZE_MAX -UCHAR_MAX, UCHAR_MAX -UINT_MAX, UINT_MAX -ULLONG_MAX, ULLONG_MAX -ULONG_MAX, ULONG_MAX -USHRT_MAX, USHRT_MAX WORD_BIT, WORD_BIT CHARCLASS_NAME_MAX, CHARCLASS_NAME_MAX NL_ARGMAX, NL_ARGMAX From owner-svn-src-head@freebsd.org Wed May 23 02:54:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2D77EEC459; Wed, 23 May 2018 02:54:28 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9836073B77; Wed, 23 May 2018 02:54:28 +0000 (UTC) (envelope-from wollman@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 784E81CE40; Wed, 23 May 2018 02:54:28 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N2sSM4020345; Wed, 23 May 2018 02:54:28 GMT (envelope-from wollman@FreeBSD.org) Received: (from wollman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N2sSba020344; Wed, 23 May 2018 02:54:28 GMT (envelope-from wollman@FreeBSD.org) Message-Id: <201805230254.w4N2sSba020344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wollman set sender to wollman@FreeBSD.org using -f From: Garrett Wollman Date: Wed, 23 May 2018 02:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334071 - head/usr.bin/getconf X-SVN-Group: head X-SVN-Commit-Author: wollman X-SVN-Commit-Paths: head/usr.bin/getconf X-SVN-Commit-Revision: 334071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 02:54:29 -0000 Author: wollman Date: Wed May 23 02:54:28 2018 New Revision: 334071 URL: https://svnweb.freebsd.org/changeset/base/334071 Log: Whoops, forgot to add this file in r334070. PR: 164049 Added: head/usr.bin/getconf/unsigned_limits.gperf (contents, props changed) Added: head/usr.bin/getconf/unsigned_limits.gperf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/getconf/unsigned_limits.gperf Wed May 23 02:54:28 2018 (r334071) @@ -0,0 +1,43 @@ +%{ +/* + * Copyright is disclaimed as to the contents of this file. + * + * $FreeBSD$ + */ + +#include + +#include +#include + +#include "getconf.h" + +/* + * Override gperf's built-in external scope. + */ +static const struct map *in_word_set(const char *str); + +%} +struct map { const char *name; uintmax_t value; int valid; }; +%% +UCHAR_MAX, UCHAR_MAX +UINT_MAX, UINT_MAX +ULLONG_MAX, ULLONG_MAX +ULONG_MAX, ULONG_MAX +USHRT_MAX, USHRT_MAX +%% +int +find_unsigned_limit(const char *name, uintmax_t *value) +{ + const struct map *rv; + + rv = in_word_set(name); + if (rv != NULL) { + if (rv->valid) { + *value = rv->value; + return 1; + } + return -1; + } + return 0; +} From owner-svn-src-head@freebsd.org Wed May 23 03:41:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5668BEED565; Wed, 23 May 2018 03:41:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09A7F752C8; Wed, 23 May 2018 03:41:23 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF64E1D69D; Wed, 23 May 2018 03:41:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N3fMxa044159; Wed, 23 May 2018 03:41:22 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N3fMDd044157; Wed, 23 May 2018 03:41:22 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230341.w4N3fMDd044157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 03:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334072 - in head: share/man/man5 tools/build/options X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: share/man/man5 tools/build/options X-SVN-Commit-Revision: 334072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 03:41:23 -0000 Author: eadler Date: Wed May 23 03:41:22 2018 New Revision: 334072 URL: https://svnweb.freebsd.org/changeset/base/334072 Log: Add the text '@generated' to src.conf.5 This is a cross-tool approach to identifying generated code. Some tools, notably phabricator, handle this marker specially. See https://reviews.freebsd.org/differential/diff/42870/ for such an example. Modified: head/share/man/man5/src.conf.5 head/tools/build/options/makeman Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed May 23 02:54:28 2018 (r334071) +++ head/share/man/man5/src.conf.5 Wed May 23 03:41:22 2018 (r334072) @@ -1,6 +1,7 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 15, 2018 +.\" @generated +.Dd May 23, 2018 .Dt SRC.CONF 5 .Os .Sh NAME Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Wed May 23 02:54:28 2018 (r334071) +++ head/tools/build/options/makeman Wed May 23 03:41:22 2018 (r334072) @@ -141,9 +141,11 @@ main() echo "building src.conf.5 man page from files in ${PWD}" >&2 fbsdid='$'FreeBSD'$' + generated='@'generated cat < Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96DD3EEE283; Wed, 23 May 2018 04:09:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3192476064; Wed, 23 May 2018 04:09:02 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CEFE1DA72; Wed, 23 May 2018 04:09:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N4910s057006; Wed, 23 May 2018 04:09:01 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N491iB057004; Wed, 23 May 2018 04:09:01 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230409.w4N491iB057004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 04:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334073 - head X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 334073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 04:09:02 -0000 Author: eadler Date: Wed May 23 04:09:01 2018 New Revision: 334073 URL: https://svnweb.freebsd.org/changeset/base/334073 Log: README: Reduce the textdump; describe the project Rework the README to make it a little easier for new users. This is the first file many will see when persuing the FreeBSD source code so - remove some of the text describes how to build. This is better covered in the linked documentation. - add a small blurb for what FreeBSD is. Some users might find this document through features such as github search so they may not even know what the project is generally, gear this file for the new, accidental, or casual user rather than towards someone seeking fuller documentation. Modified: head/README head/README.md Modified: head/README ============================================================================== --- head/README Wed May 23 03:41:22 2018 (r334072) +++ head/README Wed May 23 04:09:01 2018 (r334073) @@ -2,35 +2,25 @@ This is the top level of the FreeBSD source directory. was last revised on: $FreeBSD$ +FreeBSD is an operating system used to power modern servers, +desktops, and embedded platforms. A large community has +continually developed it for more than thirty years. Its +advanced networking, security, and storage features have +made FreeBSD the platform of choice for many of the +busiest web sites and most pervasive embedded networking +and storage devices. + For copyright information, please see the file COPYRIGHT in this -directory (additional copyright information also exists for some +directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for -more information). +more information. The Makefile in this directory supports a number of targets for -building components (or all) of the FreeBSD source tree. See build(7) -and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html +building components (or all) of the FreeBSD source tree. See build(7), config(8), +https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and +https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html for more information, including setting make(1) variables. -The `buildkernel` and `installkernel` targets build and install -the kernel and the modules (see below). Please see the top of -the Makefile in this directory for more information on the -standard build targets and compile-time flags. - -Building a kernel is a somewhat more involved process. See build(7), config(8), -and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html -for more information. - -Note: If you want to build and install the kernel with the -`buildkernel` and `installkernel` targets, you might need to build -world before. More information is available in the handbook. - -The kernel configuration files reside in the sys//conf -sub-directory. GENERIC is the default configuration used in release builds. -NOTES contains entries and documentation for all possible -devices, not just those commonly used. - - Source Roadmap: --------------- @@ -69,6 +59,8 @@ share Shared resources. stand Boot loader sources. sys Kernel sources. + +sys//conf Kernel configuration file tests Regression tests which can be run by Kyua. See tests/README for additional information. Modified: head/README.md ============================================================================== --- head/README.md Wed May 23 03:41:22 2018 (r334072) +++ head/README.md Wed May 23 04:09:01 2018 (r334073) @@ -4,35 +4,25 @@ This is the top level of the FreeBSD source directory. was last revised on: $FreeBSD$ +FreeBSD is an operating system used to power modern servers, +desktops, and embedded platforms. A large community has +continually developed it for more than thirty years. Its +advanced networking, security, and storage features have +made FreeBSD the platform of choice for many of the +busiest web sites and most pervasive embedded networking +and storage devices. + For copyright information, please see the file COPYRIGHT in this -directory (additional copyright information also exists for some +directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for -more information). +more information. The Makefile in this directory supports a number of targets for -building components (or all) of the FreeBSD source tree. See build(7) -and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html +building components (or all) of the FreeBSD source tree. See build(7), config(8), +https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and +https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html for more information, including setting make(1) variables. -The `buildkernel` and `installkernel` targets build and install -the kernel and the modules (see below). Please see the top of -the Makefile in this directory for more information on the -standard build targets and compile-time flags. - -Building a kernel is a somewhat more involved process. See build(7), config(8), -and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html -for more information. - -Note: If you want to build and install the kernel with the -`buildkernel` and `installkernel` targets, you might need to build -world before. More information is available in the handbook. - -The kernel configuration files reside in the `sys//conf` -sub-directory. GENERIC is the default configuration used in release builds. -NOTES contains entries and documentation for all possible -devices, not just those commonly used. - - Source Roadmap: --------------- ``` @@ -71,6 +61,8 @@ share Shared resources. stand Boot loader sources. sys Kernel sources. + +sys//conf Kernel configuration file tests Regression tests which can be run by Kyua. See tests/README for additional information. From owner-svn-src-head@freebsd.org Wed May 23 06:15:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86749EF0E39; Wed, 23 May 2018 06:15:56 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38CF4793DD; Wed, 23 May 2018 06:15:56 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B10B1EFC2; Wed, 23 May 2018 06:15:56 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N6FtVM022202; Wed, 23 May 2018 06:15:55 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N6FtiS022201; Wed, 23 May 2018 06:15:55 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805230615.w4N6FtiS022201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 23 May 2018 06:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334074 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 334074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 06:15:56 -0000 Author: mmacy Date: Wed May 23 06:15:55 2018 New Revision: 334074 URL: https://svnweb.freebsd.org/changeset/base/334074 Log: Bump FreeBSD_version after r333813 Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed May 23 04:09:01 2018 (r334073) +++ head/sys/sys/param.h Wed May 23 06:15:55 2018 (r334074) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200063 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200064 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Wed May 23 07:23:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23E89EF2B99; Wed, 23 May 2018 07:23:56 +0000 (UTC) (envelope-from emeric.poupon@stormshield.eu) Received: from work.stormshield.eu (gwlille.netasq.com [91.212.116.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 ADD987B676; Wed, 23 May 2018 07:23:54 +0000 (UTC) (envelope-from emeric.poupon@stormshield.eu) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTPS id B5AD93761E87; Wed, 23 May 2018 09:23:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id A50B83761AC8; Wed, 23 May 2018 09:23:43 +0200 (CEST) Received: from work.stormshield.eu ([127.0.0.1]) by localhost (work.stormshield.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zyCRMDhtQWNm; Wed, 23 May 2018 09:23:43 +0200 (CEST) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id 7DE9B3760E00; Wed, 23 May 2018 09:23:43 +0200 (CEST) Date: Wed, 23 May 2018 09:23:43 +0200 (CEST) From: Emeric POUPON To: cem@freebsd.org Cc: Fabien Thomas , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Message-ID: <822609135.13913713.1527060223167.JavaMail.zimbra@stormshield.eu> In-Reply-To: References: <201805221554.w4MFsPQA083334@repo.freebsd.org> Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Thread-Topic: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat Thread-Index: MG8stLi22iWKJqwOQkGJts8nDNh8xA== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 07:23:56 -0000 Hello, ----- Original Message ----- > From: "Conrad Meyer" > To: "Fabien Thomas" > Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "src-committers" > Sent: Tuesday, 22 May, 2018 19:05:18 > Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat > Can users control arbitrary key_allocsp() calls? If so, it seems > concerning to expose hit/miss stats on cached security keys. I am not sure to understand, could you please tell more about what you mean? > > On Tue, May 22, 2018 at 8:54 AM, Fabien Thomas wrote: >> Author: fabient >> Date: Tue May 22 15:54:25 2018 >> New Revision: 334054 >> URL: https://svnweb.freebsd.org/changeset/base/334054 >> >> Log: >> Add a SPD cache to speed up lookups. >> >> When large SPDs are used, we face two problems: >> >> - too many CPU cycles are spent during the linear searches in the SPD >> for each packet >> - too much contention on multi socket systems, since we use a single >> shared lock. >> >> Main changes: >> >> - added the sysctl tree 'net.key.spdcache' to control the SPD cache >> (disabled by default). >> - cache the sp indexes that are used to perform SP lookups. >> - use a range of dedicated mutexes to protect the cache lines. >> >> Submitted by: Emeric Poupon >> Reviewed by: ae >> Sponsored by: Stormshield >> Differential Revision: https://reviews.freebsd.org/D15050 >> >> Modified: >> head/sys/kern/uipc_mbuf.c >> head/sys/netipsec/ipsec.h >> head/sys/netipsec/key.c >> head/tools/tools/crypto/ipsecstats.c >> head/usr.bin/netstat/ipsec.c >> >> Modified: head/sys/kern/uipc_mbuf.c >> ============================================================================== >> --- head/sys/kern/uipc_mbuf.c Tue May 22 15:52:22 2018 (r334053) >> +++ head/sys/kern/uipc_mbuf.c Tue May 22 15:54:25 2018 (r334054) >> @@ -1633,9 +1633,6 @@ m_unshare(struct mbuf *m0, int how) >> mprev->m_len += m->m_len; >> mprev->m_next = m->m_next; /* unlink from chain */ >> m_free(m); /* reclaim mbuf */ >> -#if 0 >> - newipsecstat.ips_mbcoalesced++; >> -#endif >> } else { >> mprev = m; >> } >> @@ -1665,9 +1662,6 @@ m_unshare(struct mbuf *m0, int how) >> mprev->m_len += m->m_len; >> mprev->m_next = m->m_next; /* unlink from chain */ >> m_free(m); /* reclaim mbuf */ >> -#if 0 >> - newipsecstat.ips_clcoalesced++; >> -#endif >> continue; >> } >> >> >> Modified: head/sys/netipsec/ipsec.h >> ============================================================================== >> --- head/sys/netipsec/ipsec.h Tue May 22 15:52:22 2018 (r334053) >> +++ head/sys/netipsec/ipsec.h Tue May 22 15:54:25 2018 (r334054) >> @@ -219,8 +219,9 @@ struct ipsecstat { >> uint64_t ips_out_inval; /* output: generic error */ >> uint64_t ips_out_bundlesa; /* output: bundled SA processed */ >> >> - uint64_t ips_mbcoalesced; /* mbufs coalesced during clone */ >> - uint64_t ips_clcoalesced; /* clusters coalesced during clone */ >> + uint64_t ips_spdcache_hits; /* SPD cache hits */ >> + uint64_t ips_spdcache_misses; /* SPD cache misses */ >> + >> uint64_t ips_clcopied; /* clusters copied during clone */ >> uint64_t ips_mbinserted; /* mbufs inserted during makespace */ >> /* >> >> Modified: head/sys/netipsec/key.c >> ============================================================================== >> --- head/sys/netipsec/key.c Tue May 22 15:52:22 2018 (r334053) >> +++ head/sys/netipsec/key.c Tue May 22 15:54:25 2018 (r334054) >> @@ -173,6 +173,48 @@ static VNET_DEFINE(u_long, sphash_mask); >> #define SPHASH_HASHVAL(id) (key_u32hash(id) & V_sphash_mask) >> #define SPHASH_HASH(id) &V_sphashtbl[SPHASH_HASHVAL(id)] >> >> +/* SPD cache */ >> +struct spdcache_entry { >> + struct secpolicyindex spidx; /* secpolicyindex */ >> + struct secpolicy *sp; /* cached policy to be used */ >> + >> + LIST_ENTRY(spdcache_entry) chain; >> +}; >> +LIST_HEAD(spdcache_entry_list, spdcache_entry); >> + >> +#define SPDCACHE_MAX_ENTRIES_PER_HASH 8 >> + >> +static VNET_DEFINE(u_int, key_spdcache_maxentries) = 0; >> +#define V_key_spdcache_maxentries VNET(key_spdcache_maxentries) >> +static VNET_DEFINE(u_int, key_spdcache_threshold) = 32; >> +#define V_key_spdcache_threshold VNET(key_spdcache_threshold) >> +static VNET_DEFINE(unsigned long, spd_size) = 0; >> +#define V_spd_size VNET(spd_size) >> + >> +#define SPDCACHE_ENABLED() (V_key_spdcache_maxentries != 0) >> +#define SPDCACHE_ACTIVE() \ >> + (SPDCACHE_ENABLED() && V_spd_size >= V_key_spdcache_threshold) >> + >> +static VNET_DEFINE(struct spdcache_entry_list *, spdcachehashtbl); >> +static VNET_DEFINE(u_long, spdcachehash_mask); >> +#define V_spdcachehashtbl VNET(spdcachehashtbl) >> +#define V_spdcachehash_mask VNET(spdcachehash_mask) >> + >> +#define SPDCACHE_HASHVAL(idx) \ >> + (key_addrprotohash(&(idx)->src, &(idx)->dst, &(idx)->ul_proto) & \ >> + V_spdcachehash_mask) >> + >> +/* Each cache line is protected by a mutex */ >> +static VNET_DEFINE(struct mtx *, spdcache_lock); >> +#define V_spdcache_lock VNET(spdcache_lock) >> + >> +#define SPDCACHE_LOCK_INIT(a) \ >> + mtx_init(&V_spdcache_lock[a], "spdcache", \ >> + "fast ipsec SPD cache", MTX_DEF|MTX_DUPOK) >> +#define SPDCACHE_LOCK_DESTROY(a) mtx_destroy(&V_spdcache_lock[a]) >> +#define SPDCACHE_LOCK(a) mtx_lock(&V_spdcache_lock[a]); >> +#define SPDCACHE_UNLOCK(a) mtx_unlock(&V_spdcache_lock[a]); >> + >> /* SAD */ >> TAILQ_HEAD(secashead_queue, secashead); >> LIST_HEAD(secashead_list, secashead); >> @@ -198,8 +240,9 @@ static VNET_DEFINE(u_long, sahaddrhash_mask); >> >> #define SAHHASH_NHASH_LOG2 7 >> #define SAHHASH_NHASH (1 << SAHHASH_NHASH_LOG2) >> -#define SAHADDRHASH_HASHVAL(saidx) \ >> - (key_saidxhash(saidx) & V_sahaddrhash_mask) >> +#define SAHADDRHASH_HASHVAL(idx) \ >> + (key_addrprotohash(&(idx)->src, &(idx)->dst, &(idx)->proto) & \ >> + V_sahaddrhash_mask) >> #define SAHADDRHASH_HASH(saidx) \ >> &V_sahaddrhashtbl[SAHADDRHASH_HASHVAL(saidx)] >> >> @@ -215,33 +258,34 @@ static VNET_DEFINE(u_long, savhash_mask); >> #define SAVHASH_HASH(spi) &V_savhashtbl[SAVHASH_HASHVAL(spi)] >> >> static uint32_t >> -key_saidxhash(const struct secasindex *saidx) >> +key_addrprotohash(const union sockaddr_union *src, >> + const union sockaddr_union *dst, const uint8_t *proto) >> { >> uint32_t hval; >> >> - hval = fnv_32_buf(&saidx->proto, sizeof(saidx->proto), >> + hval = fnv_32_buf(proto, sizeof(*proto), >> FNV1_32_INIT); >> - switch (saidx->dst.sa.sa_family) { >> + switch (dst->sa.sa_family) { >> #ifdef INET >> case AF_INET: >> - hval = fnv_32_buf(&saidx->src.sin.sin_addr, >> + hval = fnv_32_buf(&src->sin.sin_addr, >> sizeof(in_addr_t), hval); >> - hval = fnv_32_buf(&saidx->dst.sin.sin_addr, >> + hval = fnv_32_buf(&dst->sin.sin_addr, >> sizeof(in_addr_t), hval); >> break; >> #endif >> #ifdef INET6 >> case AF_INET6: >> - hval = fnv_32_buf(&saidx->src.sin6.sin6_addr, >> + hval = fnv_32_buf(&src->sin6.sin6_addr, >> sizeof(struct in6_addr), hval); >> - hval = fnv_32_buf(&saidx->dst.sin6.sin6_addr, >> + hval = fnv_32_buf(&dst->sin6.sin6_addr, >> sizeof(struct in6_addr), hval); >> break; >> #endif >> default: >> hval = 0; >> ipseclog((LOG_DEBUG, "%s: unknown address family %d", >> - __func__, saidx->dst.sa.sa_family)); >> + __func__, dst->sa.sa_family)); >> } >> return (hval); >> } >> @@ -290,8 +334,9 @@ static VNET_DEFINE(u_long, acqseqhash_mask); >> >> #define ACQHASH_NHASH_LOG2 7 >> #define ACQHASH_NHASH (1 << ACQHASH_NHASH_LOG2) >> -#define ACQADDRHASH_HASHVAL(saidx) \ >> - (key_saidxhash(saidx) & V_acqaddrhash_mask) >> +#define ACQADDRHASH_HASHVAL(idx) \ >> + (key_addrprotohash(&(idx)->src, &(idx)->dst, &(idx)->proto) & \ >> + V_acqaddrhash_mask) >> #define ACQSEQHASH_HASHVAL(seq) \ >> (key_u32hash(seq) & V_acqseqhash_mask) >> #define ACQADDRHASH_HASH(saidx) \ >> @@ -463,6 +508,17 @@ SYSCTL_INT(_net_key, KEYCTL_AH_KEYMIN, ah_keymin, >> SYSCTL_INT(_net_key, KEYCTL_PREFERED_OLDSA, preferred_oldsa, >> CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(key_preferred_oldsa), 0, ""); >> >> +static SYSCTL_NODE(_net_key, OID_AUTO, spdcache, CTLFLAG_RW, 0, "SPD cache"); >> + >> +SYSCTL_UINT(_net_key_spdcache, OID_AUTO, maxentries, >> + CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(key_spdcache_maxentries), 0, >> + "Maximum number of entries in the SPD cache" >> + " (power of 2, 0 to disable)"); >> + >> +SYSCTL_UINT(_net_key_spdcache, OID_AUTO, threshold, >> + CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(key_spdcache_threshold), 0, >> + "Number of SPs that make the SPD cache active"); >> + >> #define __LIST_CHAINED(elm) \ >> (!((elm)->chain.le_next == NULL && (elm)->chain.le_prev == NULL)) >> >> @@ -473,6 +529,7 @@ MALLOC_DEFINE(M_IPSEC_SR, "ipsecrequest", "ipsec secur >> MALLOC_DEFINE(M_IPSEC_MISC, "ipsec-misc", "ipsec miscellaneous"); >> MALLOC_DEFINE(M_IPSEC_SAQ, "ipsec-saq", "ipsec sa acquire"); >> MALLOC_DEFINE(M_IPSEC_SAR, "ipsec-reg", "ipsec sa acquire"); >> +MALLOC_DEFINE(M_IPSEC_SPDCACHE, "ipsec-spdcache", "ipsec SPD cache"); >> >> static VNET_DEFINE(uma_zone_t, key_lft_zone); >> #define V_key_lft_zone VNET(key_lft_zone) >> @@ -574,6 +631,7 @@ static struct callout key_timer; >> #endif >> >> static void key_unlink(struct secpolicy *); >> +static struct secpolicy *key_do_allocsp(struct secpolicyindex *spidx, u_int >> dir); >> static struct secpolicy *key_getsp(struct secpolicyindex *); >> static struct secpolicy *key_getspbyid(u_int32_t); >> static struct mbuf *key_gather_mbuf(struct mbuf *, >> @@ -694,6 +752,15 @@ static struct mbuf *key_setlifetime(struct seclifetime >> static struct mbuf *key_setkey(struct seckey *, uint16_t); >> static int xform_init(struct secasvar *, u_short); >> >> +static void spdcache_init(void); >> +static void spdcache_clear(void); >> +static struct spdcache_entry *spdcache_entry_alloc( >> + const struct secpolicyindex *spidx, >> + struct secpolicy *policy); >> +static void spdcache_entry_free(struct spdcache_entry *entry); >> +static void spdcache_destroy(void); >> + >> + >> #define DBG_IPSEC_INITREF(t, p) do { \ >> refcount_init(&(p)->refcnt, 1); \ >> KEYDBG(KEY_STAMP, \ >> @@ -799,14 +866,8 @@ key_checksockaddrs(struct sockaddr *src, struct sockad >> return (0); >> } >> >> -/* >> - * allocating a SP for OUTBOUND or INBOUND packet. >> - * Must call key_freesp() later. >> - * OUT: NULL: not found >> - * others: found and return the pointer. >> - */ >> struct secpolicy * >> -key_allocsp(struct secpolicyindex *spidx, u_int dir) >> +key_do_allocsp(struct secpolicyindex *spidx, u_int dir) >> { >> SPTREE_RLOCK_TRACKER; >> struct secpolicy *sp; >> @@ -823,7 +884,73 @@ key_allocsp(struct secpolicyindex *spidx, u_int dir) >> } >> } >> SPTREE_RUNLOCK(); >> + return (sp); >> +} >> >> + >> +/* >> + * allocating a SP for OUTBOUND or INBOUND packet. >> + * Must call key_freesp() later. >> + * OUT: NULL: not found >> + * others: found and return the pointer. >> + */ >> +struct secpolicy * >> +key_allocsp(struct secpolicyindex *spidx, u_int dir) >> +{ >> + struct spdcache_entry *entry, *lastentry, *tmpentry; >> + struct secpolicy *sp; >> + uint32_t hashv; >> + int nb_entries; >> + >> + if (!SPDCACHE_ACTIVE()) { >> + sp = key_do_allocsp(spidx, dir); >> + goto out; >> + } >> + >> + hashv = SPDCACHE_HASHVAL(spidx); >> + SPDCACHE_LOCK(hashv); >> + nb_entries = 0; >> + LIST_FOREACH_SAFE(entry, &V_spdcachehashtbl[hashv], chain, tmpentry) { >> + /* Removed outdated entries */ >> + if (entry->sp != NULL && >> + entry->sp->state == IPSEC_SPSTATE_DEAD) { >> + LIST_REMOVE(entry, chain); >> + spdcache_entry_free(entry); >> + continue; >> + } >> + >> + nb_entries++; >> + if (!key_cmpspidx_exactly(&entry->spidx, spidx)) { >> + lastentry = entry; >> + continue; >> + } >> + >> + sp = entry->sp; >> + if (entry->sp != NULL) >> + SP_ADDREF(sp); >> + >> + IPSECSTAT_INC(ips_spdcache_hits); >> + >> + SPDCACHE_UNLOCK(hashv); >> + goto out; >> + } >> + >> + IPSECSTAT_INC(ips_spdcache_misses); >> + >> + sp = key_do_allocsp(spidx, dir); >> + entry = spdcache_entry_alloc(spidx, sp); >> + if (entry != NULL) { >> + if (nb_entries >= SPDCACHE_MAX_ENTRIES_PER_HASH) { >> + LIST_REMOVE(lastentry, chain); >> + spdcache_entry_free(lastentry); >> + } >> + >> + LIST_INSERT_HEAD(&V_spdcachehashtbl[hashv], entry, chain); >> + } >> + >> + SPDCACHE_UNLOCK(hashv); >> + >> +out: >> if (sp != NULL) { /* found a SPD entry */ >> sp->lastused = time_second; >> KEYDBG(IPSEC_STAMP, >> @@ -1107,9 +1234,12 @@ key_unlink(struct secpolicy *sp) >> } >> sp->state = IPSEC_SPSTATE_DEAD; >> TAILQ_REMOVE(&V_sptree[sp->spidx.dir], sp, chain); >> + V_spd_size--; >> LIST_REMOVE(sp, idhash); >> V_sp_genid++; >> SPTREE_WUNLOCK(); >> + if (SPDCACHE_ENABLED()) >> + spdcache_clear(); >> key_freesp(&sp); >> } >> >> @@ -1132,6 +1262,7 @@ key_insertsp(struct secpolicy *newsp) >> done: >> LIST_INSERT_HEAD(SPHASH_HASH(newsp->id), newsp, idhash); >> newsp->state = IPSEC_SPSTATE_ALIVE; >> + V_spd_size++; >> V_sp_genid++; >> } >> >> @@ -1207,9 +1338,12 @@ key_unregister_ifnet(struct secpolicy **spp, u_int cou >> spp[i]->state = IPSEC_SPSTATE_DEAD; >> TAILQ_REMOVE(&V_sptree_ifnet[spp[i]->spidx.dir], >> spp[i], chain); >> + V_spd_size--; >> LIST_REMOVE(spp[i], idhash); >> } >> SPTREE_WUNLOCK(); >> + if (SPDCACHE_ENABLED()) >> + spdcache_clear(); >> >> for (i = 0; i < count; i++) { >> m = key_setdumpsp(spp[i], SADB_X_SPDDELETE, 0, 0); >> @@ -1939,6 +2073,8 @@ key_spdadd(struct socket *so, struct mbuf *m, const st >> } >> key_insertsp(newsp); >> SPTREE_WUNLOCK(); >> + if (SPDCACHE_ENABLED()) >> + spdcache_clear(); >> >> KEYDBG(KEY_STAMP, >> printf("%s: SP(%p)\n", __func__, newsp)); >> @@ -2393,7 +2529,10 @@ key_spdflush(struct socket *so, struct mbuf *m, const >> LIST_REMOVE(sp, idhash); >> } >> V_sp_genid++; >> + V_spd_size = 0; >> SPTREE_WUNLOCK(); >> + if (SPDCACHE_ENABLED()) >> + spdcache_clear(); >> sp = TAILQ_FIRST(&drainq); >> while (sp != NULL) { >> nextsp = TAILQ_NEXT(sp, chain); >> @@ -4070,7 +4209,8 @@ key_cmpspidx_exactly(struct secpolicyindex *spidx0, >> >> if (spidx0->prefs != spidx1->prefs >> || spidx0->prefd != spidx1->prefd >> - || spidx0->ul_proto != spidx1->ul_proto) >> + || spidx0->ul_proto != spidx1->ul_proto >> + || spidx0->dir != spidx1->dir) >> return 0; >> >> return key_sockaddrcmp(&spidx0->src.sa, &spidx1->src.sa, 1) == 0 && >> @@ -4338,12 +4478,15 @@ key_flush_spd(time_t now) >> continue; >> } >> TAILQ_REMOVE(&V_sptree[sp->spidx.dir], sp, chain); >> + V_spd_size--; >> LIST_REMOVE(sp, idhash); >> sp->state = IPSEC_SPSTATE_DEAD; >> sp = nextsp; >> } >> V_sp_genid++; >> SPTREE_WUNLOCK(); >> + if (SPDCACHE_ENABLED()) >> + spdcache_clear(); >> >> sp = LIST_FIRST(&drainq); >> while (sp != NULL) { >> @@ -8067,6 +8210,95 @@ key_validate_ext(const struct sadb_ext *ext, int len) >> } >> >> void >> +spdcache_init(void) >> +{ >> + int i; >> + >> + TUNABLE_INT_FETCH("net.key.spdcache.maxentries", >> + &V_key_spdcache_maxentries); >> + TUNABLE_INT_FETCH("net.key.spdcache.threshold", >> + &V_key_spdcache_threshold); >> + >> + if (V_key_spdcache_maxentries) { >> + V_key_spdcache_maxentries = MAX(V_key_spdcache_maxentries, >> + SPDCACHE_MAX_ENTRIES_PER_HASH); >> + V_spdcachehashtbl = hashinit(V_key_spdcache_maxentries / >> + SPDCACHE_MAX_ENTRIES_PER_HASH, >> + M_IPSEC_SPDCACHE, &V_spdcachehash_mask); >> + V_key_spdcache_maxentries = (V_spdcachehash_mask + 1) >> + * SPDCACHE_MAX_ENTRIES_PER_HASH; >> + >> + V_spdcache_lock = malloc(sizeof(struct mtx) * >> + (V_spdcachehash_mask + 1), >> + M_IPSEC_SPDCACHE, M_WAITOK|M_ZERO); >> + >> + for (i = 0; i < V_spdcachehash_mask + 1; ++i) >> + SPDCACHE_LOCK_INIT(i); >> + } >> +} >> + >> +struct spdcache_entry * >> +spdcache_entry_alloc(const struct secpolicyindex *spidx, struct secpolicy *sp) >> +{ >> + struct spdcache_entry *entry; >> + >> + entry = malloc(sizeof(struct spdcache_entry), >> + M_IPSEC_SPDCACHE, M_NOWAIT|M_ZERO); >> + if (entry == NULL) >> + return NULL; >> + >> + if (sp != NULL) >> + SP_ADDREF(sp); >> + >> + entry->spidx = *spidx; >> + entry->sp = sp; >> + >> + return (entry); >> +} >> + >> +void >> +spdcache_entry_free(struct spdcache_entry *entry) >> +{ >> + >> + if (entry->sp != NULL) >> + key_freesp(&entry->sp); >> + free(entry, M_IPSEC_SPDCACHE); >> +} >> + >> +void >> +spdcache_clear(void) >> +{ >> + struct spdcache_entry *entry; >> + int i; >> + >> + for (i = 0; i < V_spdcachehash_mask + 1; ++i) { >> + SPDCACHE_LOCK(i); >> + while (!LIST_EMPTY(&V_spdcachehashtbl[i])) { >> + entry = LIST_FIRST(&V_spdcachehashtbl[i]); >> + LIST_REMOVE(entry, chain); >> + spdcache_entry_free(entry); >> + } >> + SPDCACHE_UNLOCK(i); >> + } >> +} >> + >> +void >> +spdcache_destroy(void) >> +{ >> + int i; >> + >> + if (SPDCACHE_ENABLED()) { >> + spdcache_clear(); >> + hashdestroy(V_spdcachehashtbl, M_IPSEC_SPDCACHE, >> V_spdcachehash_mask); >> + >> + for (i = 0; i < V_spdcachehash_mask + 1; ++i) >> + SPDCACHE_LOCK_DESTROY(i); >> + >> + free(V_spdcache_lock, M_IPSEC_SPDCACHE); >> + } >> +} >> + >> +void >> key_init(void) >> { >> int i; >> @@ -8090,6 +8322,8 @@ key_init(void) >> V_acqseqhashtbl = hashinit(ACQHASH_NHASH, M_IPSEC_SAQ, >> &V_acqseqhash_mask); >> >> + spdcache_init(); >> + >> for (i = 0; i <= SADB_SATYPE_MAX; i++) >> LIST_INIT(&V_regtree[i]); >> >> @@ -8145,6 +8379,7 @@ key_destroy(void) >> for (i = 0; i < V_sphash_mask + 1; i++) >> LIST_INIT(&V_sphashtbl[i]); >> SPTREE_WUNLOCK(); >> + spdcache_destroy(); >> >> sp = TAILQ_FIRST(&drainq); >> while (sp != NULL) { >> >> Modified: head/tools/tools/crypto/ipsecstats.c >> ============================================================================== >> --- head/tools/tools/crypto/ipsecstats.c Tue May 22 15:52:22 2018 >> (r334053) >> +++ head/tools/tools/crypto/ipsecstats.c Tue May 22 15:54:25 2018 >> (r334054) >> @@ -171,9 +171,9 @@ main(int argc, char *argv[]) >> STAT(ips.ips_out_noroute, "no route available %ju (output)"); >> STAT(ips.ips_out_inval, "generic error %ju (output)"); >> STAT(ips.ips_out_bundlesa, "bundled SA processed %ju (output)"); >> - printf("m_clone processing: %ju mbufs + %ju clusters coalesced\n", >> - (uintmax_t)ips.ips_mbcoalesced, (uintmax_t)ips.ips_clcoalesced); >> STAT(ips.ips_clcopied, "m_clone processing: %ju clusters copied\n"); >> + STAT(ips.ips_spdcache_hits, "spd cache hits %ju\n"); >> + STAT(ips.ips_spdcache_misses, "spd cache misses %ju\n"); >> STAT(ips.ips_mbinserted, "m_makespace: %ju mbufs inserted\n"); >> printf("header position [front/middle/end]: %ju/%ju/%ju\n", >> (uintmax_t)ips.ips_input_front, (uintmax_t)ips.ips_input_middle, >> >> Modified: head/usr.bin/netstat/ipsec.c >> ============================================================================== >> --- head/usr.bin/netstat/ipsec.c Tue May 22 15:52:22 2018 >> (r334053) >> +++ head/usr.bin/netstat/ipsec.c Tue May 22 15:54:25 2018 >> (r334054) >> @@ -191,6 +191,8 @@ print_ipsecstats(const struct ipsecstat *ipsecstat) >> >> #define p(f, m) if (ipsecstat->f || sflag <= 1) \ >> xo_emit(m, (uintmax_t)ipsecstat->f, plural(ipsecstat->f)) >> +#define p2(f, m) if (ipsecstat->f || sflag <= 1) \ >> + xo_emit(m, (uintmax_t)ipsecstat->f, plurales(ipsecstat->f)) >> >> p(ips_in_polvio, "\t{:dropped-policy-violation/%ju} " >> "{N:/inbound packet%s violated process security policy}\n"); >> @@ -210,14 +212,15 @@ print_ipsecstats(const struct ipsecstat *ipsecstat) >> "{N:/invalid outbound packet%s}\n"); >> p(ips_out_bundlesa, "\t{:send-bundled-sa/%ju} " >> "{N:/outbound packet%s with bundled SAs}\n"); >> - p(ips_mbcoalesced, "\t{:mbufs-coalesced-during-clone/%ju} " >> - "{N:/mbuf%s coalesced during clone}\n"); >> - p(ips_clcoalesced, "\t{:clusters-coalesced-during-clone/%ju} " >> - "{N:/cluster%s coalesced during clone}\n"); >> + p(ips_spdcache_hits, "\t{:spdcache-hits/%ju} " >> + "{N:/spd cache hit%s}\n"); >> + p2(ips_spdcache_misses, "\t{:spdcache-misses/%ju} " >> + "{N:/spd cache miss%s}\n"); >> p(ips_clcopied, "\t{:clusters-copied-during-clone/%ju} " >> "{N:/cluster%s copied during clone}\n"); >> p(ips_mbinserted, "\t{:mbufs-inserted/%ju} " >> "{N:/mbuf%s inserted during makespace}\n"); >> +#undef p2 >> #undef p >> xo_close_container("ipsec-statistics"); >> } >> > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Wed May 23 07:28:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53F24EF2D5F; Wed, 23 May 2018 07:28:01 +0000 (UTC) (envelope-from emeric.poupon@stormshield.eu) Received: from work.stormshield.eu (gwlille.netasq.com [91.212.116.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 740AB7B88B; Wed, 23 May 2018 07:28:00 +0000 (UTC) (envelope-from emeric.poupon@stormshield.eu) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTPS id 7AE2B37628FB; Wed, 23 May 2018 09:27:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id 6D35837628EE; Wed, 23 May 2018 09:27:49 +0200 (CEST) Received: from work.stormshield.eu ([127.0.0.1]) by localhost (work.stormshield.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jhLaEUSvO2Ka; Wed, 23 May 2018 09:27:49 +0200 (CEST) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id 588AA376288A; Wed, 23 May 2018 09:27:49 +0200 (CEST) Date: Wed, 23 May 2018 09:27:49 +0200 (CEST) From: Emeric POUPON To: Mateusz Guzik Cc: Fabien Thomas , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Message-ID: <714364035.13914889.1527060469295.JavaMail.zimbra@stormshield.eu> In-Reply-To: References: <201805221554.w4MFsPQA083334@repo.freebsd.org> Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Thread-Topic: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat Thread-Index: 0B0BWMtwYN6XxTXc5DZ4pqKyNxKGBw== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 07:28:01 -0000 ----- Original Message ----- > From: "Mateusz Guzik" > To: "Fabien Thomas" > Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "src-committers" > Sent: Tuesday, 22 May, 2018 18:45:32 > Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat > On Tue, May 22, 2018 at 5:54 PM, Fabien Thomas wrote: > >> Author: fabient >> Date: Tue May 22 15:54:25 2018 >> New Revision: 334054 >> URL: https://svnweb.freebsd.org/changeset/base/334054 >> >> Log: >> Add a SPD cache to speed up lookups. >> >> When large SPDs are used, we face two problems: >> >> - too many CPU cycles are spent during the linear searches in the SPD >> for each packet >> - too much contention on multi socket systems, since we use a single >> shared lock. >> >> >> void >> +spdcache_init(void) >> +{ >> + int i; >> + >> + TUNABLE_INT_FETCH("net.key.spdcache.maxentries", >> + &V_key_spdcache_maxentries); >> + TUNABLE_INT_FETCH("net.key.spdcache.threshold", >> + &V_key_spdcache_threshold); >> + >> + if (V_key_spdcache_maxentries) { >> + V_key_spdcache_maxentries = MAX(V_key_spdcache_maxentries, >> + SPDCACHE_MAX_ENTRIES_PER_HASH); >> + V_spdcachehashtbl = hashinit(V_key_spdcache_maxentries / >> + SPDCACHE_MAX_ENTRIES_PER_HASH, >> + M_IPSEC_SPDCACHE, &V_spdcachehash_mask); >> + V_key_spdcache_maxentries = (V_spdcachehash_mask + 1) >> + * SPDCACHE_MAX_ENTRIES_PER_HASH; >> + >> + V_spdcache_lock = malloc(sizeof(struct mtx) * >> + (V_spdcachehash_mask + 1), >> + M_IPSEC_SPDCACHE, M_WAITOK|M_ZERO); >> + >> + for (i = 0; i < V_spdcachehash_mask + 1; ++i) >> + SPDCACHE_LOCK_INIT(i); >> + } >> +} >> + >> > > This ends up putting two locks per cacheline and sharing bucket heads > across other lines. > > Unless you got a good reason not to, you should define a struct a which has > both the lock and the list. > > An example of this can be found in kern/kern_lockf.c Fortunately the SPD lookup time is negligible compared to crypto operations time with this patch. But you are right, it should have been done your way: we will change that in the next step. Thanks for pointing this out. > > -- > Mateusz Guzik > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Wed May 23 07:38:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 350CBEF327B; Wed, 23 May 2018 07:38:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD1D67BF1E; Wed, 23 May 2018 07:38:58 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A897E1FCF0; Wed, 23 May 2018 07:38:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N7cwGt062358; Wed, 23 May 2018 07:38:58 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N7cwQ4062357; Wed, 23 May 2018 07:38:58 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230738.w4N7cwQ4062357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 07:38:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334075 - head/usr.sbin/mpsutil X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.sbin/mpsutil X-SVN-Commit-Revision: 334075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 07:38:59 -0000 Author: eadler Date: Wed May 23 07:38:58 2018 New Revision: 334075 URL: https://svnweb.freebsd.org/changeset/base/334075 Log: mpsutil: add missing braces Obtained from: DragonFly (c5d53f11a9510c5c79e196857a1200925fffacc8) Modified: head/usr.sbin/mpsutil/mpsutil.c Modified: head/usr.sbin/mpsutil/mpsutil.c ============================================================================== --- head/usr.sbin/mpsutil/mpsutil.c Wed May 23 06:15:55 2018 (r334074) +++ head/usr.sbin/mpsutil/mpsutil.c Wed May 23 07:38:58 2018 (r334075) @@ -59,9 +59,10 @@ usage(void) fprintf(stderr, "usage: %s [-u unit] ...\n\n", getprogname()); fprintf(stderr, "Commands include:\n"); SET_FOREACH(cmd, MPS_DATASET(usage)) { - if (*cmd == NULL) + if (*cmd == NULL) { fprintf(stderr, "\n"); - else + } + else { (*cmd)->handler(&args, &desc); if (strncmp((*cmd)->set, "top", 3) == 0) fprintf(stderr, "%s %-30s\t%s\n", @@ -69,6 +70,7 @@ usage(void) else fprintf(stderr, "%s %s %-30s\t%s\n", (*cmd)->set, (*cmd)->name, args, desc); + } } exit(1); } From owner-svn-src-head@freebsd.org Wed May 23 07:39:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FDE9EF328B; Wed, 23 May 2018 07:39:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C98B7BF21; Wed, 23 May 2018 07:39:01 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0DA2A1FCF1; Wed, 23 May 2018 07:39:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N7d04b062407; Wed, 23 May 2018 07:39:00 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N7d00D062406; Wed, 23 May 2018 07:39:00 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230739.w4N7d00D062406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 07:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334076 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 334076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 07:39:01 -0000 Author: eadler Date: Wed May 23 07:39:00 2018 New Revision: 334076 URL: https://svnweb.freebsd.org/changeset/base/334076 Log: mrsas(4): Remove unneed extra arg from MR_LdBlockSizeGet(). Obtained From: DragonFly (482292f9859e1ceae4f35343c0a8eac4c4486d1) Modified: head/sys/dev/mrsas/mrsas_cam.c Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Wed May 23 07:38:58 2018 (r334075) +++ head/sys/dev/mrsas/mrsas_cam.c Wed May 23 07:39:00 2018 (r334076) @@ -116,8 +116,7 @@ mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_ extern int mrsas_reset_targets(struct mrsas_softc *sc); extern u_int16_t MR_TargetIdToLdGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map); extern u_int32_t -MR_LdBlockSizeGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map, - struct mrsas_softc *sc); +MR_LdBlockSizeGet(u_int32_t ldTgtId, MR_DRV_RAID_MAP_ALL * map); extern void mrsas_isr(void *arg); extern void mrsas_aen_handler(struct mrsas_softc *sc); extern u_int8_t @@ -895,7 +894,7 @@ mrsas_setup_io(struct mrsas_softc *sc, struct mrsas_mp } map_ptr = sc->ld_drv_map[(sc->map_id & 1)]; - ld_block_size = MR_LdBlockSizeGet(device_id, map_ptr, sc); + ld_block_size = MR_LdBlockSizeGet(device_id, map_ptr); ld = MR_TargetIdToLdGet(device_id, map_ptr); if ((ld >= MAX_LOGICAL_DRIVES_EXT) || (!sc->fast_path_io)) { From owner-svn-src-head@freebsd.org Wed May 23 07:39:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8D14EF32AF; Wed, 23 May 2018 07:39:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C62627BFE8; Wed, 23 May 2018 07:39:05 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB4CE1FCF2; Wed, 23 May 2018 07:39:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N7d3xw062453; Wed, 23 May 2018 07:39:03 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N7d34c062450; Wed, 23 May 2018 07:39:03 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230739.w4N7d34c062450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 07:39:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334077 - in head/sbin/devd: . tests X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head/sbin/devd: . tests X-SVN-Commit-Revision: 334077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 07:39:06 -0000 Author: eadler Date: Wed May 23 07:39:02 2018 New Revision: 334077 URL: https://svnweb.freebsd.org/changeset/base/334077 Log: devd: correct two warnings - catching a polymorphic type by value - "output between 16 and 95 bytes into a destination of size 80" Modified: head/sbin/devd/devd.cc head/sbin/devd/tests/client_test.c Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Wed May 23 07:39:00 2018 (r334076) +++ head/sbin/devd/devd.cc Wed May 23 07:39:02 2018 (r334077) @@ -1087,7 +1087,7 @@ event_loop(void) try { process_event(buffer); } - catch (std::length_error e) { + catch (const std::length_error& e) { devdlog(LOG_ERR, "Dropping event %s " "due to low memory", buffer); } Modified: head/sbin/devd/tests/client_test.c ============================================================================== --- head/sbin/devd/tests/client_test.c Wed May 23 07:39:00 2018 (r334076) +++ head/sbin/devd/tests/client_test.c Wed May 23 07:39:02 2018 (r334077) @@ -50,7 +50,7 @@ create_two_events(void) FILE *create_stdout; FILE *destroy_stdout; char mdname[80]; - char destroy_cmd[80]; + char destroy_cmd[95]; char *error; create_stdout = popen("mdconfig -a -s 64 -t null", "r"); From owner-svn-src-head@freebsd.org Wed May 23 07:39:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47BF3EF32E3; Wed, 23 May 2018 07:39:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 463FB7C026; Wed, 23 May 2018 07:39:07 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E9341FCF3; Wed, 23 May 2018 07:39:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N7d5Q3062499; Wed, 23 May 2018 07:39:05 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N7d5Z1062496; Wed, 23 May 2018 07:39:05 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230739.w4N7d5Z1062496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 07:39:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334078 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 334078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 07:39:11 -0000 Author: eadler Date: Wed May 23 07:39:05 2018 New Revision: 334078 URL: https://svnweb.freebsd.org/changeset/base/334078 Log: devd: compile at WARNS=6 Verified with "make universe TARGETS='amd64 arm arm64 i386 sparc64'" Modified: head/sbin/devd/Makefile head/sbin/devd/devd.cc head/sbin/devd/token.l Modified: head/sbin/devd/Makefile ============================================================================== --- head/sbin/devd/Makefile Wed May 23 07:39:02 2018 (r334077) +++ head/sbin/devd/Makefile Wed May 23 07:39:05 2018 (r334078) @@ -7,7 +7,7 @@ PROG_CXX=devd SRCS= devd.cc token.l parse.y y.tab.h MAN= devd.8 devd.conf.5 -WARNS?= 3 +YFLAGS=-dvi NO_SHARED?=YES @@ -16,7 +16,7 @@ LIBADD= l util YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} -CLEANFILES= y.output +CLEANFILES= y.output y.tab.i HAS_TESTS= SUBDIR.${MK_TESTS}+= tests Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Wed May 23 07:39:02 2018 (r334077) +++ head/sbin/devd/devd.cc Wed May 23 07:39:05 2018 (r334078) @@ -173,7 +173,7 @@ delete_and_clear(vector &v) v.clear(); } -config cfg; +static config cfg; event_proc::event_proc() : _prio(-1) { @@ -902,10 +902,10 @@ create_socket(const char *name, int socktype) return (fd); } -unsigned int max_clients = 10; /* Default, can be overridden on cmdline. */ -unsigned int num_clients; +static unsigned int max_clients = 10; /* Default, can be overridden on cmdline. */ +static unsigned int num_clients; -list clients; +static list clients; void notify_clients(const char *data, int len) Modified: head/sbin/devd/token.l ============================================================================== --- head/sbin/devd/token.l Wed May 23 07:39:02 2018 (r334077) +++ head/sbin/devd/token.l Wed May 23 07:39:05 2018 (r334078) @@ -38,6 +38,7 @@ #include "devd.h" #include "y.tab.h" +extern int lineno; int lineno = 1; static void From owner-svn-src-head@freebsd.org Wed May 23 07:44:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C48DEF389D; Wed, 23 May 2018 07:44:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39C667CB06; Wed, 23 May 2018 07:44:51 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B0331FE8E; Wed, 23 May 2018 07:44:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N7ioXK067989; Wed, 23 May 2018 07:44:50 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N7io3D067988; Wed, 23 May 2018 07:44:50 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230744.w4N7io3D067988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 07:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334079 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 334079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 07:44:51 -0000 Author: eadler Date: Wed May 23 07:44:50 2018 New Revision: 334079 URL: https://svnweb.freebsd.org/changeset/base/334079 Log: devd: allow build to complete using g++ Modified: head/sbin/devd/Makefile Modified: head/sbin/devd/Makefile ============================================================================== --- head/sbin/devd/Makefile Wed May 23 07:39:05 2018 (r334078) +++ head/sbin/devd/Makefile Wed May 23 07:44:50 2018 (r334079) @@ -15,6 +15,8 @@ LIBADD= l util YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} +CFLAGS.gcc = -Wno-redundant-decls +CXXFLAGS.gcc = -Wno-redundant-decls CLEANFILES= y.output y.tab.i From owner-svn-src-head@freebsd.org Wed May 23 07:54:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC1E2EF3F2E; Wed, 23 May 2018 07:54:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 681877D48C; Wed, 23 May 2018 07:54:59 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4863720031; Wed, 23 May 2018 07:54:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N7sx7u073518; Wed, 23 May 2018 07:54:59 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N7sxhg073517; Wed, 23 May 2018 07:54:59 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230754.w4N7sxhg073517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 07:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334080 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 334080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 07:54:59 -0000 Author: eadler Date: Wed May 23 07:54:58 2018 New Revision: 334080 URL: https://svnweb.freebsd.org/changeset/base/334080 Log: bsd.sys.mk: add links and update a bit - add links to more modern resources - remove 'k&r' which is unused in FreeBSD - remove stray comment Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Wed May 23 07:44:50 2018 (r334079) +++ head/share/mk/bsd.sys.mk Wed May 23 07:54:58 2018 (r334080) @@ -6,16 +6,16 @@ # Enable various levels of compiler warning checks. These may be # overridden (e.g. if using a non-gcc compiler) by defining MK_WARNS=no. -# for GCC: http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Warning-Options.html +# for 4.2.1 GCC: http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Warning-Options.html +# for current GCC: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +# for clang: https://clang.llvm.org/docs/DiagnosticsReference.html .include # the default is gnu99 for now CSTD?= gnu99 -.if ${CSTD} == "k&r" -CFLAGS+= -traditional -.elif ${CSTD} == "c89" || ${CSTD} == "c90" +.if ${CSTD} == "c89" || ${CSTD} == "c90" CFLAGS+= -std=iso9899:1990 .elif ${CSTD} == "c94" || ${CSTD} == "c95" CFLAGS+= -std=iso9899:199409 @@ -47,7 +47,6 @@ CWARNFLAGS+= -Wreturn-type -Wcast-qual -Wwrite-strings CWARNFLAGS+= -Wcast-align .endif # !NO_WCAST_ALIGN !NO_WCAST_ALIGN.${COMPILER_TYPE} .endif # WARNS >= 4 -# BDECFLAGS .if ${WARNS} >= 6 CWARNFLAGS+= -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls\ -Wold-style-definition From owner-svn-src-head@freebsd.org Wed May 23 08:35:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02C73EF4E6C; Wed, 23 May 2018 08:35:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DD8D7E82C; Wed, 23 May 2018 08:35:55 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EC3D206BD; Wed, 23 May 2018 08:35:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N8Zt94093847; Wed, 23 May 2018 08:35:55 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N8ZtG8093846; Wed, 23 May 2018 08:35:55 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230835.w4N8ZtG8093846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 08:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334081 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 334081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 08:35:56 -0000 Author: eadler Date: Wed May 23 08:35:55 2018 New Revision: 334081 URL: https://svnweb.freebsd.org/changeset/base/334081 Log: bsd.sys.mk: add -Wmain to WARNS=1 Even in very low "WARNS" conditions, 'main' ought to be reasonable. Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Wed May 23 07:54:58 2018 (r334080) +++ head/share/mk/bsd.sys.mk Wed May 23 08:35:55 2018 (r334081) @@ -28,7 +28,7 @@ CFLAGS+= -std=${CSTD} #CFLAGS+= -pedantic .if defined(WARNS) .if ${WARNS} >= 1 -CWARNFLAGS+= -Wsystem-headers +CWARNFLAGS+= -Wsystem-headers -Wmain .if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE}) CWARNFLAGS+= -Werror .endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE} From owner-svn-src-head@freebsd.org Wed May 23 08:53:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3488EF5561; Wed, 23 May 2018 08:53:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 762C67F15E; Wed, 23 May 2018 08:53:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 40DE226542; Wed, 23 May 2018 08:53:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 0AD354609D; Wed, 23 May 2018 10:53:26 +0200 (CEST) Date: Wed, 23 May 2018 10:53:26 +0200 From: Baptiste Daroussin To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334075 - head/usr.sbin/mpsutil Message-ID: <20180523085325.v6uuzowrueqtuqz3@ivaldir.net> References: <201805230738.w4N7cwQ4062357@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="g3xeg5bvencevkxw" Content-Disposition: inline In-Reply-To: <201805230738.w4N7cwQ4062357@repo.freebsd.org> User-Agent: NeoMutt/20180323 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 08:53:27 -0000 --g3xeg5bvencevkxw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 23, 2018 at 07:38:58AM +0000, Eitan Adler wrote: > Author: eadler > Date: Wed May 23 07:38:58 2018 > New Revision: 334075 > URL: https://svnweb.freebsd.org/changeset/base/334075 >=20 > Log: > mpsutil: add missing braces > =20 > Obtained from: DragonFly (c5d53f11a9510c5c79e196857a1200925fffacc8) >=20 > Modified: > head/usr.sbin/mpsutil/mpsutil.c >=20 > Modified: head/usr.sbin/mpsutil/mpsutil.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/mpsutil/mpsutil.c Wed May 23 06:15:55 2018 (r334074) > +++ head/usr.sbin/mpsutil/mpsutil.c Wed May 23 07:38:58 2018 (r334075) > @@ -59,9 +59,10 @@ usage(void) > fprintf(stderr, "usage: %s [-u unit] ...\n\n", getprogname()); > fprintf(stderr, "Commands include:\n"); > SET_FOREACH(cmd, MPS_DATASET(usage)) { > - if (*cmd =3D=3D NULL) > + if (*cmd =3D=3D NULL) { > fprintf(stderr, "\n"); > - else > + } > + else { Style > (*cmd)->handler(&args, &desc); > if (strncmp((*cmd)->set, "top", 3) =3D=3D 0) > fprintf(stderr, "%s %-30s\t%s\n", > @@ -69,6 +70,7 @@ usage(void) > else > fprintf(stderr, "%s %s %-30s\t%s\n", > (*cmd)->set, (*cmd)->name, args, desc); > + } > } > exit(1); > } >=20 --g3xeg5bvencevkxw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlsFK/4ACgkQY4mL3PG3 Plpmlg//dGrP9iEBt3zF57w++AL9QbYK0LPaU2k2XpM/6S13l57CDE7AZRjKqbdB btihjNg0QzjVbLy2yKi/NUFRdOBbbZQSE4PuoVYw1NfnQ3CQ+Z6CMrjw8W7rYa2g qnHDuo2KdlNPjTTJ9IBfOZChJALCovXa933QgHJ/RrC8Hkdl3a9oz3M16GdlzpPJ sOj3RmHcK+EmCkU7vH2W3MYRNrZ4bAv2ImpiT5SMkkyXgSd5KrdhF6wAPmz5uurw 4EkFoKK57Lruoc+M9+tLs6TlDXMzj5h+gA1NtHMRhwkppms78s6JQO1/WCf+AgkO 1xpOsQTvrRZvdIkmg0u2nhwaX0F3uwJkOoFbFEmuMjLPJIGW2frTcR2y2e9SXvHu fWehWLD7uZBR30kl8BReX5g2c8TqjXVCyTo9tLYI9hJXXH8PrEDrcakST1hiuy2O Rf+31nQC7CBCYWuvECHKkRZjUZ/DfKv+GaAenlO7dx+R3lpZ9p2kf8RDXYmpFRy1 BtHpXqX/EeM4bqdHJS4XPTYXJJGeAD0lxXVI9O9uQYuOcgtuFCllCzYB2b2WNc4+ 2FCuXReMN2ljwWUGDvzvlkrdwew7hh98Kj2MilehVn0IxqnWOY+wDySvAo5b77lK mMXl25s9bPrMWOO1pVS8JDdDQts96AXWVPOec2PYpcji6svkLyY= =Txn0 -----END PGP SIGNATURE----- --g3xeg5bvencevkxw-- From owner-svn-src-head@freebsd.org Wed May 23 09:02:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD2D9EF5ACB; Wed, 23 May 2018 09:02:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C1C37F656; Wed, 23 May 2018 09:02:32 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DF8920B8F; Wed, 23 May 2018 09:02:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N92Wta008906; Wed, 23 May 2018 09:02:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N92W6r008905; Wed, 23 May 2018 09:02:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230902.w4N92W6r008905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 09:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334082 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 334082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 09:02:32 -0000 Author: eadler Date: Wed May 23 09:02:31 2018 New Revision: 334082 URL: https://svnweb.freebsd.org/changeset/base/334082 Log: Add missing file for WITH{OUT}_BSDINSTAL PR: 227805 Submitted by: Dmitry Wagin Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed May 23 08:35:55 2018 (r334081) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed May 23 09:02:31 2018 (r334082) @@ -661,6 +661,7 @@ OLD_FILES+=usr/share/man/man1/cpio.1.gz OLD_FILES+=usr/libexec/bsdinstall/adduser OLD_FILES+=usr/libexec/bsdinstall/auto OLD_FILES+=usr/libexec/bsdinstall/autopart +OLD_FILES+=usr/libexec/bsdinstall/bootconfig OLD_FILES+=usr/libexec/bsdinstall/checksum OLD_FILES+=usr/libexec/bsdinstall/config OLD_FILES+=usr/libexec/bsdinstall/distextract From owner-svn-src-head@freebsd.org Wed May 23 09:16:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4B66EF5FEF; Wed, 23 May 2018 09:16:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8258E7FFB8; Wed, 23 May 2018 09:16:21 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62DB720D33; Wed, 23 May 2018 09:16:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N9GLGp013932; Wed, 23 May 2018 09:16:21 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N9GLcb013931; Wed, 23 May 2018 09:16:21 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230916.w4N9GLcb013931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 09:16:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334083 - head/usr.bin/cut X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/cut X-SVN-Commit-Revision: 334083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 09:16:22 -0000 Author: eadler Date: Wed May 23 09:16:20 2018 New Revision: 334083 URL: https://svnweb.freebsd.org/changeset/base/334083 Log: cut: Fix out of boundary write on illegal list argument It is possible to trigger an out of boundary write in cut if an invalid range with autostart has been supplied. PR: 227330 Submitted by: tobias@stoeckmann.org Modified: head/usr.bin/cut/cut.c Modified: head/usr.bin/cut/cut.c ============================================================================== --- head/usr.bin/cut/cut.c Wed May 23 09:02:31 2018 (r334082) +++ head/usr.bin/cut/cut.c Wed May 23 09:16:20 2018 (r334083) @@ -210,6 +210,12 @@ get_list(char *list) needpos(maxval + 1); } + /* reversed range with autostart */ + if (maxval < autostart) { + maxval = autostart; + needpos(maxval + 1); + } + /* set autostart */ if (autostart) memset(positions + 1, '1', autostart); From owner-svn-src-head@freebsd.org Wed May 23 09:34:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DF77EF694B; Wed, 23 May 2018 09:34:52 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADC4A809EC; Wed, 23 May 2018 09:34:51 +0000 (UTC) (envelope-from araujo@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FDFD2108D; Wed, 23 May 2018 09:34:51 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N9YpSA023859; Wed, 23 May 2018 09:34:51 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N9YpWh023858; Wed, 23 May 2018 09:34:51 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201805230934.w4N9YpWh023858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 23 May 2018 09:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334084 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 334084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 09:34:52 -0000 Author: araujo Date: Wed May 23 09:34:51 2018 New Revision: 334084 URL: https://svnweb.freebsd.org/changeset/base/334084 Log: pthread_rwlock_unlock(3) returns 0 if successful, otherwise an error number will be returned to indicate the error, so I'm applying an assert(3) to do a sanity check of the return value. Reported by: Coverity CID: 1391235, 1193654 and 1193651 Reviewed by: grehan MFC after: 4 weeks. Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D15533 Modified: head/usr.sbin/bhyve/mem.c Modified: head/usr.sbin/bhyve/mem.c ============================================================================== --- head/usr.sbin/bhyve/mem.c Wed May 23 09:16:20 2018 (r334083) +++ head/usr.sbin/bhyve/mem.c Wed May 23 09:34:51 2018 (r334084) @@ -123,6 +123,7 @@ mmio_rb_add(struct mmio_rb_tree *rbt, struct mmio_rb_r static void mmio_rb_dump(struct mmio_rb_tree *rbt) { + int perror; struct mmio_rb_range *np; pthread_rwlock_rdlock(&mmio_rwlock); @@ -130,7 +131,8 @@ mmio_rb_dump(struct mmio_rb_tree *rbt) printf(" %lx:%lx, %s\n", np->mr_base, np->mr_end, np->mr_param.name); } - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); } #endif @@ -166,7 +168,7 @@ access_memory(struct vmctx *ctx, int vcpu, uint64_t pa void *arg) { struct mmio_rb_range *entry; - int err, immutable; + int err, perror, immutable; pthread_rwlock_rdlock(&mmio_rwlock); /* @@ -184,7 +186,8 @@ access_memory(struct vmctx *ctx, int vcpu, uint64_t pa /* Update the per-vCPU cache */ mmio_hint[vcpu] = entry; } else if (mmio_rb_lookup(&mmio_rb_fallback, paddr, &entry)) { - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); return (ESRCH); } } @@ -203,14 +206,19 @@ access_memory(struct vmctx *ctx, int vcpu, uint64_t pa * config space window as 'immutable' the deadlock can be avoided. */ immutable = (entry->mr_param.flags & MEM_F_IMMUTABLE); - if (immutable) - pthread_rwlock_unlock(&mmio_rwlock); + if (immutable) { + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); + } err = cb(ctx, vcpu, paddr, &entry->mr_param, arg); - if (!immutable) - pthread_rwlock_unlock(&mmio_rwlock); + if (!immutable) { + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); + } + return (err); } @@ -272,7 +280,7 @@ static int register_mem_int(struct mmio_rb_tree *rbt, struct mem_range *memp) { struct mmio_rb_range *entry, *mrp; - int err; + int err, perror; err = 0; @@ -285,7 +293,8 @@ register_mem_int(struct mmio_rb_tree *rbt, struct mem_ pthread_rwlock_wrlock(&mmio_rwlock); if (mmio_rb_lookup(rbt, memp->base, &entry) != 0) err = mmio_rb_add(rbt, mrp); - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); if (err) free(mrp); } else @@ -313,7 +322,7 @@ unregister_mem(struct mem_range *memp) { struct mem_range *mr; struct mmio_rb_range *entry = NULL; - int err, i; + int err, perror, i; pthread_rwlock_wrlock(&mmio_rwlock); err = mmio_rb_lookup(&mmio_rb_root, memp->base, &entry); @@ -330,7 +339,8 @@ unregister_mem(struct mem_range *memp) mmio_hint[i] = NULL; } } - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); if (entry) free(entry); From owner-svn-src-head@freebsd.org Wed May 23 09:46:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B101EF6E7F; Wed, 23 May 2018 09:46:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2B8A80FD7; Wed, 23 May 2018 09:46:21 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3FAB21232; Wed, 23 May 2018 09:46:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4N9kL2j029148; Wed, 23 May 2018 09:46:21 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4N9kLON029147; Wed, 23 May 2018 09:46:21 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805230946.w4N9kLON029147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 09:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334085 - head/usr.sbin/mpsutil X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.sbin/mpsutil X-SVN-Commit-Revision: 334085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 09:46:22 -0000 Author: eadler Date: Wed May 23 09:46:21 2018 New Revision: 334085 URL: https://svnweb.freebsd.org/changeset/base/334085 Log: mpsutil: correct style Reported by: bapt Modified: head/usr.sbin/mpsutil/mpsutil.c Modified: head/usr.sbin/mpsutil/mpsutil.c ============================================================================== --- head/usr.sbin/mpsutil/mpsutil.c Wed May 23 09:34:51 2018 (r334084) +++ head/usr.sbin/mpsutil/mpsutil.c Wed May 23 09:46:21 2018 (r334085) @@ -61,8 +61,7 @@ usage(void) SET_FOREACH(cmd, MPS_DATASET(usage)) { if (*cmd == NULL) { fprintf(stderr, "\n"); - } - else { + } else { (*cmd)->handler(&args, &desc); if (strncmp((*cmd)->set, "top", 3) == 0) fprintf(stderr, "%s %-30s\t%s\n", From owner-svn-src-head@freebsd.org Wed May 23 10:03:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B67CEEF7716; Wed, 23 May 2018 10:03:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F02F81B22; Wed, 23 May 2018 10:03:10 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4004D2155B; Wed, 23 May 2018 10:03:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NA3AdK038926; Wed, 23 May 2018 10:03:10 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NA3AGj038925; Wed, 23 May 2018 10:03:10 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805231003.w4NA3AGj038925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 10:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334086 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 334086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 10:03:10 -0000 Author: eadler Date: Wed May 23 10:03:09 2018 New Revision: 334086 URL: https://svnweb.freebsd.org/changeset/base/334086 Log: devd: Unbreak build I'm not quite sure why this wasn't caught before. Most likely due to some generated file not being properly cleaned. Fix build by just hiding the warnings that `-i` was supposed to fix. Tested with clang, gcc9, gcc7 Modified: head/sbin/devd/Makefile Modified: head/sbin/devd/Makefile ============================================================================== --- head/sbin/devd/Makefile Wed May 23 09:46:21 2018 (r334085) +++ head/sbin/devd/Makefile Wed May 23 10:03:09 2018 (r334086) @@ -7,14 +7,13 @@ PROG_CXX=devd SRCS= devd.cc token.l parse.y y.tab.h MAN= devd.8 devd.conf.5 -YFLAGS=-dvi - NO_SHARED?=YES LIBADD= l util YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} +CFLAGS.clang += -Wno-missing-variable-declarations CFLAGS.gcc = -Wno-redundant-decls CXXFLAGS.gcc = -Wno-redundant-decls From owner-svn-src-head@freebsd.org Wed May 23 10:13:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86C72EF7AB6; Wed, 23 May 2018 10:13:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 396D481FCF; Wed, 23 May 2018 10:13:18 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A9E521703; Wed, 23 May 2018 10:13:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NADHqG044154; Wed, 23 May 2018 10:13:17 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NADHjc044153; Wed, 23 May 2018 10:13:17 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201805231013.w4NADHjc044153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 23 May 2018 10:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334087 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 10:13:18 -0000 Author: mjg Date: Wed May 23 10:13:17 2018 New Revision: 334087 URL: https://svnweb.freebsd.org/changeset/base/334087 Log: Remove incorrect owepreempt assertion added in r334062 Yet another preemption request hitting between the counter being 0 and the check being reached will result in the flag no longer being set. Note the situation was already present prior to r334062 and is harmless. Reported by: pho Reviewed by: kib Modified: head/sys/kern/kern_switch.c Modified: head/sys/kern/kern_switch.c ============================================================================== --- head/sys/kern/kern_switch.c Wed May 23 10:03:09 2018 (r334086) +++ head/sys/kern/kern_switch.c Wed May 23 10:13:17 2018 (r334087) @@ -215,9 +215,13 @@ critical_exit_preempt(void) struct thread *td; int flags; + /* + * If td_critnest is 0, it is possible that we are going to get + * preempted again before reaching the code below. This happens + * rarely and is harmless. However, this means td_owepreempt may + * now be unset. + */ td = curthread; - KASSERT(td->td_owepreempt != 0, - ("critical_exit: td_owepreempt == 0")); if (td->td_critnest != 0) return; if (kdb_active) From owner-svn-src-head@freebsd.org Wed May 23 10:18:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94D35EF7CA6; Wed, 23 May 2018 10:18:26 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot0-x235.google.com (mail-ot0-x235.google.com [IPv6:2607:f8b0:4003:c0f::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 112E7821C0; Wed, 23 May 2018 10:18:26 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot0-x235.google.com with SMTP id 77-v6so24556163otd.4; Wed, 23 May 2018 03:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SLbwgoV6dcs6s+Ye7fFGXCmlg1IBf84gZx5aRwzMe/4=; b=F3wzUjVAuNFhEUIXtyHTP6CBTHEdjk6m8lpW7fWm6i26tXnEsbsTP3+tmXngCUnGMh kIKBYUs+HniG10MkBYKtVR96Djapl2CnUGui3ZV8s8Sdg6KmWzniPMSVlCy+d7npOQhQ TGIzzQM9KHHqDCdWzbUnz2gf3X8y+vu9u5oAXFCRWDjovTfwEzbpSdlkn/kxA6DbtpaJ HZGJOoysq2cCpqseWRTnsnE9f9ZagsN/5BrGHZu4JLSjJ3S+Oa2Cw3bpKgsE7HPzQ3cq jyHgUza1BkTtyw8yM04oMr0epKmH2J95KtGL+iGdeDccXbXyq20hih536FcAyTGC36mV cdvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SLbwgoV6dcs6s+Ye7fFGXCmlg1IBf84gZx5aRwzMe/4=; b=UwBfFCKCZOdjh7Yot+rBmQhFpxZ5mUxup5arRBbGOBWORR92CHMCAy7ffrs5a/rNmy ZLZy3X03QXXmL9JD7JQO7flkuPHvSJljx5rhDZ7q7isnTzCvLzzTDzkyIHX3rTNtbh2n +JU5jqL1A8MZ5EOgpHCwIKT7iLF+nW5RIfrKacrF4GRA5M2qXjZG5SFRjeV8CDjtqvTu cbeyF59ZL/ob07U3J+wnsahaDC43c9ZE7g8zYgDNHu58Swmbcu34TuV4iu1d9mPqqDli VW4/WdKIiR2Rhyqj4QPPI+KDfg/MGZbWgHxLTUSq9bYX/IHQ42QbGHRcXBZHkDXhmuzP nWrg== X-Gm-Message-State: ALKqPwe2FFtmPHBnRmDFfxiNCtxHVuAG06jino74TQQIusYp5src6AA7 cD8grILIHyacwwSM4kmd2S58XPyrWFanl8TjKOk= X-Google-Smtp-Source: AB8JxZqSKEM69dITDDmju08zf+fif/Vk3p8JIWpqAamjR8z01+O4BQpclpuBm49mWKA4NNLTI64G0NIrxRTGXsV5X20= X-Received: by 2002:a9d:2842:: with SMTP id h2-v6mr1430351otd.210.1527070705088; Wed, 23 May 2018 03:18:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:348e:0:0:0:0:0 with HTTP; Wed, 23 May 2018 03:18:24 -0700 (PDT) In-Reply-To: <201805230409.w4N491iB057004@repo.freebsd.org> References: <201805230409.w4N491iB057004@repo.freebsd.org> From: Benjamin Kaduk Date: Wed, 23 May 2018 05:18:24 -0500 Message-ID: Subject: Re: svn commit: r334073 - head To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 10:18:26 -0000 On Tue, May 22, 2018 at 11:09 PM, Eitan Adler wrote: > Author: eadler > Date: Wed May 23 04:09:01 2018 > New Revision: 334073 > URL: https://svnweb.freebsd.org/changeset/base/334073 > > Log: > README: Reduce the textdump; describe the project > > Rework the README to make it a little easier for new users. This is the > first file many will see when persuing the FreeBSD source code so > > - remove some of the text describes how to build. This is better covered > in the linked documentation. > - add a small blurb for what FreeBSD is. Some users might find this > document through features such as github search so they may not even > know what the project is > > generally, gear this file for the new, accidental, or casual user rather > than towards someone seeking fuller documentation. > > Modified: > head/README > head/README.md > Changes to "the first file many will see when perusing the FreeBSD source code" seem like something sufficiently impactful that pre-commit review and/or consultation with other committers would be advised. (That said, these changes do seem reasonable, on a quick read.) -Ben From owner-svn-src-head@freebsd.org Wed May 23 10:39:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D513EF9275; Wed, 23 May 2018 10:39:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04BF383B91; Wed, 23 May 2018 10:39:03 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB11F21A33; Wed, 23 May 2018 10:39:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NAd2Fg053958; Wed, 23 May 2018 10:39:02 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NAd2pP053957; Wed, 23 May 2018 10:39:02 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805231039.w4NAd2pP053957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 10:39:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334088 - head/share/timedef X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/timedef X-SVN-Commit-Revision: 334088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 10:39:03 -0000 Author: eadler Date: Wed May 23 10:39:02 2018 New Revision: 334088 URL: https://svnweb.freebsd.org/changeset/base/334088 Log: timedef: Update Czech timedef This changes date format from 2015/05/12 to 05.12.2015. PR: 200591 Submitted by: grafnetter@dekanat.mff.cuni.cz Modified: head/share/timedef/cs_CZ.ISO8859-2.src Modified: head/share/timedef/cs_CZ.ISO8859-2.src ============================================================================== --- head/share/timedef/cs_CZ.ISO8859-2.src Wed May 23 10:13:17 2018 (r334087) +++ head/share/timedef/cs_CZ.ISO8859-2.src Wed May 23 10:39:02 2018 (r334088) @@ -53,7 +53,7 @@ sobota %H:%M:%S # # x_fmt -%Y/%m/%d +%d.%m.%Y # # c_fmt %a %e %b %X %Y From owner-svn-src-head@freebsd.org Wed May 23 10:45:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 635CCEF97DE; Wed, 23 May 2018 10:45:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15E6084293; Wed, 23 May 2018 10:45:33 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E79F421BDF; Wed, 23 May 2018 10:45:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NAjWnr059105; Wed, 23 May 2018 10:45:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NAjWsv059104; Wed, 23 May 2018 10:45:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805231045.w4NAjWsv059104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 10:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334089 - head/sbin/dumpon X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/dumpon X-SVN-Commit-Revision: 334089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 10:45:33 -0000 Author: eadler Date: Wed May 23 10:45:32 2018 New Revision: 334089 URL: https://svnweb.freebsd.org/changeset/base/334089 Log: dumpon: point to better kernel debug symbols. The objdir is temporary, and the current example points to GENERIC. Instead point to the installed location of the debug symbols that are supposed to match the kernel you are using. PR: 223993 Submitted by: Trond.Endrestol@ximalas.info Modified: head/sbin/dumpon/dumpon.8 Modified: head/sbin/dumpon/dumpon.8 ============================================================================== --- head/sbin/dumpon/dumpon.8 Wed May 23 10:39:02 2018 (r334088) +++ head/sbin/dumpon/dumpon.8 Wed May 23 10:45:32 2018 (r334089) @@ -311,11 +311,11 @@ The can be now examined using .Xr kgdb 1 : .Pp -.Dl # kgdb /usr/obj/sys/GENERIC/kernel.debug vmcore.# +.Dl # kgdb /usr/lib/debug/boot/kernel/kernel.debug vmcore.# .Pp or shorter: .Pp -.Dl # kgdb -n # /usr/obj/sys/GENERIC/kernel.debug +.Dl # kgdb -n # /usr/lib/debug/boot/kernel/kernel.debug .Pp The core was decrypted properly if .Xr kgdb 1 From owner-svn-src-head@freebsd.org Wed May 23 11:20:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E703EFA517; Wed, 23 May 2018 11:20:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EBF385C8B; Wed, 23 May 2018 11:20:17 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2125E220AE; Wed, 23 May 2018 11:20:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NBKH5b074135; Wed, 23 May 2018 11:20:17 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NBKGhK074134; Wed, 23 May 2018 11:20:16 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805231120.w4NBKGhK074134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 11:20:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334090 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 334090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 11:20:17 -0000 Author: eadler Date: Wed May 23 11:20:16 2018 New Revision: 334090 URL: https://svnweb.freebsd.org/changeset/base/334090 Log: libmd: build with WARNS=1 - build with WARNS=1. This works without any changes - remove two unused variables noticed at WARNS=2 Modified: head/lib/libmd/Makefile head/lib/libmd/mdXhl.c Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Wed May 23 10:45:32 2018 (r334089) +++ head/lib/libmd/Makefile Wed May 23 11:20:16 2018 (r334090) @@ -15,7 +15,7 @@ SRCS= md4c.c md5c.c md4hl.c md5hl.c \ INCS= md4.h md5.h ripemd.h sha.h sha256.h sha384.h sha512.h sha512t.h \ skein.h skein_port.h skein_freebsd.h skein_iv.h -WARNS?= 0 +WARNS?= 1 MAN+= md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3 skein.3 MLINKS+=md4.3 MD4Init.3 md4.3 MD4Update.3 md4.3 MD4Final.3 Modified: head/lib/libmd/mdXhl.c ============================================================================== --- head/lib/libmd/mdXhl.c Wed May 23 10:45:32 2018 (r334089) +++ head/lib/libmd/mdXhl.c Wed May 23 11:20:16 2018 (r334090) @@ -54,8 +54,7 @@ MDXFdChunk(int fd, char *buf, off_t ofs, off_t len) { unsigned char buffer[16*1024]; MDX_CTX ctx; - struct stat stbuf; - int readrv, e; + int readrv; off_t remain; if (len < 0) { From owner-svn-src-head@freebsd.org Wed May 23 11:45:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4AB5EFAFC2; Wed, 23 May 2018 11:45:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 886B886BB4; Wed, 23 May 2018 11:45:47 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 699AE22578; Wed, 23 May 2018 11:45:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NBjlVC089282; Wed, 23 May 2018 11:45:47 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NBjlrH089281; Wed, 23 May 2018 11:45:47 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805231145.w4NBjlrH089281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 11:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334091 - head/sbin/md5 X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/md5 X-SVN-Commit-Revision: 334091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 11:45:48 -0000 Author: eadler Date: Wed May 23 11:45:46 2018 New Revision: 334091 URL: https://svnweb.freebsd.org/changeset/base/334091 Log: md5: perform compare case-insenstive md5 generates a md5 hash lowercase, but it might be provided in uppercase. Allow this. PR: 205598 Reported by: ohauer MFC After: 2 weeks Modified: head/sbin/md5/md5.c Modified: head/sbin/md5/md5.c ============================================================================== --- head/sbin/md5/md5.c Wed May 23 11:20:16 2018 (r334090) +++ head/sbin/md5/md5.c Wed May 23 11:45:46 2018 (r334091) @@ -243,7 +243,7 @@ main(int argc, char *argv[]) else printf("%s (%s) = %s", Algorithm[digest].name, *argv, p); - if (checkAgainst && strcmp(checkAgainst,p)) + if (checkAgainst && strcasecmp(checkAgainst, p) != 0) { checksFailed++; if (!qflag) @@ -282,7 +282,7 @@ MDString(const Algorithm_t *alg, const char *string) printf("%s \"%s\"", buf, string); else printf("%s (\"%s\") = %s", alg->name, string, buf); - if (checkAgainst && strcmp(buf,checkAgainst)) + if (checkAgainst && strcasecmp(buf,checkAgainst) != 0) { checksFailed++; if (!qflag) From owner-svn-src-head@freebsd.org Wed May 23 12:10:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D9B6EFC132; Wed, 23 May 2018 12:10:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03BAC87CBB; Wed, 23 May 2018 12:10:17 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA94E228C0; Wed, 23 May 2018 12:10:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NCAG0m099743; Wed, 23 May 2018 12:10:16 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NCAGTU099742; Wed, 23 May 2018 12:10:16 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805231210.w4NCAGTU099742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 12:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334093 - head/sbin/kldstat X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/kldstat X-SVN-Commit-Revision: 334093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 12:10:17 -0000 Author: eadler Date: Wed May 23 12:10:16 2018 New Revision: 334093 URL: https://svnweb.freebsd.org/changeset/base/334093 Log: kldstat: align size to the right This makes it easier to compare numbers directly. PR: 215747 Submitted by: "Alexander von Gernler" Modified: head/sbin/kldstat/kldstat.c Modified: head/sbin/kldstat/kldstat.c ============================================================================== --- head/sbin/kldstat/kldstat.c Wed May 23 11:59:29 2018 (r334092) +++ head/sbin/kldstat/kldstat.c Wed May 23 12:10:16 2018 (r334093) @@ -80,7 +80,7 @@ printfile(int fileid, int verbose, int humanized) printf("%2d %4d %p %5s %s", stat.id, stat.refs, stat.address, buf, stat.name); } else { - printf("%2d %4d %p %-8zx %s", + printf("%2d %4d %p %8zx %s", stat.id, stat.refs, stat.address, stat.size, stat.name); } } From owner-svn-src-head@freebsd.org Wed May 23 12:14:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C6E5EFC3D1 for ; Wed, 23 May 2018 12:14:23 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C97C681F1; Wed, 23 May 2018 12:14:22 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 375A920D83; Wed, 23 May 2018 08:14:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 23 May 2018 08:14:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=cSpSev5a12jXElssGVtmP2pPAltdS 75cJObvFoIBKbQ=; b=r13XC2BjW9fplOwgHcc7QLoUMCqIMM1Ex01eUBXlvpgMO zqZLym5jsYsaeILuz1VtHIOsn/YaDVnlmEYFctgIqLxRXolxu1h2joLaRLrCyXYA 86xv9keG0l84KXNIyrgVIlEcW+7qzmLv3O4w6ZZ9uqhTIPVLpo8c95UEaBxkTcef /HEvYC1LWhGQFhodVo5wZw1LLhOF4PtDyoa4Ma3PGiVAvBwZxrGLBHUx+4R2fsn2 m3lB97N3EiPp7lJ3MIZbnieopZiDIK62b2DBsAX5/dD0Ty1st1Vaj/WreL+Knw/Y ysQ9bI422TfRXWbMeWmN/7TKz961HkHV8F0TeLPcg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=cSpSev 5a12jXElssGVtmP2pPAltdS75cJObvFoIBKbQ=; b=WIkwPNdaEdvmTZqZHxAAwe xtvJ595HLQ/40DYnZdzchW/tN0vCScT3YbxVdVr/sDtB9CbSzUZqPeSpPMFPMaAk fUpHoNz5RlqZDxi3rqUXU7R+Em95QR17mq1WYjzvCcl4Axo1gQYrj3gHcIOUUGEH bH4OO4T0/+7dZLOAT0ld7O19NvvARBMGY+gpfm0SUxKaC+jMUJEZaWFmqkjb44V3 pUgMWhMjdwEiKRS78UU4IgYld7Vpd5aUC4eyHx7J84pdt//EoOwaVmJ7CaEljDip wj2dTHCXcQLc+7R5kUSz62fmHbM6kMhzyV50QcOUNKTy46dnZfLJxuYwTf/fQQnw == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.2] (unknown [94.233.224.193]) by mail.messagingengine.com (Postfix) with ESMTPA id AA340E442F; Wed, 23 May 2018 08:14:20 -0400 (EDT) Subject: Re: svn commit: r334093 - head/sbin/kldstat To: Eitan Adler , svn-src-head@freebsd.org References: <201805231210.w4NCAGTU099742@repo.freebsd.org> From: Yuri Pankov Message-ID: <4fc0d605-106a-d1b1-d97c-3e9b866baea5@yuripv.net> Date: Wed, 23 May 2018 15:14:20 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201805231210.w4NCAGTU099742@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 12:14:23 -0000 Eitan Adler wrote: > Author: eadler > Date: Wed May 23 12:10:16 2018 > New Revision: 334093 > URL: https://svnweb.freebsd.org/changeset/base/334093 > > Log: > kldstat: align size to the right You should make the "Size" in header right-aligned as well then. > This makes it easier to compare numbers directly. > > PR: 215747 > Submitted by: "Alexander von Gernler" > > Modified: > head/sbin/kldstat/kldstat.c > > Modified: head/sbin/kldstat/kldstat.c > ============================================================================== > --- head/sbin/kldstat/kldstat.c Wed May 23 11:59:29 2018 (r334092) > +++ head/sbin/kldstat/kldstat.c Wed May 23 12:10:16 2018 (r334093) > @@ -80,7 +80,7 @@ printfile(int fileid, int verbose, int humanized) > printf("%2d %4d %p %5s %s", > stat.id, stat.refs, stat.address, buf, stat.name); > } else { > - printf("%2d %4d %p %-8zx %s", > + printf("%2d %4d %p %8zx %s", > stat.id, stat.refs, stat.address, stat.size, stat.name); > } > } From owner-svn-src-head@freebsd.org Wed May 23 13:10:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12261EFD5D1; Wed, 23 May 2018 13:10:59 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1B6E69DCB; Wed, 23 May 2018 13:10:58 +0000 (UTC) (envelope-from pizzamig@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79A2C232AC; Wed, 23 May 2018 13:10:58 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NDAwtp031431; Wed, 23 May 2018 13:10:58 GMT (envelope-from pizzamig@FreeBSD.org) Received: (from pizzamig@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NDAwJn031430; Wed, 23 May 2018 13:10:58 GMT (envelope-from pizzamig@FreeBSD.org) Message-Id: <201805231310.w4NDAwJn031430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pizzamig set sender to pizzamig@FreeBSD.org using -f From: Luca Pizzamiglio Date: Wed, 23 May 2018 13:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334094 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: pizzamig X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 334094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 13:10:59 -0000 Author: pizzamig (ports committer) Date: Wed May 23 13:10:57 2018 New Revision: 334094 URL: https://svnweb.freebsd.org/changeset/base/334094 Log: Improve MAC address uniqueness on if_epair(4). As reported in PR184149, it can happen that epair devices can have the same MAC address. This solution is based on a 32-bit hash, obtained combining the if_index of the a interface and the hostid. If the hostid is zero, a random number is used. PR: 184149 Reviewed by: wollman, eugen Approved by: cognet Differential Revision: https://reviews.freebsd.org/D15329 Modified: head/sys/net/if_epair.c Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Wed May 23 12:10:16 2018 (r334093) +++ head/sys/net/if_epair.c Wed May 23 13:10:57 2018 (r334094) @@ -53,10 +53,14 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include +#include #include #include #include +#include #include #include #include @@ -713,6 +717,9 @@ epair_clone_create(struct if_clone *ifc, char *name, s struct ifnet *ifp; char *dp; int error, unit, wildcard; + uint64_t hostid; + uint32_t key[3]; + uint32_t hash; uint8_t eaddr[ETHER_ADDR_LEN]; /* 00:00:00:00:00:00 */ /* @@ -724,14 +731,12 @@ epair_clone_create(struct if_clone *ifc, char *name, s if (params) { scb = (struct epair_softc *)params; ifp = scb->ifp; - /* Assign a hopefully unique, locally administered etheraddr. */ - eaddr[0] = 0x02; - eaddr[3] = (ifp->if_index >> 8) & 0xff; - eaddr[4] = ifp->if_index & 0xff; + /* Copy epairNa etheraddr and change the last byte. */ + memcpy(eaddr, scb->oifp->if_hw_addr, ETHER_ADDR_LEN); eaddr[5] = 0x0b; ether_ifattach(ifp, eaddr); /* Correctly set the name for the cloner list. */ - strlcpy(name, scb->ifp->if_xname, len); + strlcpy(name, ifp->if_xname, len); return (0); } @@ -835,10 +840,21 @@ epair_clone_create(struct if_clone *ifc, char *name, s ifp->if_init = epair_init; if_setsendqlen(ifp, ifqmaxlen); if_setsendqready(ifp); - /* Assign a hopefully unique, locally administered etheraddr. */ + + /* + * Calculate the etheraddr hashing the hostid and the + * interface index. The result would be hopefully unique + */ + getcredhostid(curthread->td_ucred, (unsigned long *)&hostid); + if (hostid == 0) + arc4rand(&hostid, sizeof(hostid), 0); + key[0] = (uint32_t)ifp->if_index; + key[1] = (uint32_t)(hostid & 0xffffffff); + key[2] = (uint32_t)((hostid >> 32) & 0xfffffffff); + hash = jenkins_hash32(key, 3, 0); + eaddr[0] = 0x02; - eaddr[3] = (ifp->if_index >> 8) & 0xff; - eaddr[4] = ifp->if_index & 0xff; + memcpy(&eaddr[1], &hash, 4); eaddr[5] = 0x0a; ether_ifattach(ifp, eaddr); sca->if_qflush = ifp->if_qflush; From owner-svn-src-head@freebsd.org Wed May 23 13:35:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68462EFDE1F for ; Wed, 23 May 2018 13:35:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D87F66AF67 for ; Wed, 23 May 2018 13:35:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id q4-v6so4339737ite.3 for ; Wed, 23 May 2018 06:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=1BM6Io1QDQt03OIMkfoRdl8M2O6eM656/FIeNYT0I6g=; b=fpu5mdh9LrPBG+xYAHjZixBsjimJCdiBx/SDXPSrWrgP4wDktmMxieuuPvBVt4t2MT lSiyUfyBG3LvEY9ZtRt1X5KFG1AmQz+7Pf1jqmoqLX+hDyXWe8YbSwJiumaKlgX5esFz 6I1u2d9ReTARdUpWsZOCSpFI96V96ufpPt9J6uszIt/3mujyY/7caW6xm9ipypRWdcA0 VhQTuLVbfMhd8RGShpc9f+6CxnNCNwg1BrF4ZSQaR+H5FLmRPtUYEWhYo53OhIjA/Rmh 9nli9gxgaw3PxWffevwYoBsrPkxIKL49iZBD4Fsak2kUf0RxCrAqGEenuEkoNlHpU3VZ 5dkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=1BM6Io1QDQt03OIMkfoRdl8M2O6eM656/FIeNYT0I6g=; b=GxscQqz05QI08CGV9CD9Fr3w5GpurG7kEJratB08HIbXWfckrrW7a06ZDZJv+pLk/Y eSBenInmUsx3zsNbHabSgjy2HNeH9kB4XX0gC+2k1mYYQegGEuWLUJ5I/UM34n2ymiRV FOiBvvNtigYt+3ExfIlWs2P2phYLnZJ6IGWI8hUU5hi8Yc7F+1iFN6FlKg54V52VlUPV ivPaNKasNa8N7GBTx0g4f8cJmqgCQB//SmwbyCYLOWV1TerKSpD/wIyHw7c89fCxjNA2 Vvz0qCFui7O3EjTGrzZDgUtwojLP6bIpYiJ/i/NOMnXzG94WvYXH0WeY3TgOpEwsfS9x iWqw== X-Gm-Message-State: ALKqPwex7ziXjCFTbMyYkGIJAggso1pEbnqIIAUnUM9auFg5ieEmKb15 8TxmQ+ZLdkCmBkA+fv6Efta+jcOcF/suYVG/Yec3yw== X-Google-Smtp-Source: ADUXVKKX4RsWi6Km+FsQDfwIImc8xjOoV7k6++ECBmJjxLuVO8L+rRBNFDxFnIBkYbF6A/43JMytQVGpq1TvSIKEQCA= X-Received: by 2002:a24:42c6:: with SMTP id i189-v6mr5076779itb.73.1527082506772; Wed, 23 May 2018 06:35:06 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:d028:0:0:0:0:0 with HTTP; Wed, 23 May 2018 06:35:06 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <201805230739.w4N7d5Z1062496@repo.freebsd.org> References: <201805230739.w4N7d5Z1062496@repo.freebsd.org> From: Warner Losh Date: Wed, 23 May 2018 07:35:06 -0600 X-Google-Sender-Auth: dwtXbCFmOyWuHr7sbkt4Ym-fw4Q Message-ID: Subject: Re: svn commit: r334078 - head/sbin/devd To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 13:35:08 -0000 On Wed, May 23, 2018 at 1:39 AM, Eitan Adler wrote: > Author: eadler > Date: Wed May 23 07:39:05 2018 > New Revision: 334078 > URL: https://svnweb.freebsd.org/changeset/base/334078 > > Log: > devd: compile at WARNS=6 > > Verified with "make universe TARGETS='amd64 arm arm64 i386 sparc64'" > > Modified: > head/sbin/devd/Makefile > head/sbin/devd/devd.cc > head/sbin/devd/token.l > > ... > Modified: head/sbin/devd/token.l > ============================================================ > ================== > --- head/sbin/devd/token.l Wed May 23 07:39:02 2018 (r334077) > +++ head/sbin/devd/token.l Wed May 23 07:39:05 2018 (r334078) > @@ -38,6 +38,7 @@ > #include "devd.h" > #include "y.tab.h" > > +extern int lineno; > int lineno = 1; > > static void This is completely bogus. Never ever ever just put extern in the line before to avoid the warning. That's wrong 100% of the time. Fix it right by putting this in devd.h. Warner From owner-svn-src-head@freebsd.org Wed May 23 13:48:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33576EFE0BB; Wed, 23 May 2018 13:48:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE74B6B660; Wed, 23 May 2018 13:48:17 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF4BA23927; Wed, 23 May 2018 13:48:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NDmHna050526; Wed, 23 May 2018 13:48:17 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NDmHw3050524; Wed, 23 May 2018 13:48:17 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805231348.w4NDmHw3050524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 23 May 2018 13:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334095 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 334095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 13:48:18 -0000 Author: eadler Date: Wed May 23 13:48:16 2018 New Revision: 334095 URL: https://svnweb.freebsd.org/changeset/base/334095 Log: devd: Move variable declaration to header Reminder by: imp Modified: head/sbin/devd/devd.cc head/sbin/devd/devd.h head/sbin/devd/token.l Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Wed May 23 13:10:57 2018 (r334094) +++ head/sbin/devd/devd.cc Wed May 23 13:48:16 2018 (r334095) @@ -140,7 +140,6 @@ typedef struct client { } client_t; extern FILE *yyin; -extern int lineno; static const char notify = '!'; static const char nomatch = '?'; Modified: head/sbin/devd/devd.h ============================================================================== --- head/sbin/devd/devd.h Wed May 23 13:10:57 2018 (r334094) +++ head/sbin/devd/devd.h Wed May 23 13:48:16 2018 (r334095) @@ -52,6 +52,7 @@ void set_variable(const char *, const char *); void yyerror(const char *s); int yylex(void); int yyparse(void); +extern int lineno; __END_DECLS #define PATH_DEVCTL "/dev/devctl" Modified: head/sbin/devd/token.l ============================================================================== --- head/sbin/devd/token.l Wed May 23 13:10:57 2018 (r334094) +++ head/sbin/devd/token.l Wed May 23 13:48:16 2018 (r334095) @@ -38,7 +38,6 @@ #include "devd.h" #include "y.tab.h" -extern int lineno; int lineno = 1; static void From owner-svn-src-head@freebsd.org Wed May 23 13:49:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9A28EFE124 for ; Wed, 23 May 2018 13:49:21 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99E496B7BE for ; Wed, 23 May 2018 13:49:21 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yw0-f173.google.com (mail-yw0-f173.google.com [209.85.161.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id 62D9082B5 for ; Wed, 23 May 2018 13:49:21 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yw0-f173.google.com with SMTP id x27-v6so6716167ywj.1 for ; Wed, 23 May 2018 06:49:21 -0700 (PDT) X-Gm-Message-State: ALKqPwdgnlFI7H40L0Aw93mf2NQmneBClN2UTvSyTavh7BUOm7mkKZoJ B77HIItjZ2yFfw/AQPpcRIOPkmvsX+rOD/87crOg/A== X-Google-Smtp-Source: AB8JxZqdF9LejzTs14OKCp73KkKCY/W0CnCNrq8cseg0+6BFhrtJhL8HRZz6w7d7sqKFJLZ0sBFNYhPbIorAMJ4Nhls= X-Received: by 2002:a81:af26:: with SMTP id n38-v6mr1486703ywh.113.1527083360725; Wed, 23 May 2018 06:49:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Wed, 23 May 2018 06:48:50 -0700 (PDT) In-Reply-To: References: <201805230739.w4N7d5Z1062496@repo.freebsd.org> From: Eitan Adler Date: Wed, 23 May 2018 06:48:50 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334078 - head/sbin/devd To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 13:49:22 -0000 On 23 May 2018 at 06:35, Warner Losh wrote: > > > On Wed, May 23, 2018 at 1:39 AM, Eitan Adler wrote: >> >> Author: eadler >> Date: Wed May 23 07:39:05 2018 >> New Revision: 334078 >> URL: https://svnweb.freebsd.org/changeset/base/334078 >> >> Log: >> devd: compile at WARNS=6 >> >> Verified with "make universe TARGETS='amd64 arm arm64 i386 sparc64'" >> >> Modified: >> head/sbin/devd/Makefile >> head/sbin/devd/devd.cc >> head/sbin/devd/token.l >> > ... >> >> Modified: head/sbin/devd/token.l >> >> ============================================================================== >> --- head/sbin/devd/token.l Wed May 23 07:39:02 2018 (r334077) >> +++ head/sbin/devd/token.l Wed May 23 07:39:05 2018 (r334078) >> @@ -38,6 +38,7 @@ >> #include "devd.h" >> #include "y.tab.h" >> >> +extern int lineno; >> int lineno = 1; >> >> static void > > > This is completely bogus. Never ever ever just put extern in the line > before to avoid the warning. That's wrong 100% of the time. You're right. thanks for the reminder. See r334095 -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Wed May 23 13:52:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91580EFE3F7 for ; Wed, 23 May 2018 13:52:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B3056BD5D for ; Wed, 23 May 2018 13:52:59 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 931111ec-5e90-11e8-afd2-4ddcc8249dd4 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 931111ec-5e90-11e8-afd2-4ddcc8249dd4; Wed, 23 May 2018 13:52:48 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w4NDqkns000794; Wed, 23 May 2018 07:52:46 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1527083566.32688.117.camel@freebsd.org> Subject: Re: svn commit: r334074 - head/sys/sys From: Ian Lepore To: Matt Macy , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 23 May 2018 07:52:46 -0600 In-Reply-To: <201805230615.w4N6FtiS022201@repo.freebsd.org> References: <201805230615.w4N6FtiS022201@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 13:52:59 -0000 On Wed, 2018-05-23 at 06:15 +0000, Matt Macy wrote: > Author: mmacy > Date: Wed May 23 06:15:55 2018 > New Revision: 334074 > URL: https://svnweb.freebsd.org/changeset/base/334074 > > Log: >   Bump FreeBSD_version after r333813 > > Modified: >   head/sys/sys/param.h > > Modified: head/sys/sys/param.h > ============================================================================== > --- head/sys/sys/param.h Wed May 23 04:09:01 2018 (r334073) > +++ head/sys/sys/param.h Wed May 23 06:15:55 2018 (r334074) > @@ -60,7 +60,7 @@ >   * in the range 5 to 9. >   */ >  #undef __FreeBSD_version > -#define __FreeBSD_version 1200063 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1200064 /* Master, propagated to newvers */ >   >  /* >   * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, > Nothing about this commit or the commit message for r333813 says why a version bump would be warranted. New user-visible features?  API change? The diff for r333813 doesn't appear to contain either of those. -- Ian From owner-svn-src-head@freebsd.org Wed May 23 14:12:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BF19EFEAE6; Wed, 23 May 2018 14:12:51 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 945996CEE7; Wed, 23 May 2018 14:12:50 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x241.google.com with SMTP id p3-v6so4607753itc.0; Wed, 23 May 2018 07:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=H7rWa9ctIR9icu4fHDxuaGBTyFCbHpfbe19Zv6jAoBA=; b=lImBa5NoKKUwza9RfuC+EY6kd9i2A/Jmlo0+3uW2o9wqr0ZWNoZiP/OUTBWcoGfJNH H4qXFRFmDcHG7LSAUBvBvOIhf6AL7OrQpmAmXzsBCCR64rDeTdf29cjxI1mTEJ38i51i 52tvKk1pmaVwFyeZC5BY4e6QOzgGhCju/2OeFa3m16NCcMvkkGQBsf7vbbI/eUmlfktC xu5GcHHHwMuEAzpt71C4E3xzR4mKeLPTMyfY4r0SDz79myaFR0G34kOq5a0grtxnhZ85 rxcODyK/JoiO+UZHUyayVDDOzCY0bIuVMT64N5TpEDH78zxnQFHfG7GmSqE+mY16G/bX rAJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=H7rWa9ctIR9icu4fHDxuaGBTyFCbHpfbe19Zv6jAoBA=; b=T5S6doXmzKIpRcKaSyhlOcppLt0CqLaJwXI0VVwvwZ4u5zVN4SNsaM1bQphjQ32uR1 /EV2wUTBswWnRNYLGPelm4ReeUfLeAgk1nQ2ZqQBeXk6GAfN5CAxTFxD6CIaD0WlgStV fVC++PWX0t6yTSqELFBBI5gT9glppyJlY8D2JPwltBFIEkOlZgPhKo/fFBbijn9V3Fso tlDb3AImVZH99AQuyiZ3yHmZ/M2vYLBaWew+Oy2v05Qu6vyfsoxTUo+2Io1wLIvkfV5h 2j7u7pg0CwbNkPhKMYR7Y74OV7kooawJ7NuJotG9HZn46ngJkSGMyC27deGfQBzTrNqK OTbg== X-Gm-Message-State: ALKqPwf8PE9/qovr3nMX9L/43tADll3VqAuw6dZm3pooUuZ5DS+EEFJz JpTm6q+hnsdzC8OZmPFniC/zXy1r3rzjZ4LiyYG4pQ== X-Google-Smtp-Source: ADUXVKKVXAax3WYr4ssVKU46FSRoDOJt0CiPJeBUwm1Ot111DZYGSp42iGmNL136PegyaRHzcHHMSWVsg+TzmgUrEQo= X-Received: by 2002:a24:19c9:: with SMTP id b192-v6mr5663210itb.78.1527084769056; Wed, 23 May 2018 07:12:49 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:82a7:0:0:0:0:0 with HTTP; Wed, 23 May 2018 07:12:28 -0700 (PDT) In-Reply-To: <201805231045.w4NAjWsv059104@repo.freebsd.org> References: <201805231045.w4NAjWsv059104@repo.freebsd.org> From: Ed Maste Date: Wed, 23 May 2018 10:12:28 -0400 X-Google-Sender-Auth: _XZ_dVbC-6u6KAMREewM-J-9XFc Message-ID: Subject: Re: svn commit: r334089 - head/sbin/dumpon To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 14:12:51 -0000 On 23 May 2018 at 06:45, Eitan Adler wrote: > Author: eadler > Date: Wed May 23 10:45:32 2018 > New Revision: 334089 > URL: https://svnweb.freebsd.org/changeset/base/334089 > > Log: > dumpon: point to better kernel debug symbols. >... > -.Dl # kgdb /usr/obj/sys/GENERIC/kernel.debug vmcore.# > +.Dl # kgdb /usr/lib/debug/boot/kernel/kernel.debug vmcore.# This should be /boot/kernel/kernel, or perhaps $(sysctl -n kern.bootfile). The kernel ELF object contains a .gnu_debuglink section that points to the debug data contained in kernel.debug. From owner-svn-src-head@freebsd.org Wed May 23 14:15:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D39AEFEBDE; Wed, 23 May 2018 14:15:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6A166D124; Wed, 23 May 2018 14:15:39 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4NEFULP035255; Wed, 23 May 2018 07:15:30 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4NEFUmR035254; Wed, 23 May 2018 07:15:30 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805231415.w4NEFUmR035254@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334089 - head/sbin/dumpon In-Reply-To: <201805231045.w4NAjWsv059104@repo.freebsd.org> To: Eitan Adler Date: Wed, 23 May 2018 07:15:30 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 14:15:40 -0000 > Author: eadler > Date: Wed May 23 10:45:32 2018 > New Revision: 334089 > URL: https://svnweb.freebsd.org/changeset/base/334089 > > Log: > dumpon: point to better kernel debug symbols. > > The objdir is temporary, and the current example points to GENERIC. > Instead point to the installed location of the debug symbols that are > supposed to match the kernel you are using. > > PR: 223993 > Submitted by: Trond.Endrestol@ximalas.info > > Modified: > head/sbin/dumpon/dumpon.8 > > Modified: head/sbin/dumpon/dumpon.8 > ============================================================================== > --- head/sbin/dumpon/dumpon.8 Wed May 23 10:39:02 2018 (r334088) > +++ head/sbin/dumpon/dumpon.8 Wed May 23 10:45:32 2018 (r334089) > @@ -311,11 +311,11 @@ The > can be now examined using > .Xr kgdb 1 : > .Pp > -.Dl # kgdb /usr/obj/sys/GENERIC/kernel.debug vmcore.# > +.Dl # kgdb /usr/lib/debug/boot/kernel/kernel.debug vmcore.# You should of probably also included that fact that kgdb now must be invoked /usr/libexec/kgdb, as it has been moved. > .Pp > or shorter: > .Pp > -.Dl # kgdb -n # /usr/obj/sys/GENERIC/kernel.debug > +.Dl # kgdb -n # /usr/lib/debug/boot/kernel/kernel.debug > .Pp > The core was decrypted properly if > .Xr kgdb 1 > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed May 23 14:18:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F00AEFECD6; Wed, 23 May 2018 14:18:34 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D5D56D2ED; Wed, 23 May 2018 14:18:34 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x22f.google.com with SMTP id 144-v6so4570523iti.5; Wed, 23 May 2018 07:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=b8DqbWj5DPgUYOowKGgXctWqqpMNX7Fbi1ZFrL2opqM=; b=m0tDR8/ZRI+tD2s0xpg0SkCdjoAHifHli38ao05gX7OIfo5f7dm9FhnqNqyXNyg3tx PWmxLlZF4em2I3BqZPj6HUXu3200ONn4A+Ut6+0f9INDiU27rk3m8303e8L1d5ykVj3X j/zns5Z13ZNd7Q/8jZPulU5zoUn1UAN06seGOXSckYOX2pe9TZwt19ZQS5SvFAVHWyMY NzyLyJ3a1mgjI2s8puqrT+13AekVOCocv3UZwjB708SA4z6qPa4ibsFwjlOA+cBdtHDH 4ezx/1jA+60jw56UU0NzkgO53TelVoCypc8sGqlAzURyQuOfNHTnkHZ1YzVj0yt7385Y hS0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=b8DqbWj5DPgUYOowKGgXctWqqpMNX7Fbi1ZFrL2opqM=; b=ZBoR+S/duuLbJ8sMHbpEScaNfX59CL0U4IIM5Ndc3uL+N+FdSY0qa+GHOaIQ8L56UY jgk7MUpRb2dEnPc+Q/9Qwp5Dw5y2aGL0Yw8wWHF7k79sC74vhmd+uJ+uv2UFM36OrvtI ycvdBuoqDUJnOaOVHhnEvoErUj8HFlTFFdUeQXeVy79TeBKK78Ax7EK7UQP54x7n3qKF T0zFGVOqDmd3SPqiGaVj37hgmzx46HCkvB6r+C+KCjFuKt+7zXDrlTEWT2HJqlZEqYtO 5SrrWvlUU8uJWxX8ohSrOltjpTPzQqo5hGbqT5lpXBrZNELEL2VUFRO5lQABRf8CorjL pusw== X-Gm-Message-State: ALKqPwd6VkYSfWRWMItyBuXIxYl5JJ9G+RmS0xHCf05fmvqnT/a/AO61 LL8Esp8LoN0pIxP1XzgoFRvDkkMgEo5BIAz2aI9aRA== X-Google-Smtp-Source: AB8JxZpqtB/hrBVRd1zZh9BmB4RyxpvYW12u9DMdwLwmRQuhLfmSG4HElndtP4aoJOurOvGZlU/soucItddfH6IIW+4= X-Received: by 2002:a24:8b41:: with SMTP id g62-v6mr5349316ite.114.1527085113346; Wed, 23 May 2018 07:18:33 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:82a7:0:0:0:0:0 with HTTP; Wed, 23 May 2018 07:18:12 -0700 (PDT) In-Reply-To: <201805231415.w4NEFUmR035254@pdx.rh.CN85.dnsmgr.net> References: <201805231045.w4NAjWsv059104@repo.freebsd.org> <201805231415.w4NEFUmR035254@pdx.rh.CN85.dnsmgr.net> From: Ed Maste Date: Wed, 23 May 2018 10:18:12 -0400 X-Google-Sender-Auth: TbJ21o7si8otCOEflWHEbQguuso Message-ID: Subject: Re: svn commit: r334089 - head/sbin/dumpon To: "Rodney W. Grimes" Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 14:18:34 -0000 On 23 May 2018 at 10:15, Rodney W. Grimes wrote: >> Author: eadler >> Date: Wed May 23 10:45:32 2018 >> New Revision: 334089 >> URL: https://svnweb.freebsd.org/changeset/base/334089 >> >> Log: >> dumpon: point to better kernel debug symbols. >> ... > > You should of probably also included that fact that kgdb now must be invoked > /usr/libexec/kgdb, as it has been moved. Rather, dumon should document installing the gdb port or package. From owner-svn-src-head@freebsd.org Wed May 23 14:19:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60214EFED24; Wed, 23 May 2018 14:19:07 +0000 (UTC) (envelope-from leitao@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13E636D434; Wed, 23 May 2018 14:19:07 +0000 (UTC) (envelope-from leitao@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E53B723DE8; Wed, 23 May 2018 14:19:06 +0000 (UTC) (envelope-from leitao@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NEJ6Ic066724; Wed, 23 May 2018 14:19:06 GMT (envelope-from leitao@FreeBSD.org) Received: (from leitao@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NEJ6kw066723; Wed, 23 May 2018 14:19:06 GMT (envelope-from leitao@FreeBSD.org) Message-Id: <201805231419.w4NEJ6kw066723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: leitao set sender to leitao@FreeBSD.org using -f From: Breno Leitao Date: Wed, 23 May 2018 14:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334098 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: leitao X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 334098 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 14:19:07 -0000 Author: leitao Date: Wed May 23 14:19:06 2018 New Revision: 334098 URL: https://svnweb.freebsd.org/changeset/base/334098 Log: Adding myself share/misc/committers-src.dot. Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed May 23 14:05:56 2018 (r334097) +++ head/share/misc/committers-src.dot Wed May 23 14:19:06 2018 (r334098) @@ -234,6 +234,7 @@ kmacy [label="Kip Macy\nkmacy@FreeBSD.org\n2005/06/01" kp [label="Kristof Provost\nkp@FreeBSD.org\n2015/03/22"] landonf [label="Landon Fuller\nlandonf@FreeBSD.org\n2016/05/31"] le [label="Lukas Ertl\nle@FreeBSD.org\n2004/02/02"] +leitao [label="Breno Leitao\nleitao@FreeBSD.org\n2018/05/22"] lidl [label="Kurt Lidl\nlidl@FreeBSD.org\n2015/10/21"] loos [label="Luiz Otavio O Souza\nloos@FreeBSD.org\n2013/07/03"] lstewart [label="Lawrence Stewart\nlstewart@FreeBSD.org\n2008/10/06"] @@ -589,6 +590,8 @@ jhb -> rnoland jhb -> rpokala jhb -> arichardson +jhibbits -> leitao + jimharris -> carl jkh -> dfr @@ -709,6 +712,7 @@ njl -> sepotvin nwhitehorn -> andreast nwhitehorn -> jhibbits +nwhitehorn -> leitao obrien -> benno obrien -> groudier From owner-svn-src-head@freebsd.org Wed May 23 14:35:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9292EFF26D; Wed, 23 May 2018 14:35:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CD696DF11; Wed, 23 May 2018 14:35:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4NEZA8C035352; Wed, 23 May 2018 07:35:10 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4NEZA4P035351; Wed, 23 May 2018 07:35:10 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805231435.w4NEZA4P035351@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334089 - head/sbin/dumpon In-Reply-To: To: Ed Maste Date: Wed, 23 May 2018 07:35:10 -0700 (PDT) CC: "Rodney W. Grimes" , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 14:35:13 -0000 > On 23 May 2018 at 10:15, Rodney W. Grimes > wrote: > >> Author: eadler > >> Date: Wed May 23 10:45:32 2018 > >> New Revision: 334089 > >> URL: https://svnweb.freebsd.org/changeset/base/334089 > >> > >> Log: > >> dumpon: point to better kernel debug symbols. > >> ... > > > > You should of probably also included that fact that kgdb now must be invoked > > /usr/libexec/kgdb, as it has been moved. > > Rather, dumon should document installing the gdb port or package. I would say both would be better. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed May 23 15:22:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67077F0C18E; Wed, 23 May 2018 15:22:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CADD6F89B; Wed, 23 May 2018 15:22:59 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F22722495F; Wed, 23 May 2018 15:22:58 +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 w4NFMwjF001379; Wed, 23 May 2018 15:22:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NFMwgV001378; Wed, 23 May 2018 15:22:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201805231522.w4NFMwgV001378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 23 May 2018 15:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334099 - head/sys/dev/ata/chipsets X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ata/chipsets X-SVN-Commit-Revision: 334099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 15:22:59 -0000 Author: mav Date: Wed May 23 15:22:58 2018 New Revision: 334099 URL: https://svnweb.freebsd.org/changeset/base/334099 Log: Add ready polling after PHY reset on VIA SATA controllers. According to PR there are cases of controller hang if soft reset is sent before device report ready status after the hard reset. I don't think this patch is perfect, but it was reported as working by the submitter, and I have neither the old hardware nor interest to test some improved version, so just done some style cleaning. PR: 183294 Submitted by: alexandre.martins@netasq.com MFC after: 1 month Modified: head/sys/dev/ata/chipsets/ata-via.c Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Wed May 23 14:19:06 2018 (r334098) +++ head/sys/dev/ata/chipsets/ata-via.c Wed May 23 15:22:58 2018 (r334099) @@ -449,12 +449,29 @@ static void ata_via_sata_reset(device_t dev) { struct ata_channel *ch = device_get_softc(dev); - int devs; + int devs, count; + uint8_t status; if (ch->unit == 0) { devs = ata_sata_phy_reset(dev, 0, 0); - DELAY(10000); + count = 0; + do { + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | + ATA_DEV(ATA_MASTER)); + DELAY(1000); + status = ATA_IDX_INB(ch, ATA_STATUS); + count++; + } while (status & ATA_S_BUSY && count < 100); + devs += ata_sata_phy_reset(dev, 1, 0); + count = 0; + do { + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | + ATA_DEV(ATA_SLAVE)); + DELAY(1000); + status = ATA_IDX_INB(ch, ATA_STATUS); + count++; + } while (status & ATA_S_BUSY && count < 100); } else devs = 1; if (devs) From owner-svn-src-head@freebsd.org Wed May 23 15:26:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C45E5F0C5A9; Wed, 23 May 2018 15:26:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75FCF6FD64; Wed, 23 May 2018 15:26:57 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5313C24962; Wed, 23 May 2018 15:26:57 +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 w4NFQv2B001595; Wed, 23 May 2018 15:26:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NFQvjp001594; Wed, 23 May 2018 15:26:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805231526.w4NFQvjp001594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 23 May 2018 15:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334100 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 334100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 15:26:57 -0000 Author: markj Date: Wed May 23 15:26:56 2018 New Revision: 334100 URL: https://svnweb.freebsd.org/changeset/base/334100 Log: Document the return value of sbuf_bcat(9). MFC after: 1 week Modified: head/share/man/man9/sbuf.9 Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Wed May 23 15:22:58 2018 (r334099) +++ head/share/man/man9/sbuf.9 Wed May 23 15:26:56 2018 (r334100) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 17, 2017 +.Dd May 23, 2018 .Dt SBUF 9 .Os .Sh NAME @@ -624,6 +624,7 @@ function returns \-1 if was invalid, and zero otherwise. .Pp The +.Fn sbuf_bcat , .Fn sbuf_cat , .Fn sbuf_cpy , .Fn sbuf_printf , From owner-svn-src-head@freebsd.org Wed May 23 15:43:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43B89F0CEC7; Wed, 23 May 2018 15:43:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA86070829; Wed, 23 May 2018 15:43:35 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B629F24C9C; Wed, 23 May 2018 15:43:35 +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 w4NFhZ9T011685; Wed, 23 May 2018 15:43:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NFhZ20011684; Wed, 23 May 2018 15:43:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805231543.w4NFhZ20011684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 23 May 2018 15:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334101 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 334101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 15:43:36 -0000 Author: markj Date: Wed May 23 15:43:35 2018 New Revision: 334101 URL: https://svnweb.freebsd.org/changeset/base/334101 Log: Add GET_STACK_USAGE() for arm64. Its absence meant that GEOM direct dispatch was disabled (the service routines check the current thread's stack usage to determine whether to hand off the request to a dedicated thread), and this change is sufficient to enable direct dispatch by default. Reviewed by: allanjude MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D15527 Modified: head/sys/arm64/include/proc.h Modified: head/sys/arm64/include/proc.h ============================================================================== --- head/sys/arm64/include/proc.h Wed May 23 15:26:56 2018 (r334100) +++ head/sys/arm64/include/proc.h Wed May 23 15:43:35 2018 (r334101) @@ -54,4 +54,18 @@ struct syscall_args { int narg; }; +#ifdef _KERNEL + +#include + +#define GET_STACK_USAGE(total, used) do { \ + struct thread *td = curthread; \ + (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ + (used) = (char *)td->td_kstack + \ + td->td_kstack_pages * PAGE_SIZE - \ + (char *)&td; \ +} while (0) + +#endif + #endif /* !_MACHINE_PROC_H_ */ From owner-svn-src-head@freebsd.org Wed May 23 15:51:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CEC4F101A5 for ; Wed, 23 May 2018 15:51:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31ED970C7B for ; Wed, 23 May 2018 15:51:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x242.google.com with SMTP id e20-v6so23355062iof.4 for ; Wed, 23 May 2018 08:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8TAejNVkBkBfTVTnIgK4zaNBA9lOtGoWLkeVHY+xQ1Y=; b=t0D3KtZyKx0OjH6RfBkEIJu8nE/0uEsHEIl1BmCf16WDsz46wv5PP56kEQ0NfYWyJv dG8b/6BGKZBZlvfE2tionzgZ71qo40ESB/ZM79VExgEgRoACH4zIDccuH5yXHcPcFfAn KZ7NJIvlL5EiDUCo7FiXGpUG2DLparPXchwDV6uVsn4y+FZJ3WCtG5mQ12jTp2Al5VFl 6zK8p1fEMrnvHofHp3Fg9SCih9gYgzcXgU5PDjxch6bON5PKv0sPkUC70mH2Y0KmQjEj 37DTPp8rXzIcrYtA/2GwzhobIJvCTx/xw5eRmojmre/BHZOTvZDqlLgKW/4WlSwXKqae VdgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8TAejNVkBkBfTVTnIgK4zaNBA9lOtGoWLkeVHY+xQ1Y=; b=Y/NH8S12Fv6b1e/baZK9/Vtr3oSKgptl1PktvsOhwGcSinV3e6EzBbx9m69zLWKBCZ E+4Y415/yQg63PZGGW6jQocPG0WaVMl/VAIXE9gN15Zb5REI8GYfS4NlpJohIg8EkmHg 01P+JcYYTn3aMNTl/Z3vGaJLXnOhRAIG4yqso9N7PPJYS+Eplnk5D5fNUmY/yOeMWTzk KFk/X3k6cYdttZvBr7Dj8w6doo/CIO+7TLnHhXSt3GTDLgkM/T2RNS5aA02SLLvciWQ5 NgoYU69WaQ04AoLRZyV+FAWKy589bMfaTten9s2zrNcfr11fP578Fdq4AJs/RYKU0BhR NSeA== X-Gm-Message-State: ALKqPwfzwevDAL+26MYiLHz2iiL5AkrtmTh5C/ecuT6RTn1paGFVfqOt ltTgsEK3GiFQ3/YXezdNgMGGYXtcJFUI+swyh5IyzQ== X-Google-Smtp-Source: AB8JxZqxroSuzrbdkaIwrlA20k5hhZy6Q4wDpUZqRak8lGFjmrC3R5vLEv1XKhQidMeiqsv0+vBpwGqMLpv//Wht5QQ= X-Received: by 2002:a6b:d404:: with SMTP id l4-v6mr3150780iog.37.1527090678260; Wed, 23 May 2018 08:51:18 -0700 (PDT) MIME-Version: 1.0 References: <201805231435.w4NEZA4P035351@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201805231435.w4NEZA4P035351@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 23 May 2018 09:51:06 -0600 Message-ID: Subject: Re: svn commit: r334089 - head/sbin/dumpon To: "Rodney W. Grimes" Cc: Ed Maste , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 15:51:19 -0000 On Wed, May 23, 2018, 8:35 AM Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On 23 May 2018 at 10:15, Rodney W. Grimes > > wrote: > > >> Author: eadler > > >> Date: Wed May 23 10:45:32 2018 > > >> New Revision: 334089 > > >> URL: https://svnweb.freebsd.org/changeset/base/334089 > > >> > > >> Log: > > >> dumpon: point to better kernel debug symbols. > > >> ... > > > > > > You should of probably also included that fact that kgdb now must be > invoked > > > /usr/libexec/kgdb, as it has been moved. > > > > Rather, dumon should document installing the gdb port or package. > > I would say both would be better. > Better still would be to svn rm gdb... i know we can't today, but we are getting close... Warner -- > Rod Grimes > rgrimes@freebsd.org > > From owner-svn-src-head@freebsd.org Wed May 23 16:28:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FE4EF10FC1; Wed, 23 May 2018 16:28:32 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B740672209; Wed, 23 May 2018 16:28:31 +0000 (UTC) (envelope-from brd@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9443725322; Wed, 23 May 2018 16:28:31 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NGSVsa031852; Wed, 23 May 2018 16:28:31 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NGSVH8031851; Wed, 23 May 2018 16:28:31 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201805231628.w4NGSVH8031851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Wed, 23 May 2018 16:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334102 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 334102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 16:28:32 -0000 Author: brd Date: Wed May 23 16:28:31 2018 New Revision: 334102 URL: https://svnweb.freebsd.org/changeset/base/334102 Log: Switch calendar installs to use FILES and SYMLINKS instead of bare install(1) Also explicitly list each file to install so we don't silently add or miss some. Approved by: bapt (mentor) Modified: head/usr.bin/calendar/Makefile Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Wed May 23 15:43:35 2018 (r334101) +++ head/usr.bin/calendar/Makefile Wed May 23 16:28:31 2018 (r334102) @@ -12,25 +12,99 @@ INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_F pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U DE_LINKS= de_DE.ISO8859-15 FR_LINKS= fr_FR.ISO8859-15 -TEXTMODE?= 444 -beforeinstall: - ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ - ${.CURDIR}/calendars/calendar.* ${DESTDIR}${SHAREDIR}/calendar +FILESGROUPS+= CALS +CALS= calendars/calendar.all \ + calendars/calendar.australia \ + calendars/calendar.birthday \ + calendars/calendar.brazilian \ + calendars/calendar.christian \ + calendars/calendar.computer \ + calendars/calendar.croatian \ + calendars/calendar.dutch \ + calendars/calendar.freebsd \ + calendars/calendar.french \ + calendars/calendar.german \ + calendars/calendar.history \ + calendars/calendar.holiday \ + calendars/calendar.hungarian \ + calendars/calendar.judaic \ + calendars/calendar.lotr \ + calendars/calendar.music \ + calendars/calendar.newzealand \ + calendars/calendar.russian \ + calendars/calendar.southafrica \ + calendars/calendar.ukrainian \ + calendars/calendar.usholiday \ + calendars/calendar.world +CALSDIR= ${SHAREDIR}/calendar + +CAL_de_AT.ISO_8859-15= calendar.feiertag + +CAL_de_DE.ISO8859-1= calendar.all \ + calendar.feiertag \ + calendar.geschichte \ + calendar.kirche \ + calendar.literatur \ + calendar.musik \ + calendar.wissenschaft + +CAL_fr_FR.ISO8859-1= calendar.all \ + calendar.fetes \ + calendar.french \ + calendar.jferies \ + calendar.proverbes + +CAL_hr_HR.ISO8859-2= calendar.all \ + calendar.praznici + +CAL_hu_HU.ISO8859-2= calendar.all \ + calendar.nevnapok \ + calendar.unnepek + +CAL_pt_BR.ISO8859-1= calendar.all \ + calendar.commemorative \ + calendar.holidays \ + calendar.mcommemorative + +CAL_pt_BR.UTF-8= calendar.all \ + calendar.commemorative \ + calendar.holidays \ + calendar.mcommemorative + +CAL_ru_RU.KOI8-R= calendar.all \ + calendar.common \ + calendar.holiday \ + calendar.military \ + calendar.orthodox \ + calendar.pagan + +CAL_ru_RU.UTF-8= calendar.all \ + calendar.common \ + calendar.holiday \ + calendar.military \ + calendar.orthodox \ + calendar.pagan + +CAL_uk_UA.KOI8-U= calendar.all \ + calendar.holiday \ + calendar.misc \ + calendar.orthodox + .for lang in ${INTER} - ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ - ${.CURDIR}/calendars/${lang}/calendar.* \ - ${DESTDIR}${SHAREDIR}/calendar/${lang} +FILESGROUPS+= CALS_${lang} +CALS_${lang}DIR= ${SHAREDIR}/calendar/${lang} +.for file in ${CAL_${lang}} +CALS_${lang}+= ${file:S@^@calendars/${lang}/@} .endfor +.endfor + + .for link in ${DE_LINKS} - rm -rf ${DESTDIR}${SHAREDIR}/calendar/${link} - ${INSTALL} ${TAG_ARGS} -l s de_DE.ISO8859-1 \ - ${DESTDIR}${SHAREDIR}/calendar/${link} +SYMLINKS+= de_DE.ISO8859-1 ${SHAREDIR}/calendar/${link} .endfor .for link in ${FR_LINKS} - rm -rf ${DESTDIR}${SHAREDIR}/calendar/${link} - ${INSTALL} ${TAG_ARGS} -l s fr_FR.ISO8859-1 \ - ${DESTDIR}${SHAREDIR}/calendar/${link} +SYMLINKS+= fr_FR.ISO8859-1 ${SHAREDIR}/calendar/${link} .endfor HAS_TESTS= From owner-svn-src-head@freebsd.org Wed May 23 16:31:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 030F3F1E2B2; Wed, 23 May 2018 16:31:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7E6772683; Wed, 23 May 2018 16:31:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A5DC2538B; Wed, 23 May 2018 16:31:47 +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 w4NGVloI035816; Wed, 23 May 2018 16:31:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NGVkmQ035812; Wed, 23 May 2018 16:31:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805231631.w4NGVkmQ035812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 May 2018 16:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334103 - in head/sys/i386: i386 include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/i386: i386 include X-SVN-Commit-Revision: 334103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 16:31:48 -0000 Author: kib Date: Wed May 23 16:31:46 2018 New Revision: 334103 URL: https://svnweb.freebsd.org/changeset/base/334103 Log: Support IBRS for i386. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D15522 Modified: head/sys/i386/i386/exception.s head/sys/i386/i386/genassym.c head/sys/i386/i386/support.s head/sys/i386/include/asmacros.h Modified: head/sys/i386/i386/exception.s ============================================================================== --- head/sys/i386/i386/exception.s Wed May 23 16:28:31 2018 (r334102) +++ head/sys/i386/i386/exception.s Wed May 23 16:31:46 2018 (r334103) @@ -310,6 +310,8 @@ IDTVEC(dbg) jz calltrap dbg_user: NMOVE_STACKS + movl $handle_ibrs_entry,%eax + call *%eax pushl %esp movl $trap,%eax call *%eax @@ -337,6 +339,8 @@ nmi_mchk_common: * Do not switch to the thread kernel stack, otherwise we might * obliterate the previous context partially copied from the * trampoline stack. + * Do not re-enable IBRS, there is no good place to store + * previous state if we come from the kernel. */ movl %cr3, %eax movl %eax, TF_ERR(%esp) @@ -364,6 +368,8 @@ IDTVEC(int0x80_syscall) SET_KERNEL_SREGS cld MOVE_STACKS + movl $handle_ibrs_entry,%eax + call *%eax sti FAKE_MCOUNT(TF_EIP(%esp)) pushl %esp @@ -509,7 +515,9 @@ doreti_exit: jmp 2f 1: testl $SEL_RPL_MASK, TF_CS(%esp) jz doreti_popl_fs -2: movl %esp, %esi +2: movl $handle_ibrs_exit,%eax + call *%eax + movl %esp, %esi movl PCPU(TRAMPSTK), %edx subl %ecx, %edx movl %edx, %edi Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Wed May 23 16:28:31 2018 (r334102) +++ head/sys/i386/i386/genassym.c Wed May 23 16:31:46 2018 (r334103) @@ -221,6 +221,7 @@ ASSYM(PC_PRIVATE_TSS, offsetof(struct pcpu, pc_private ASSYM(PC_KESP0, offsetof(struct pcpu, pc_kesp0)); ASSYM(PC_TRAMPSTK, offsetof(struct pcpu, pc_trampstk)); ASSYM(PC_COPYOUT_BUF, offsetof(struct pcpu, pc_copyout_buf)); +ASSYM(PC_IBPB_SET, offsetof(struct pcpu, pc_ibpb_set)); #ifdef DEV_APIC ASSYM(LA_EOI, LAPIC_EOI * LAPIC_MEM_MUL); Modified: head/sys/i386/i386/support.s ============================================================================== --- head/sys/i386/i386/support.s Wed May 23 16:28:31 2018 (r334102) +++ head/sys/i386/i386/support.s Wed May 23 16:31:46 2018 (r334103) @@ -433,9 +433,31 @@ msr_onfault: ret ENTRY(handle_ibrs_entry) - ret + cmpb $0,hw_ibrs_active + je 1f + movl $MSR_IA32_SPEC_CTRL,%ecx + rdmsr + orl $(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP),%eax + orl $(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP)>>32,%edx + wrmsr + movb $1,PCPU(IBPB_SET) + /* + * i386 does not implement SMEP, but the 4/4 split makes this not + * that important. + */ +1: ret END(handle_ibrs_entry) ENTRY(handle_ibrs_exit) - ret + cmpb $0,PCPU(IBPB_SET) + je 1f + pushl %ecx + movl $MSR_IA32_SPEC_CTRL,%ecx + rdmsr + andl $~(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP),%eax + andl $~((IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP)>>32),%edx + wrmsr + popl %ecx + movb $0,PCPU(IBPB_SET) +1: ret END(handle_ibrs_exit) Modified: head/sys/i386/include/asmacros.h ============================================================================== --- head/sys/i386/include/asmacros.h Wed May 23 16:28:31 2018 (r334102) +++ head/sys/i386/include/asmacros.h Wed May 23 16:31:46 2018 (r334103) @@ -218,10 +218,14 @@ testl $PCB_VM86CALL, PCB_FLAGS(%eax) jnz .L\@.3 NMOVE_STACKS + movl $handle_ibrs_entry,%edx + call *%edx jmp .L\@.3 .L\@.1: testb $SEL_RPL_MASK, TF_CS(%esp) jz .L\@.3 .L\@.2: MOVE_STACKS + movl $handle_ibrs_entry,%edx + call *%edx .L\@.3: .endm From owner-svn-src-head@freebsd.org Wed May 23 16:49:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EEC0F1EB2D; Wed, 23 May 2018 16:49:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3224D73382; Wed, 23 May 2018 16:49:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id E9FE194C1; Wed, 23 May 2018 16:49:29 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Matt Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334074 - head/sys/sys Date: Wed, 23 May 2018 09:43:13 -0700 Message-ID: <2320762.5cWPj1u675@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201805230615.w4N6FtiS022201@repo.freebsd.org> References: <201805230615.w4N6FtiS022201@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 16:49:30 -0000 On Wednesday, May 23, 2018 06:15:55 AM Matt Macy wrote: > Author: mmacy > Date: Wed May 23 06:15:55 2018 > New Revision: 334074 > URL: https://svnweb.freebsd.org/changeset/base/334074 > > Log: > Bump FreeBSD_version after r333813 > > Modified: > head/sys/sys/param.h FYI, these values are documented in head/en_US.ISO8859-1/books/porters-handbook/versions/chapter.xml in the doc repository. -- John Baldwin From owner-svn-src-head@freebsd.org Wed May 23 16:49:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BF25F1EB53; Wed, 23 May 2018 16:49:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B87F733CF; Wed, 23 May 2018 16:49:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 6737994C3; Wed, 23 May 2018 16:49:32 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334089 - head/sbin/dumpon Date: Wed, 23 May 2018 09:30:31 -0700 Message-ID: <2256597.yrYJmMiYOr@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201805231045.w4NAjWsv059104@repo.freebsd.org> References: <201805231045.w4NAjWsv059104@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 16:49:33 -0000 On Wednesday, May 23, 2018 10:45:32 AM Eitan Adler wrote: > Author: eadler > Date: Wed May 23 10:45:32 2018 > New Revision: 334089 > URL: https://svnweb.freebsd.org/changeset/base/334089 > > Log: > dumpon: point to better kernel debug symbols. > > The objdir is temporary, and the current example points to GENERIC. > Instead point to the installed location of the debug symbols that are > supposed to match the kernel you are using. > > PR: 223993 > Submitted by: Trond.Endrestol@ximalas.info Actually, it's better to point to the kernel in this case (kgdb /boot/kernel/kernel). Some versions of ports kgdb won't recognize kernel.debug as a kernel and treat it as a userland binary instead. > Modified: > head/sbin/dumpon/dumpon.8 > > Modified: head/sbin/dumpon/dumpon.8 > ============================================================================== > --- head/sbin/dumpon/dumpon.8 Wed May 23 10:39:02 2018 (r334088) > +++ head/sbin/dumpon/dumpon.8 Wed May 23 10:45:32 2018 (r334089) > @@ -311,11 +311,11 @@ The > can be now examined using > .Xr kgdb 1 : > .Pp > -.Dl # kgdb /usr/obj/sys/GENERIC/kernel.debug vmcore.# > +.Dl # kgdb /usr/lib/debug/boot/kernel/kernel.debug vmcore.# > .Pp > or shorter: > .Pp > -.Dl # kgdb -n # /usr/obj/sys/GENERIC/kernel.debug > +.Dl # kgdb -n # /usr/lib/debug/boot/kernel/kernel.debug > .Pp > The core was decrypted properly if > .Xr kgdb 1 > -- John Baldwin From owner-svn-src-head@freebsd.org Wed May 23 16:54:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4544FF2D14A; Wed, 23 May 2018 16:54:54 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9A8373BEC; Wed, 23 May 2018 16:54:53 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id B0C0395BD; Wed, 23 May 2018 16:54:53 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f174.google.com with SMTP id d73-v6so23610476iog.3; Wed, 23 May 2018 09:54:53 -0700 (PDT) X-Gm-Message-State: ALKqPweaEy84MVqUEwZsWYEOvf5EX0JwugEaIVKmLE7vIOM4X0YUm1JA jKRCOjGaxQ8EbJIdlr9+EkSeZcBYrmAuxneCkv4= X-Google-Smtp-Source: AB8JxZoKNmkASJFQiXudekcizawBeF3wUTLwmQ16JEnb308pmWKVVqWGqCxfkbQzqUEUJMELekrlRZp/h5Sb3mKbEw0= X-Received: by 2002:a6b:b7c6:: with SMTP id h189-v6mr3170705iof.94.1527094493103; Wed, 23 May 2018 09:54:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 09:54:52 -0700 (PDT) In-Reply-To: <1527083566.32688.117.camel@freebsd.org> References: <201805230615.w4N6FtiS022201@repo.freebsd.org> <1527083566.32688.117.camel@freebsd.org> From: Matthew Macy Date: Wed, 23 May 2018 09:54:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334074 - head/sys/sys To: Ian Lepore Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 16:54:54 -0000 Track On Wed, May 23, 2018 at 06:53 Ian Lepore wrote: > On Wed, 2018-05-23 at 06:15 +0000, Matt Macy wrote: > > Author: mmacy > > Date: Wed May 23 06:15:55 2018 > > New Revision: 334074 > > URL: https://svnweb.freebsd.org/changeset/base/334074 > > > > Log: > > Bump FreeBSD_version after r333813 > > > > Modified: > > head/sys/sys/param.h > > > > Modified: head/sys/sys/param.h > > ============================================================ > ================== > > --- head/sys/sys/param.h Wed May 23 04:09:01 2018 (r334073) > > +++ head/sys/sys/param.h Wed May 23 06:15:55 2018 (r334074) > > @@ -60,7 +60,7 @@ > > * in the range 5 to 9. > > */ > > #undef __FreeBSD_version > > -#define __FreeBSD_version 1200063 /* Master, propagated to newvers */ > > +#define __FreeBSD_version 1200064 /* Master, propagated to newvers */ > > > > /* > > * __FreeBSD_kernel__ indicates that this system uses the kernel of > FreeBSD, > > > > Nothing about this commit or the commit message for r333813 says why a > version bump would be warranted. New user-visible features? API > change? The diff for r333813 doesn't appear to contain either of those. > Out of tree drivers need to conditionally compile for the change of the multicast address list in ifnet from TAILQ to CK_STAILQ -- Ian > From owner-svn-src-head@freebsd.org Wed May 23 16:56:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 635D1F2D25C; Wed, 23 May 2018 16:56:02 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 144D073DAA; Wed, 23 May 2018 16:56:02 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f53.google.com (mail-it0-f53.google.com [209.85.214.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id D398D95BE; Wed, 23 May 2018 16:56:01 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f53.google.com with SMTP id q72-v6so5225202itc.0; Wed, 23 May 2018 09:56:01 -0700 (PDT) X-Gm-Message-State: ALKqPwfsPCXfVGaHJbnefcwlf+ovjh8AVmwMyLwTRJF+0sGFD4fImTpJ NtObm0QPWn4QbbPxbEadCuUsPnTYfQLSAh2aPtA= X-Google-Smtp-Source: AB8JxZoGeRdgYQ/EsE1pAREF+OE/tdsmrC/Hz18ldYrVMYdtgwxwJ05uu+24hSmGque5ThKlxkeVRyxyBxjYGpNTTcM= X-Received: by 2002:a24:4455:: with SMTP id o82-v6mr5829259ita.4.1527094561292; Wed, 23 May 2018 09:56:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 09:56:00 -0700 (PDT) In-Reply-To: <2320762.5cWPj1u675@ralph.baldwin.cx> References: <201805230615.w4N6FtiS022201@repo.freebsd.org> <2320762.5cWPj1u675@ralph.baldwin.cx> From: Matthew Macy Date: Wed, 23 May 2018 09:56:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334074 - head/sys/sys To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 16:56:02 -0000 On Wed, May 23, 2018 at 9:43 AM, John Baldwin wrote: > On Wednesday, May 23, 2018 06:15:55 AM Matt Macy wrote: >> Author: mmacy >> Date: Wed May 23 06:15:55 2018 >> New Revision: 334074 >> URL: https://svnweb.freebsd.org/changeset/base/334074 >> >> Log: >> Bump FreeBSD_version after r333813 >> >> Modified: >> head/sys/sys/param.h > > FYI, these values are documented in > head/en_US.ISO8859-1/books/porters-handbook/versions/chapter.xml in the doc > repository. Thanks updated for 1200064. Someone(tm) needs to do 1200063. -M From owner-svn-src-head@freebsd.org Wed May 23 17:00:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76151F2D455; Wed, 23 May 2018 17:00:07 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 253F474015; Wed, 23 May 2018 17:00:07 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0650D25811; Wed, 23 May 2018 17:00:07 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NH065o047403; Wed, 23 May 2018 17:00:06 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NH05hs047395; Wed, 23 May 2018 17:00:05 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805231700.w4NH05hs047395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 23 May 2018 17:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334104 - in head/sys: netinet sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: netinet sys X-SVN-Commit-Revision: 334104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 17:00:07 -0000 Author: mmacy Date: Wed May 23 17:00:05 2018 New Revision: 334104 URL: https://svnweb.freebsd.org/changeset/base/334104 Log: epoch: allow for conditionally asserting that the epoch context fields are unused by zeroing on INVARIANTS builds Modified: head/sys/netinet/ip_divert.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_subr.c head/sys/netinet/udp_usrreq.c head/sys/sys/epoch.h Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Wed May 23 16:31:46 2018 (r334103) +++ head/sys/netinet/ip_divert.c Wed May 23 17:00:05 2018 (r334104) @@ -670,7 +670,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS) if (error) return error; - il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK); inp_list = il->il_inp_list; INP_INFO_RLOCK(&V_divcbinfo); Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Wed May 23 16:31:46 2018 (r334103) +++ head/sys/netinet/raw_ip.c Wed May 23 17:00:05 2018 (r334104) @@ -1056,7 +1056,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) if (error) return (error); - il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK); inp_list = il->il_inp_list; INP_INFO_RLOCK(&V_ripcbinfo); Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed May 23 16:31:46 2018 (r334103) +++ head/sys/netinet/tcp_subr.c Wed May 23 17:00:05 2018 (r334104) @@ -2151,7 +2151,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (error) return (error); - il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK); inp_list = il->il_inp_list; INP_INFO_WLOCK(&V_tcbinfo); Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Wed May 23 16:31:46 2018 (r334103) +++ head/sys/netinet/udp_usrreq.c Wed May 23 17:00:05 2018 (r334104) @@ -874,7 +874,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) error = SYSCTL_OUT(req, &xig, sizeof xig); if (error) return (error); - il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK); inp_list = il->il_inp_list; INP_INFO_RLOCK(&V_udbinfo); Modified: head/sys/sys/epoch.h ============================================================================== --- head/sys/sys/epoch.h Wed May 23 16:31:46 2018 (r334103) +++ head/sys/sys/epoch.h Wed May 23 17:00:05 2018 (r334104) @@ -64,6 +64,14 @@ int in_epoch(void); DPCPU_DECLARE(int, epoch_cb_count); DPCPU_DECLARE(struct grouptask, epoch_cb_task); +#ifdef INVARIANTS +#define M_EPOCH_CALL_NOWAIT (M_NOWAIT|M_ZERO) +#define M_EPOCH_CALL_WAITOK (M_WAITOK|M_ZERO) +#else +#define M_EPOCH_CALL_NOWAIT M_NOWAIT +#define M_EPOCH_CALL_WAITOK M_WAITOK +#endif + static __inline void epoch_enter_preempt(epoch_t epoch) { From owner-svn-src-head@freebsd.org Wed May 23 17:01:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6490DF2D836; Wed, 23 May 2018 17:01:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1231674439; Wed, 23 May 2018 17:01:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8CEF25946; Wed, 23 May 2018 17:01:28 +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 w4NH1SMM047565; Wed, 23 May 2018 17:01:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NH1SiM047563; Wed, 23 May 2018 17:01:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805231701.w4NH1SiM047563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 23 May 2018 17:01:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334105 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 334105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 17:01:29 -0000 Author: markj Date: Wed May 23 17:01:28 2018 New Revision: 334105 URL: https://svnweb.freebsd.org/changeset/base/334105 Log: Revert r334090. It causes the 32bit compat build of libmd to fail with: libmd/rmd160c.c:86:9: error: 'ripemd160_block' macro redefined #define ripemd160_block ripemd160_block_x86 ^ libmd/ripemd.h:122:9: note: previous definition is here #define ripemd160_block _libmd_ripemd160_block Modified: head/lib/libmd/Makefile head/lib/libmd/mdXhl.c Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Wed May 23 17:00:05 2018 (r334104) +++ head/lib/libmd/Makefile Wed May 23 17:01:28 2018 (r334105) @@ -15,7 +15,7 @@ SRCS= md4c.c md5c.c md4hl.c md5hl.c \ INCS= md4.h md5.h ripemd.h sha.h sha256.h sha384.h sha512.h sha512t.h \ skein.h skein_port.h skein_freebsd.h skein_iv.h -WARNS?= 1 +WARNS?= 0 MAN+= md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3 skein.3 MLINKS+=md4.3 MD4Init.3 md4.3 MD4Update.3 md4.3 MD4Final.3 Modified: head/lib/libmd/mdXhl.c ============================================================================== --- head/lib/libmd/mdXhl.c Wed May 23 17:00:05 2018 (r334104) +++ head/lib/libmd/mdXhl.c Wed May 23 17:01:28 2018 (r334105) @@ -54,7 +54,8 @@ MDXFdChunk(int fd, char *buf, off_t ofs, off_t len) { unsigned char buffer[16*1024]; MDX_CTX ctx; - int readrv; + struct stat stbuf; + int readrv, e; off_t remain; if (len < 0) { From owner-svn-src-head@freebsd.org Wed May 23 17:02:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92E9DF2D913; Wed, 23 May 2018 17:02:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 324B37462C; Wed, 23 May 2018 17:02:14 +0000 (UTC) (envelope-from jhb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14CCA25989; Wed, 23 May 2018 17:02:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NH2DLc052098; Wed, 23 May 2018 17:02:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NH2D1g052094; Wed, 23 May 2018 17:02:13 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201805231702.w4NH2D1g052094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 23 May 2018 17:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334106 - head/lib/libutil X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/libutil X-SVN-Commit-Revision: 334106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 17:02:14 -0000 Author: jhb Date: Wed May 23 17:02:12 2018 New Revision: 334106 URL: https://svnweb.freebsd.org/changeset/base/334106 Log: Use __SCCSID() for SCCS IDs. - Define NO__SCCSID in CFLAGS to preserve existing behavior of omitting SCCS IDs by default. - While here, fix the $FreeBSD$ in pw_util.c to use __FBSDID. Modified: head/lib/libutil/Makefile head/lib/libutil/login_tty.c head/lib/libutil/pty.c head/lib/libutil/pw_util.c head/lib/libutil/uucplock.c Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed May 23 17:01:28 2018 (r334105) +++ head/lib/libutil/Makefile Wed May 23 17:02:12 2018 (r334106) @@ -19,7 +19,7 @@ SRCS= _secure_path.c auth.c expand_number.c flopen.c f stub.c trimdomain.c uucplock.c INCS= libutil.h login_cap.h -CFLAGS+= -DLIBC_SCCS +CFLAGS+= -DNO__SCCSID .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 Modified: head/lib/libutil/login_tty.c ============================================================================== --- head/lib/libutil/login_tty.c Wed May 23 17:01:28 2018 (r334105) +++ head/lib/libutil/login_tty.c Wed May 23 17:02:12 2018 (r334106) @@ -31,12 +31,7 @@ #include __FBSDID("$FreeBSD$"); - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)login_tty.c 8.1 (Berkeley) 6/4/93"; -#endif -#endif /* LIBC_SCCS and not lint */ +__SCCSID("@(#)login_tty.c 8.1 (Berkeley) 6/4/93"); #include Modified: head/lib/libutil/pty.c ============================================================================== --- head/lib/libutil/pty.c Wed May 23 17:01:28 2018 (r334105) +++ head/lib/libutil/pty.c Wed May 23 17:02:12 2018 (r334106) @@ -31,12 +31,7 @@ #include __FBSDID("$FreeBSD$"); - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)pty.c 8.3 (Berkeley) 5/16/94"; -#endif -#endif /* LIBC_SCCS and not lint */ +__SCCSID("@(#)pty.c 8.3 (Berkeley) 5/16/94"); #include #include Modified: head/lib/libutil/pw_util.c ============================================================================== --- head/lib/libutil/pw_util.c Wed May 23 17:01:28 2018 (r334105) +++ head/lib/libutil/pw_util.c Wed May 23 17:02:12 2018 (r334106) @@ -36,13 +36,9 @@ * SUCH DAMAGE. */ -#ifndef lint -#if 0 -static const char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94"; -#endif -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); +__SCCSID("@(#)pw_util.c 8.3 (Berkeley) 4/2/94"); /* * This file is used by all the "password" programs; vipw(8), chpass(1), Modified: head/lib/libutil/uucplock.c ============================================================================== --- head/lib/libutil/uucplock.c Wed May 23 17:01:28 2018 (r334105) +++ head/lib/libutil/uucplock.c Wed May 23 17:02:12 2018 (r334106) @@ -31,10 +31,7 @@ #include __FBSDID("$FreeBSD$"); - -#ifndef lint -static const char sccsid[] = "@(#)uucplock.c 8.1 (Berkeley) 6/6/93"; -#endif /* not lint */ +__SCCSID("@(#)uucplock.c 8.1 (Berkeley) 6/6/93"); #include #include From owner-svn-src-head@freebsd.org Wed May 23 17:05:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 873A0F2DB0A; Wed, 23 May 2018 17:05:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29B887488F; Wed, 23 May 2018 17:05:13 +0000 (UTC) (envelope-from jhb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05260259A0; Wed, 23 May 2018 17:05:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NH5Cqw052278; Wed, 23 May 2018 17:05:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NH5CEd052277; Wed, 23 May 2018 17:05:12 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201805231705.w4NH5CEd052277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 23 May 2018 17:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334107 - head/lib/libthr X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/libthr X-SVN-Commit-Revision: 334107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 17:05:13 -0000 Author: jhb Date: Wed May 23 17:05:12 2018 New Revision: 334107 URL: https://svnweb.freebsd.org/changeset/base/334107 Log: Remove references to the LIBC_SCCS and SYSLIBC_SCCS C macros. This language dates back to when libthr was libc_r that included its own syscalls and replaced libc entirely. It hasn't been relevant for a long time. Modified: head/lib/libthr/Makefile Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Wed May 23 17:02:12 2018 (r334106) +++ head/lib/libthr/Makefile Wed May 23 17:05:12 2018 (r334107) @@ -3,10 +3,7 @@ # All library objects contain FreeBSD revision strings by default; they may be # excluded as a space-saving measure. To produce a library that does # not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS -# below. Note, there are no IDs for syscall stubs whose sources are generated. -# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS -# (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the -# system call stubs. +# below. PACKAGE= clibs SHLIBDIR?= /lib From owner-svn-src-head@freebsd.org Wed May 23 17:20:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8D8CEAA02B; Wed, 23 May 2018 17:20:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DB1C74EF0; Wed, 23 May 2018 17:20:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f45.google.com with SMTP id y189-v6so5405704itb.2; Wed, 23 May 2018 10:20:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=YhkDsvmLlXIvXba5pmw0vuLzFmsBbJuEFFMv0lA2VkU=; b=qDQj7P8xW/tM+EHClBHAMM4NNfONsm0/cg7tpt59T8FnhKpVGTCSKT0ozuSRacJQNw GTh0Dup9GLNr8C52iYHRVYauHuBQ7JtxsTB6a3PZZvgChqq9tiL3RZGYlMP2lcElFU4j wO2szT/VUrFETsQQ2gGbJRCDAayK6GddlUxEFaZkCWXgyOgDLq3aESXfbPGXtsoaQQUn elRO7Nvcd1p6B5iFwBlFrIJsIFDY6NIo9J5jknRRcYLMP5ikG35LFmWK3CGZIfTjRTVB WyhvUf10lYre933cquSVb/XDH7rBFhfr8kmi2fYGzlXau5neWTG2Yjnd7ItrK3hXXm2U dS+Q== X-Gm-Message-State: ALKqPwchgdZATqirIOUn3k8uU+1Xg4WZT6XEbXEB6DXqTQOSv94WKqcy aOXcb/ngKksrdRCgdFHReZVI5Lpl X-Google-Smtp-Source: AB8JxZp54JfXu1GF55t8oBN3luXqb8F9OVwxtxxX/hn2+Yz+ZOrsnnhqsqmhIMvUJcjVrvQ5QAZGWg== X-Received: by 2002:a24:f684:: with SMTP id u126-v6mr6281752ith.102.1527094078128; Wed, 23 May 2018 09:47:58 -0700 (PDT) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com. [209.85.214.42]) by smtp.gmail.com with ESMTPSA id a187-v6sm1357200itd.41.2018.05.23.09.47.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 09:47:58 -0700 (PDT) Received: by mail-it0-f42.google.com with SMTP id j186-v6so5150605ita.5; Wed, 23 May 2018 09:47:57 -0700 (PDT) X-Received: by 2002:a24:2885:: with SMTP id h127-v6mr5821636ith.46.1527094077821; Wed, 23 May 2018 09:47:57 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:9696:0:0:0:0:0 with HTTP; Wed, 23 May 2018 09:47:57 -0700 (PDT) In-Reply-To: <822609135.13913713.1527060223167.JavaMail.zimbra@stormshield.eu> References: <201805221554.w4MFsPQA083334@repo.freebsd.org> <822609135.13913713.1527060223167.JavaMail.zimbra@stormshield.eu> From: Conrad Meyer Date: Wed, 23 May 2018 09:47:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat To: Emeric POUPON Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 17:20:03 -0000 On Wed, May 23, 2018 at 12:23 AM, Emeric POUPON wrote: >> From: "Conrad Meyer" > >> Can users control arbitrary key_allocsp() calls? If so, it seems >> concerning to expose hit/miss stats on cached security keys. > > I am not sure to understand, could you please tell more about what you mean? If users can insert arbitrary keys into the cache, they can check the hit/miss statistics to tell if that key was already present -- revealing key contents. This would be a major problem. https://security.stackexchange.com/questions/10617/what-is-a-cryptographic-oracle Best, Conrad From owner-svn-src-head@freebsd.org Wed May 23 17:25:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02E2FEAA2DA; Wed, 23 May 2018 17:25:02 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A463E752F2; Wed, 23 May 2018 17:25:02 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 813C725CDC; Wed, 23 May 2018 17:25:02 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NHP2P5062465; Wed, 23 May 2018 17:25:02 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NHP1Xh062459; Wed, 23 May 2018 17:25:01 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805231725.w4NHP1Xh062459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 23 May 2018 17:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334108 - in head: lib/libpmc lib/libpmcstat sys/sys usr.sbin/pmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: lib/libpmc lib/libpmcstat sys/sys usr.sbin/pmcstat X-SVN-Commit-Revision: 334108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 17:25:03 -0000 Author: mmacy Date: Wed May 23 17:25:00 2018 New Revision: 334108 URL: https://svnweb.freebsd.org/changeset/base/334108 Log: hwpmc: add thread id field to callchain and context switch records to allow filtering on thread in post-processing. To generate stacks for just ${THREADID}: pmcstat -R ${PREFIX}.pmcstat -L ${THREADID} -z100 -G ${PREFIX}.stacks Sponsored by: Limelight Networks Modified: head/lib/libpmc/pmclog.c head/lib/libpmc/pmclog.h head/lib/libpmcstat/libpmcstat.h head/lib/libpmcstat/libpmcstat_logging.c head/sys/sys/pmc.h head/sys/sys/pmclog.h head/usr.sbin/pmcstat/pmcstat.c Modified: head/lib/libpmc/pmclog.c ============================================================================== --- head/lib/libpmc/pmclog.c Wed May 23 17:05:12 2018 (r334107) +++ head/lib/libpmc/pmclog.c Wed May 23 17:25:00 2018 (r334108) @@ -326,8 +326,10 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l switch (ev->pl_type = PMCLOG_HEADER_TO_TYPE(h)) { case PMCLOG_TYPE_CALLCHAIN: PMCLOG_READ32(le,ev->pl_u.pl_cc.pl_pid); + PMCLOG_READ32(le,ev->pl_u.pl_cc.pl_tid); PMCLOG_READ32(le,ev->pl_u.pl_cc.pl_pmcid); PMCLOG_READ32(le,ev->pl_u.pl_cc.pl_cpuflags); + PMCLOG_READ32(le,ev->pl_u.pl_cc.pl_cpuflags2); PMCLOG_GET_CALLCHAIN_SIZE(ev->pl_u.pl_cc.pl_npc,evlen); for (npc = 0; npc < ev->pl_u.pl_cc.pl_npc; npc++) PMCLOG_READADDR(le,ev->pl_u.pl_cc.pl_pc[npc]); @@ -363,6 +365,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l PMCLOG_READADDR(le,ev->pl_u.pl_s.pl_pc); PMCLOG_READ32(le,ev->pl_u.pl_s.pl_pmcid); PMCLOG_READ32(le,ev->pl_u.pl_s.pl_usermode); + PMCLOG_READ32(le,ev->pl_u.pl_s.pl_tid); break; case PMCLOG_TYPE_PMCALLOCATE: PMCLOG_READ32(le,ev->pl_u.pl_a.pl_pmcid); @@ -393,6 +396,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l PMCLOG_READ32(le,ev->pl_u.pl_c.pl_pmcid); PMCLOG_READ64(le,ev->pl_u.pl_c.pl_value); PMCLOG_READ32(le,ev->pl_u.pl_c.pl_pid); + PMCLOG_READ32(le,ev->pl_u.pl_c.pl_tid); break; case PMCLOG_TYPE_PROCEXEC: PMCLOG_GET_PATHLEN(pathlen,evlen,pmclog_procexec); Modified: head/lib/libpmc/pmclog.h ============================================================================== --- head/lib/libpmc/pmclog.h Wed May 23 17:05:12 2018 (r334107) +++ head/lib/libpmc/pmclog.h Wed May 23 17:25:00 2018 (r334108) @@ -47,8 +47,10 @@ enum pmclog_state { struct pmclog_ev_callchain { uint32_t pl_pid; + uint32_t pl_tid; uint32_t pl_pmcid; uint32_t pl_cpuflags; + uint32_t pl_cpuflags2; uint32_t pl_npc; uintfptr_t pl_pc[PMC_CALLCHAIN_DEPTH_MAX]; }; @@ -79,7 +81,9 @@ struct pmclog_ev_map_out { struct pmclog_ev_pcsample { uintfptr_t pl_pc; pid_t pl_pid; + pid_t pl_tid; pmc_id_t pl_pmcid; + uint32_t pl_flags; uint32_t pl_usermode; }; @@ -110,6 +114,7 @@ struct pmclog_ev_pmcdetach { struct pmclog_ev_proccsw { pid_t pl_pid; + pid_t pl_tid; pmc_id_t pl_pmcid; pmc_value_t pl_value; }; Modified: head/lib/libpmcstat/libpmcstat.h ============================================================================== --- head/lib/libpmcstat/libpmcstat.h Wed May 23 17:05:12 2018 (r334107) +++ head/lib/libpmcstat/libpmcstat.h Wed May 23 17:25:00 2018 (r334108) @@ -107,6 +107,7 @@ struct pmcstat_args { #define FLAG_HAS_DURATION 0x00080000 /* -l secs */ #define FLAG_DO_WIDE_GPROF_HC 0x00100000 /* -e */ #define FLAG_SKIP_TOP_FN_RES 0x00200000 /* -I */ +#define FLAG_FILTER_THREAD_ID 0x00400000 /* -L */ int pa_required; /* required features */ int pa_pplugin; /* pre-processing plugin */ @@ -131,6 +132,7 @@ struct pmcstat_args { int pa_topcolor; /* terminal support color */ int pa_mergepmc; /* merge PMC with same name */ double pa_duration; /* time duration */ + uint32_t pa_tid; int pa_argc; char **pa_argv; STAILQ_HEAD(, pmcstat_ev) pa_events; Modified: head/lib/libpmcstat/libpmcstat_logging.c ============================================================================== --- head/lib/libpmcstat/libpmcstat_logging.c Wed May 23 17:05:12 2018 (r334107) +++ head/lib/libpmcstat/libpmcstat_logging.c Wed May 23 17:25:00 2018 (r334108) @@ -313,6 +313,11 @@ pmcstat_analyze_log(struct pmcstat_args *args, cpuflags = ev.pl_u.pl_cc.pl_cpuflags; cpu = PMC_CALLCHAIN_CPUFLAGS_TO_CPU(cpuflags); + if ((args->pa_flags & FLAG_FILTER_THREAD_ID) && + args->pa_tid != ev.pl_u.pl_cc.pl_tid) { + pmcstat_stats->ps_samples_skipped++; + break; + } /* Filter on the CPU id. */ if (!CPU_ISSET(cpu, &(args->pa_cpumask))) { pmcstat_stats->ps_samples_skipped++; Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Wed May 23 17:05:12 2018 (r334107) +++ head/sys/sys/pmc.h Wed May 23 17:25:00 2018 (r334108) @@ -922,8 +922,10 @@ struct pmc_hw { struct pmc_sample { uint16_t ps_nsamples; /* callchain depth */ - uint8_t ps_cpu; /* cpu number */ - uint8_t ps_flags; /* other flags */ + uint16_t ps_cpu; /* cpu number */ + uint16_t ps_flags; /* other flags */ + uint8_t ps_pad[2]; + lwpid_t ps_tid; /* thread id */ pid_t ps_pid; /* process PID or -1 */ struct thread *ps_td; /* which thread */ struct pmc *ps_pmc; /* interrupting PMC */ Modified: head/sys/sys/pmclog.h ============================================================================== --- head/sys/sys/pmclog.h Wed May 23 17:05:12 2018 (r334107) +++ head/sys/sys/pmclog.h Wed May 23 17:25:00 2018 (r334108) @@ -107,8 +107,10 @@ enum pmclog_type { struct pmclog_callchain { PMCLOG_ENTRY_HEADER uint32_t pl_pid; + uint32_t pl_tid; uint32_t pl_pmcid; uint32_t pl_cpuflags; + uint32_t pl_cpuflags2; /* 8 byte aligned */ uintptr_t pl_pc[PMC_CALLCHAIN_DEPTH_MAX]; } __packed; @@ -152,6 +154,8 @@ struct pmclog_pcsample { uintfptr_t pl_pc; /* 8 byte aligned */ uint32_t pl_pmcid; uint32_t pl_usermode; + uint32_t pl_tid; + uint32_t pl_pad; } __packed; struct pmclog_pmcallocate { @@ -179,6 +183,7 @@ struct pmclog_proccsw { uint32_t pl_pmcid; uint64_t pl_value; /* keep 8 byte aligned */ uint32_t pl_pid; + uint32_t pl_tid; } __packed; struct pmclog_procexec { @@ -275,7 +280,7 @@ void pmclog_process_pmcallocate(struct pmc *_pm); void pmclog_process_pmcattach(struct pmc *_pm, pid_t _pid, char *_path); void pmclog_process_pmcdetach(struct pmc *_pm, pid_t _pid); void pmclog_process_proccsw(struct pmc *_pm, struct pmc_process *_pp, - pmc_value_t _v); + pmc_value_t _v, struct thread *); void pmclog_process_procexec(struct pmc_owner *_po, pmc_id_t _pmid, pid_t _pid, uintfptr_t _startaddr, char *_path); void pmclog_process_procexit(struct pmc *_pm, struct pmc_process *_pp); Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Wed May 23 17:05:12 2018 (r334107) +++ head/usr.sbin/pmcstat/pmcstat.c Wed May 23 17:25:00 2018 (r334108) @@ -500,7 +500,7 @@ main(int argc, char **argv) CPU_COPY(&rootmask, &cpumask); while ((option = getopt(argc, argv, - "CD:EF:G:IM:NO:P:R:S:TWa:c:def:gk:l:m:n:o:p:qr:s:t:vw:z:")) != -1) + "CD:EF:G:IL:M:NO:P:R:S:TWa:c:def:gk:l:m:n:o:p:qr:s:t:vw:z:")) != -1) switch (option) { case 'a': /* Annotate + callgraph */ args.pa_flags |= FLAG_DO_ANNOTATE; @@ -581,6 +581,10 @@ main(int argc, char **argv) args.pa_flags |= FLAG_HAS_KERNELPATH; break; + case 'L': + args.pa_flags |= FLAG_FILTER_THREAD_ID; + args.pa_tid = strtol(optarg, &end, 0); + break; case 'l': /* time duration in seconds */ duration = strtod(optarg, &end); if (*end != '\0' || duration <= 0) From owner-svn-src-head@freebsd.org Wed May 23 17:30:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62593EAA448; Wed, 23 May 2018 17:30:24 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10D8D754F6; Wed, 23 May 2018 17:30:24 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E623825CEB; Wed, 23 May 2018 17:30:23 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NHUN1I062726; Wed, 23 May 2018 17:30:23 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NHUN0f062725; Wed, 23 May 2018 17:30:23 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805231730.w4NHUN0f062725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 23 May 2018 17:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334109 - head X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 334109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 17:30:24 -0000 Author: mmacy Date: Wed May 23 17:30:23 2018 New Revision: 334109 URL: https://svnweb.freebsd.org/changeset/base/334109 Log: UPDATING: note that the pmc callchain ABI has changed Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed May 23 17:25:00 2018 (r334108) +++ head/UPDATING Wed May 23 17:30:23 2018 (r334109) @@ -51,6 +51,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20180523: + The on-disk format for hwpmc callchain records has changed to include + threadid corresponding to a given record. This changes the field offsets + and thus requires that libpmcstat be rebuilt before using a kernel + later than r334108. + 20180517: The vxge(4) driver has been removed. This driver was introduced into HEAD one week before the Exar left the Ethernet market and is not From owner-svn-src-head@freebsd.org Wed May 23 17:44:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5859FEAA87A; Wed, 23 May 2018 17:44:30 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E890275DDE; Wed, 23 May 2018 17:44:29 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C240C26022; Wed, 23 May 2018 17:44:29 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NHiT5Y072383; Wed, 23 May 2018 17:44:29 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NHiTB3072381; Wed, 23 May 2018 17:44:29 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805231744.w4NHiTB3072381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 23 May 2018 17:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334110 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 334110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 17:44:30 -0000 Author: mmacy Date: Wed May 23 17:44:29 2018 New Revision: 334110 URL: https://svnweb.freebsd.org/changeset/base/334110 Log: hwppmc: set threadid in callchain records - second part of r334108 Modified: head/sys/dev/hwpmc/hwpmc_logging.c head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_logging.c Wed May 23 17:30:23 2018 (r334109) +++ head/sys/dev/hwpmc/hwpmc_logging.c Wed May 23 17:44:29 2018 (r334110) @@ -181,7 +181,7 @@ static struct mtx pmc_kthread_mtx; /* sleep lock */ * Assertions about the log file format. */ -CTASSERT(sizeof(struct pmclog_callchain) == 6*4 + +CTASSERT(sizeof(struct pmclog_callchain) == 8*4 + PMC_CALLCHAIN_DEPTH_MAX*sizeof(uintfptr_t)); CTASSERT(sizeof(struct pmclog_closelog) == 3*4); CTASSERT(sizeof(struct pmclog_dropnotify) == 3*4); @@ -190,12 +190,12 @@ CTASSERT(sizeof(struct pmclog_map_in) == PATH_MAX + CTASSERT(offsetof(struct pmclog_map_in,pl_pathname) == 4*4 + sizeof(uintfptr_t)); CTASSERT(sizeof(struct pmclog_map_out) == 4*4 + 2*sizeof(uintfptr_t)); -CTASSERT(sizeof(struct pmclog_pcsample) == 6*4 + sizeof(uintfptr_t)); +CTASSERT(sizeof(struct pmclog_pcsample) == 8*4 + sizeof(uintfptr_t)); CTASSERT(sizeof(struct pmclog_pmcallocate) == 6*4); CTASSERT(sizeof(struct pmclog_pmcattach) == 5*4 + PATH_MAX); CTASSERT(offsetof(struct pmclog_pmcattach,pl_pathname) == 5*4); CTASSERT(sizeof(struct pmclog_pmcdetach) == 5*4); -CTASSERT(sizeof(struct pmclog_proccsw) == 5*4 + 8); +CTASSERT(sizeof(struct pmclog_proccsw) == 6*4 + 8); CTASSERT(sizeof(struct pmclog_procexec) == 5*4 + PATH_MAX + sizeof(uintfptr_t)); CTASSERT(offsetof(struct pmclog_procexec,pl_pathname) == 5*4 + @@ -907,8 +907,11 @@ pmclog_process_callchain(struct pmc *pm, struct pmc_sa flags = PMC_CALLCHAIN_TO_CPUFLAGS(ps->ps_cpu,ps->ps_flags); PMCLOG_RESERVE_SAFE(po, CALLCHAIN, recordlen); PMCLOG_EMIT32(ps->ps_pid); + PMCLOG_EMIT32(ps->ps_tid); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(flags); + /* unused for now */ + PMCLOG_EMIT32(0); for (n = 0; n < ps->ps_nsamples; n++) PMCLOG_EMITADDR(ps->ps_pc[n]); PMCLOG_DESPATCH_SAFE(po); @@ -1033,7 +1036,7 @@ pmclog_process_pmcdetach(struct pmc *pm, pid_t pid) */ void -pmclog_process_proccsw(struct pmc *pm, struct pmc_process *pp, pmc_value_t v) +pmclog_process_proccsw(struct pmc *pm, struct pmc_process *pp, pmc_value_t v, struct thread *td) { struct pmc_owner *po; @@ -1049,6 +1052,7 @@ pmclog_process_proccsw(struct pmc *pm, struct pmc_proc PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT64(v); PMCLOG_EMIT32(pp->pp_proc->p_pid); + PMCLOG_EMIT32(td->td_tid); PMCLOG_DESPATCH(po); } Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Wed May 23 17:30:23 2018 (r334109) +++ head/sys/dev/hwpmc/hwpmc_mod.c Wed May 23 17:44:29 2018 (r334110) @@ -1657,7 +1657,7 @@ pmc_process_csw_out(struct thread *td) mtx_pool_unlock_spin(pmc_mtxpool, pm); if (pm->pm_flags & PMC_F_LOG_PROCCSW) - pmclog_process_proccsw(pm, pp, tmp); + pmclog_process_proccsw(pm, pp, tmp, td); } } @@ -4576,10 +4576,13 @@ pmc_process_interrupt(int cpu, int ring, struct pmc *p counter_u64_add(pm->pm_runcount, 1); /* hold onto PMC */ ps->ps_pmc = pm; - if ((td = curthread) && td->td_proc) - ps->ps_pid = td->td_proc->p_pid; - else - ps->ps_pid = -1; + ps->ps_pid = -1; + ps->ps_tid = -1; + if ((td = curthread) != NULL) { + ps->ps_tid = td->td_tid; + if (td->td_proc) + ps->ps_pid = td->td_proc->p_pid; + } ps->ps_cpu = cpu; ps->ps_td = td; ps->ps_flags = inuserspace ? PMC_CC_F_USERSPACE : 0; From owner-svn-src-head@freebsd.org Wed May 23 17:55:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91C51EAAC76; Wed, 23 May 2018 17:55:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2822E7634D; Wed, 23 May 2018 17:55:31 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EED09261B3; Wed, 23 May 2018 17:55:30 +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 w4NHtULN077680; Wed, 23 May 2018 17:55:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NHtUgw077679; Wed, 23 May 2018 17:55:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805231755.w4NHtUgw077679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 May 2018 17:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334111 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 334111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 17:55:31 -0000 Author: kib Date: Wed May 23 17:55:30 2018 New Revision: 334111 URL: https://svnweb.freebsd.org/changeset/base/334111 Log: Note that PT_SETSTEP is auto-cleared. Wording and reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D15054 Modified: head/lib/libc/sys/ptrace.2 Modified: head/lib/libc/sys/ptrace.2 ============================================================================== --- head/lib/libc/sys/ptrace.2 Wed May 23 17:44:29 2018 (r334110) +++ head/lib/libc/sys/ptrace.2 Wed May 23 17:55:30 2018 (r334111) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd December 1, 2017 +.Dd May 22, 2018 .Dt PTRACE 2 .Os .Sh NAME @@ -606,6 +606,7 @@ The return value from is the count of array entries filled in. .It Dv PT_SETSTEP This request will turn on single stepping of the specified process. +Stepping is automatically disabled when a single step trap is caught. .It Dv PT_CLEARSTEP This request will turn off single stepping of the specified process. .It Dv PT_SUSPEND From owner-svn-src-head@freebsd.org Wed May 23 18:04:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7543AEAAF34; Wed, 23 May 2018 18:04:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E28697688B; Wed, 23 May 2018 18:04:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w4NHfHhj083980 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 May 2018 10:41:17 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w4NHfHfr083979; Wed, 23 May 2018 10:41:17 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 23 May 2018 10:41:17 -0700 From: Gleb Smirnoff To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share Message-ID: <20180523174117.GO71675@FreeBSD.org> References: <201805082114.w48LETM3060105@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201805082114.w48LETM3060105@repo.freebsd.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:04:52 -0000 On Tue, May 08, 2018 at 09:14:29PM +0000, Sean Bruno wrote: S> Log: S> nxge(4): S> Remove nxge(4) and associated man page and tools in FreeBSD 12.0. ... S> +20180508: S> + The nxge(4) driver has been removed. This driver was for PCI-X 10g S> + cards made by s2io/Neterion. The company was aquired by Exar and S> + no longer sells or supports Ethernet products. If you have device S> + nxge in your kernel config file it must be removed. S> + If end of sales and support is enough to remove 10g driver from the kernel, can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the kernel? -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Wed May 23 18:05:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C115EAAF97 for ; Wed, 23 May 2018 18:05:34 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83ED1769DD for ; Wed, 23 May 2018 18:05:33 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: dda8b9c0-5eb3-11e8-9855-9df12b06b3a9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id dda8b9c0-5eb3-11e8-9855-9df12b06b3a9; Wed, 23 May 2018 18:05:25 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w4NI5OgS001398; Wed, 23 May 2018 12:05:24 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1527098724.32688.118.camel@freebsd.org> Subject: Re: svn commit: r334074 - head/sys/sys From: Ian Lepore To: John Baldwin , Matt Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 23 May 2018 12:05:24 -0600 In-Reply-To: <2320762.5cWPj1u675@ralph.baldwin.cx> References: <201805230615.w4N6FtiS022201@repo.freebsd.org> <2320762.5cWPj1u675@ralph.baldwin.cx> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:05:34 -0000 On Wed, 2018-05-23 at 09:43 -0700, John Baldwin wrote: > On Wednesday, May 23, 2018 06:15:55 AM Matt Macy wrote: > > > > Author: mmacy > > Date: Wed May 23 06:15:55 2018 > > New Revision: 334074 > > URL: https://svnweb.freebsd.org/changeset/base/334074 > > > > Log: > >   Bump FreeBSD_version after r333813 > > > > Modified: > >   head/sys/sys/param.h > FYI, these values are documented in > head/en_US.ISO8859-1/books/porters-handbook/versions/chapter.xml in > the doc > repository. > Well, they're supposed to be. Does anybody ever actually do that? I think it would be more likely to happen if you didn't have to get intimate with xml code to add a simple note to a file. -- Ian From owner-svn-src-head@freebsd.org Wed May 23 18:08:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FEDAEAB11A; Wed, 23 May 2018 18:08:43 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B92F076C5D; Wed, 23 May 2018 18:08:42 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 95A4AB89; Wed, 23 May 2018 13:08:41 -0500 (CDT) Date: Wed, 23 May 2018 13:08:40 -0500 From: Mark Linimon To: Gleb Smirnoff Cc: Sean Bruno , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share Message-ID: <20180523180840.GA27444@lonesome.com> References: <201805082114.w48LETM3060105@repo.freebsd.org> <20180523174117.GO71675@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180523174117.GO71675@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:08:43 -0000 On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: > If end of sales and support is enough to remove 10g driver from the kernel, > can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the kernel? Depends on how many existing users we want to screw over. Not everyone replaces all their hardware every 2 years, folks. The difference is that the Exar chips failed in the marketplace; very few seem to have made it out into the wild. Given, 10Mbit-only things are way past their sell-by date. mcl From owner-svn-src-head@freebsd.org Wed May 23 18:10:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7A18EAB3E2; Wed, 23 May 2018 18:10:57 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B754A76EF0; Wed, 23 May 2018 18:10:57 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id D0184B89; Wed, 23 May 2018 13:10:56 -0500 (CDT) Date: Wed, 23 May 2018 13:10:55 -0500 From: Mark Linimon To: Ian Lepore Cc: John Baldwin , Matt Macy , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r334074 - head/sys/sys Message-ID: <20180523181055.GB27444@lonesome.com> References: <201805230615.w4N6FtiS022201@repo.freebsd.org> <2320762.5cWPj1u675@ralph.baldwin.cx> <1527098724.32688.118.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527098724.32688.118.camel@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:10:58 -0000 On Wed, May 23, 2018 at 12:05:24PM -0600, Ian Lepore wrote: > Well, they're supposed to be. >From my own experience, they are often not. > I think it would be more likely to happen if you didn't have to get > intimate with xml code to add a simple note to a file. It's cut-and-paste. Or, it's easy enough to ask a doc committer to build-test it for you. /me off to update his build tree mcl From owner-svn-src-head@freebsd.org Wed May 23 18:15:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAE52EAB955; Wed, 23 May 2018 18:15:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 560D4773A7; Wed, 23 May 2018 18:15:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4NIExQC036363; Wed, 23 May 2018 11:14:59 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4NIExZ9036362; Wed, 23 May 2018 11:14:59 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805231814.w4NIExZ9036362@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share In-Reply-To: <20180523180840.GA27444@lonesome.com> To: Mark Linimon Date: Wed, 23 May 2018 11:14:59 -0700 (PDT) CC: Gleb Smirnoff , Sean Bruno , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:15:04 -0000 > On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: > > If end of sales and support is enough to remove 10g driver from the kernel, > > can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the kernel? > > Depends on how many existing users we want to screw over. Not everyone > replaces all their hardware every 2 years, folks. And some of us buy 2 year old hardware because it is cheap, and serves our needs just fine. Even 8 year old servers make usable machines today. > The difference is that the Exar chips failed in the marketplace; very > few seem to have made it out into the wild. > > Given, 10Mbit-only things are way past their sell-by date. Do we even have any 10Mbit only drivers? I think that all the 10mbit drivers also support 100mbit devices, but maybe there are some odd cases I cant remeber. I do agree that we need to be very carefull about killing "dead wood", and have advocated proper notice as a first order to helping with that. I think we also need to be able to back track if we find we have made a mistake. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed May 23 18:20:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8A47EABB56; Wed, 23 May 2018 18:20:11 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63092776B7; Wed, 23 May 2018 18:20:11 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id A99945A9F12; Wed, 23 May 2018 18:20:10 +0000 (UTC) Date: Wed, 23 May 2018 18:20:10 +0000 From: Brooks Davis To: Gleb Smirnoff Cc: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share Message-ID: <20180523182010.GB58848@spindle.one-eyed-alien.net> References: <201805082114.w48LETM3060105@repo.freebsd.org> <20180523174117.GO71675@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Yylu36WmvOXNoKYn" Content-Disposition: inline In-Reply-To: <20180523174117.GO71675@FreeBSD.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:20:11 -0000 --Yylu36WmvOXNoKYn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: > On Tue, May 08, 2018 at 09:14:29PM +0000, Sean Bruno wrote: > S> Log: > S> nxge(4): > S> Remove nxge(4) and associated man page and tools in FreeBSD 12.0. > ... > S> +20180508: > S> + The nxge(4) driver has been removed. This driver was for PCI-X 10g > S> + cards made by s2io/Neterion. The company was aquired by Exar and > S> + no longer sells or supports Ethernet products. If you have device > S> + nxge in your kernel config file it must be removed. > S> + >=20 > If end of sales and support is enough to remove 10g driver from the kerne= l, > can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the ke= rnel? It's probably a good idea to add deprecation notices for them now and merge for 11 to find out which ones still have users. Someone on IRC mentioned that FreeNAS removed them and ended up restoring one, but I don't remember which one it was. My gut feeling is that we're a bit late in the game for doing a mass removal for 12, but we should definitely do so for 13. -- Brooks --Yylu36WmvOXNoKYn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbBbDZAAoJEKzQXbSebgfACGsIAIr/kurIjJj7FeYTDC7ySqoq zzMVHVEbwrJ3nRS6OZA21FX2JRky0bs1vGTXb2VrgxGZdjo7/gHcqXIusBZjMYjo Cm2+LLSdCCfhCVKVe1OEdBXzbmovWjlDCaRdiy1zjStt8qdIA9P7ZMv6IVPbaVvQ 8wkaO3QFGsQ/rRtzlv46gp6jOHaVpdXgt3jryt5sbQ4owaQAeL0QUY9Bwkl7jPd2 nIErjP+eRPOtTwZ8ZY7VWrdAuu9MSYzCvGPOvD+CgVMe+QOslwFAz5kglTdg0EUJ A1qdm6POA0zPxKzjLJ7rThZq9mot+md6gf7sqEwiycLr5xbjfirY7DDKZrgibpY= =6J1i -----END PGP SIGNATURE----- --Yylu36WmvOXNoKYn-- From owner-svn-src-head@freebsd.org Wed May 23 18:34:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70BA5EAD087; Wed, 23 May 2018 18:34:21 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (unknown [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E23997806B; Wed, 23 May 2018 18:34:20 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w4NIYCet006964 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 May 2018 20:34:13 +0200 (CEST) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: rgrimes@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w4NIY5ru076701 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 24 May 2018 01:34:05 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share To: rgrimes@freebsd.org, Mark Linimon References: <201805231814.w4NIExZ9036362@pdx.rh.CN85.dnsmgr.net> Cc: Gleb Smirnoff , Sean Bruno , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Eugene Grosbein Message-ID: <5B05B419.2070709@grosbein.net> Date: Thu, 24 May 2018 01:34:01 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201805231814.w4NIExZ9036362@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -0.0 SPF_PASS SPF: sender matches SPF record * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:34:21 -0000 24.05.2018 1:14, Rodney W. Grimes wrote: >> On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: >>> If end of sales and support is enough to remove 10g driver from the kernel, >>> can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the kernel? >> >> Depends on how many existing users we want to screw over. Not everyone >> replaces all their hardware every 2 years, folks. > > And some of us buy 2 year old hardware because it is cheap, > and serves our needs just fine. Even 8 year old servers > make usable machines today. My home router runs 11.1-STABLE/i386 using PC-104 form factor system from the year 2007 having AMD Geode processor not capable of 64 bit mode, RAM maxed at 1GB (2x512MB DIMMs), UDMA100 IDE/PATA controller and two 100Mbit vr(4) vlan-capable network interfaces. It can route/nat PPPoE connection at 100M wire speed, performs IPSEC at 33Mbit/s using cryptodev/onboard AES accelerator while acting as WiFi access point same time using multi-AP capable AR5212 ath(4) miniPCI (not miniPCI-E) card. And I love FreeBSD for that. From owner-svn-src-head@freebsd.org Wed May 23 18:36:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EFCFEAD191 for ; Wed, 23 May 2018 18:36:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98BE47825F for ; Wed, 23 May 2018 18:36:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x241.google.com with SMTP id 144-v6so5659610iti.5 for ; Wed, 23 May 2018 11:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rSKrv3eOtF7uU2fiK8R5EMtKtJQ0YaET2nTdmhHJ72c=; b=xV4PyGr38EJ+DqHdM4PTQjGgm/TToW6kd+XIAp/FOHkedpJFlQD/0n+mAQj8Mf5OO8 SuL801Lp/4lmI+2KW0o1a92i2fbThuSd8ZjJK2Mo3KewoxUXUXg185IUugA4VIoVmwcy retBcG5IhkUQ/cXZKanHp5+jlKnE7xaU1OmHrPbK6jORJhcG0ysk6ic4ruZ4kvdVFQ8O EArZP7ElHOxELbqYhYmge6syesLmif9vftp0+flSBL8p7JHCcTL3Dw3lEpCvrgtHdAWO lsdRDkNCyaDyjR8YZD5I/SwRuOXiuV1qN6wXMZhsRGPeSXFRu68SziJp/VapgCrjDcTl gDdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rSKrv3eOtF7uU2fiK8R5EMtKtJQ0YaET2nTdmhHJ72c=; b=Q+VUh4rvDmKrEB9B31aQxuNydpsd5wGiV5vKzTp/EsXr2/JIFbw4tQnYU8LDyZHuC7 cR32HXQ57/phZETyMI6zKJfvJsH07A3U/0JKvFDbbCmB8qI73Ro3KOBwowhUVq7H5/4S JnTpljphImyqgEEUEqmRPxGxXMoujAvtptzbq8CfDMuqjgDjuLkGRoYXdxNu8bXYGr0p Otm4vgxA6DQBCmEenlu6nbM+pHC2vteLFc1jPJu5H3+hTlh6ijHVTM6yymG76ZIprfan gqfd2YHL5wrS1u2zNZBe6t9po1VnA7pZ282sN5OhYveMV5jO/nBpbpva1PypZrmV4FG/ N4Og== X-Gm-Message-State: ALKqPwdD+WXfT5dFnTaGs2NU+uFA0mo2L8CjgXXc6ahI18nbUWUiRFvm WItEOZ6fzWwwivxbLC+7QCEcLNMQzA8A4CDb1LzEPQ== X-Google-Smtp-Source: AB8JxZp+4AFSpLuw5CF/lAmYV+nvjfm3OM5X8UWJUEJpYxrSGnrcePQES2leDYlKLZcEwvKmO/dlf5SB5pTSC57kVak= X-Received: by 2002:a24:4c55:: with SMTP id a82-v6mr6123730itb.1.1527100606877; Wed, 23 May 2018 11:36:46 -0700 (PDT) MIME-Version: 1.0 References: <201805082114.w48LETM3060105@repo.freebsd.org> <20180523174117.GO71675@FreeBSD.org> <20180523182010.GB58848@spindle.one-eyed-alien.net> In-Reply-To: <20180523182010.GB58848@spindle.one-eyed-alien.net> From: Warner Losh Date: Wed, 23 May 2018 12:36:35 -0600 Message-ID: Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share To: Brooks Davis Cc: Gleb Smirnoff , Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:36:48 -0000 On Wed, May 23, 2018, 12:20 PM Brooks Davis wrote: > On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: > > On Tue, May 08, 2018 at 09:14:29PM +0000, Sean Bruno wrote: > > S> Log: > > S> nxge(4): > > S> Remove nxge(4) and associated man page and tools in FreeBSD 12.0. > > ... > > S> +20180508: > > S> + The nxge(4) driver has been removed. This driver was for PCI-X 10g > > S> + cards made by s2io/Neterion. The company was aquired by Exar and > > S> + no longer sells or supports Ethernet products. If you have device > > S> + nxge in your kernel config file it must be removed. > > S> + > > > > If end of sales and support is enough to remove 10g driver from the > kernel, > > can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the > kernel? > > It's probably a good idea to add deprecation notices for them now and > merge for 11 to find out which ones still have users. Someone on IRC > mentioned that FreeNAS removed them and ended up restoring one, but I > don't remember which one it was. > > My gut feeling is that we're a bit late in the game for doing a mass > removal for 12, but we should definitely do so for 13. > I'd planned on doing exactly this. There are also really old CAM drivers that need to go so we can c lookean up other things... I'd also planned on putting gone in 13 for pc card and cardbus stuff, which is what's gating some nic drivers leaving... Warner > From owner-svn-src-head@freebsd.org Wed May 23 18:38:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A383EAD27A; Wed, 23 May 2018 18:38:18 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C20C178418; Wed, 23 May 2018 18:38:17 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 3B84B71E; Wed, 23 May 2018 13:38:16 -0500 (CDT) Date: Wed, 23 May 2018 13:38:15 -0500 From: Mark Linimon To: rgrimes@freebsd.org Cc: Gleb Smirnoff , Sean Bruno , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share Message-ID: <20180523183815.GA27571@lonesome.com> References: <20180523180840.GA27444@lonesome.com> <201805231814.w4NIExZ9036362@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201805231814.w4NIExZ9036362@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:38:18 -0000 On Wed, May 23, 2018 at 11:14:59AM -0700, Rodney W. Grimes wrote: > And some of us buy 2 year old hardware because it is cheap, Some of us don't have that kind of budget anymore. mcl From owner-svn-src-head@freebsd.org Wed May 23 18:40:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 597E3EAD410; Wed, 23 May 2018 18:40:26 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2DA17872C; Wed, 23 May 2018 18:40:25 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 41F2A71E; Wed, 23 May 2018 13:40:25 -0500 (CDT) Date: Wed, 23 May 2018 13:40:24 -0500 From: Mark Linimon To: Matthew Macy Cc: John Baldwin , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r334074 - head/sys/sys Message-ID: <20180523184023.GB27571@lonesome.com> References: <201805230615.w4N6FtiS022201@repo.freebsd.org> <2320762.5cWPj1u675@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:40:26 -0000 On Wed, May 23, 2018 at 09:56:00AM -0700, Matthew Macy wrote: > Thanks updated for 1200064. Someone(tm) needs to do 1200063. done. mcl From owner-svn-src-head@freebsd.org Wed May 23 18:43:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47792EAD7A3; Wed, 23 May 2018 18:43:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EBD2478C1B; Wed, 23 May 2018 18:43:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id B4853A0BB; Wed, 23 May 2018 18:43:41 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334073 - head Date: Wed, 23 May 2018 09:27 -0700 Message-ID: <3609973.viVQJQYxmB@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201805230409.w4N491iB057004@repo.freebsd.org> References: <201805230409.w4N491iB057004@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:43:42 -0000 On Wednesday, May 23, 2018 04:09:01 AM Eitan Adler wrote: > Author: eadler > Date: Wed May 23 04:09:01 2018 > New Revision: 334073 > URL: https://svnweb.freebsd.org/changeset/base/334073 > > Log: > README: Reduce the textdump; describe the project > > Rework the README to make it a little easier for new users. This is the > first file many will see when persuing the FreeBSD source code so > > - remove some of the text describes how to build. This is better covered > in the linked documentation. > - add a small blurb for what FreeBSD is. Some users might find this > document through features such as github search so they may not even > know what the project is > > generally, gear this file for the new, accidental, or casual user rather > than towards someone seeking fuller documentation. > > Modified: > head/README > head/README.md > > Modified: head/README > ============================================================================== > --- head/README Wed May 23 03:41:22 2018 (r334072) > +++ head/README Wed May 23 04:09:01 2018 (r334073) > @@ -2,35 +2,25 @@ This is the top level of the FreeBSD source directory. > - > -The kernel configuration files reside in the sys//conf > -sub-directory. GENERIC is the default configuration used in release builds. > -NOTES contains entries and documentation for all possible > -devices, not just those commonly used. I do think this paragraph is still useful as part of the Source Roadmap and not really part of the build instructions. > - > - > Source Roadmap: > --------------- > > @@ -69,6 +59,8 @@ share Shared resources. > stand Boot loader sources. > > sys Kernel sources. > + > +sys//conf Kernel configuration file > > tests Regression tests which can be run by Kyua. See tests/README > for additional information. > -- John Baldwin From owner-svn-src-head@freebsd.org Wed May 23 18:44:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95865EAD876; Wed, 23 May 2018 18:44:31 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout12.t-online.de (mailout12.t-online.de [194.25.134.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1EE8578DBD; Wed, 23 May 2018 18:44:30 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd34.aul.t-online.de (fwd34.aul.t-online.de [172.20.26.145]) by mailout12.t-online.de (Postfix) with SMTP id 60C1441E0636; Wed, 23 May 2018 20:44:23 +0200 (CEST) Received: from Stefans-MBP-10.fritz.box (VUq7J+ZQZh1HBNqyA7FcYcshNhuF907asc9OPpHjmXYs-Ut85ZzU5QLQ5PM2BIZwQv@[84.154.105.176]) by fwd34.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1fLYkI-3pcSGG0; Wed, 23 May 2018 20:44:22 +0200 Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share To: rgrimes@freebsd.org, Mark Linimon Cc: Gleb Smirnoff , Sean Bruno , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201805231814.w4NIExZ9036362@pdx.rh.CN85.dnsmgr.net> From: Stefan Esser Openpgp: preference=signencrypt Autocrypt: addr=se@freebsd.org; prefer-encrypt=mutual; keydata= xsBNBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAHNKVN0ZWZhbiBFw59lciAoWWFob28hKSA8c3QuZXNzZXJAeWFob28uZGU+wsCWBBMBCgBA AhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AWIQSjceplnAvsyCtxUxNH67XvWv31RAUC WvLvqwUJCyUBEwAKCRBH67XvWv31REySCACc6vqcSFQCRyBRc2CV5ZBjbbnTy7VBoXbUS3/c 4Hn8I0YQ39q7//2z8vYsgLeM1mMXL4PUIU/0f0dBAFBLpxV7bntGzyCJls6SeGS/qcQKhqaI 6I7NcWg8OkIJIhUL6q238cS1ql9pU65fyHe0PP8JS08m81PDpX2/4wTE6h2jgYUy55eXRzoF MEjr1S8SSnidsBem27o7iWu9ltJsUtE86071iZlLzbuHv2nvucrjAV9cK9tHrxYT/YiY8QhT L48iWj2xIjLjg1ebmgIFZ2k881we/KTIoUugqOOR1gDSc4qwM8CA388cN3frjtl98CwhAT5T UV8tIDqri+/Z1AKwzsBNBFVxiRIBCACxI/aglzGVbnI6XHd0MTP05VK/fJub4hHdc+LQpz1M kVnCAhFbY9oecTB/togdKtfiloavjbFrb0nJhJnx57K+3SdSuu+znaQ4SlWiZOtXnkbpRWNU eMm+gtTDMSvloGAfr76RtFHskdDOLgXsHD70bKuMhlBxUCrSwGzHaD00q8iQPhJZ5itb3WPq z3B4IjiDAWTO2obD1wtAvSuHuUj/XJRsiKDKW3x13cfavkad81bZW4cpNwUv8XHLv/vaZPSA ly+hkY7NrDZydMMXVNQ7AJQufWuTJ0q7sImRcEZ5EIa98esJPey4O7C0vY405wjeyxpVZkpq ThDMurqtQFn1ABEBAAHCwHwEGAEKACYCGwwWIQSjceplnAvsyCtxUxNH67XvWv31RAUCWvLv qwUJCyUBGQAKCRBH67XvWv31RLnrB/9gzcRlpx71sDMosoZULWn7wysBJ/8AIEfIByRaHQe3 pn/KwE57pB+zFbbQqB7YzeZb7/UUgR4zU2ZbOcEfwDZcHUbj0B3fGRsS3t0uiLlAd8w0sBZb SxrqzjdpDjIbOZkxssqUmvrsN67UG1AFWH9aD24keBS7YjPBS8hLxPeYV+Xz6vUL8fRZje/Z JgiBMIwyj6g2lH/zkdnxBdC0iG1xxJOLTaghMMeQyCdH6ef8+VMyAlAJsMckbOTvx63tY8z7 DFcrnTJfbe1EziRilVsEaK8tTzJzhcTfos+f3eBYWEilxe5HzIhYKJeC7lmsSUcGwa6+9VRg a0ctmi9Z8OgX Message-ID: <034afbd6-a83a-b753-15fa-5f42eba24b51@freebsd.org> Date: Wed, 23 May 2018 20:44:21 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201805231814.w4NIExZ9036362@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=windows-1252 Content-Language: de-CH Content-Transfer-Encoding: 7bit X-ID: VUq7J+ZQZh1HBNqyA7FcYcshNhuF907asc9OPpHjmXYs-Ut85ZzU5QLQ5PM2BIZwQv X-TOI-MSGID: 3ced9206-f357-4cf0-ad0a-f3ddda947beb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 18:44:31 -0000 Am 23.05.18 um 20:14 schrieb Rodney W. Grimes: >> On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: >>> If end of sales and support is enough to remove 10g driver from the kernel, >>> can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the kernel? >> >> Depends on how many existing users we want to screw over. Not everyone >> replaces all their hardware every 2 years, folks. > > And some of us buy 2 year old hardware because it is cheap, > and serves our needs just fine. Even 8 year old servers > make usable machines today. > >> The difference is that the Exar chips failed in the marketplace; very >> few seem to have made it out into the wild. >> >> Given, 10Mbit-only things are way past their sell-by date. > > Do we even have any 10Mbit only drivers? I think that all the > 10mbit drivers also support 100mbit devices, but maybe there > are some odd cases I cant remeber. AFAIK and FWIW: ed(4), le(4) on amd64 and on i386 (ISA and PCI) ex(4), ep(4) on i386 (ISA and PCcard) Regards, STefan From owner-svn-src-head@freebsd.org Wed May 23 19:05:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAF84EADEE3 for ; Wed, 23 May 2018 19:05:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AF1579717 for ; Wed, 23 May 2018 19:05:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22e.google.com with SMTP id d10-v6so5221335itj.1 for ; Wed, 23 May 2018 12:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9t2y9g3scykxphDyHEISqe1jOh0HWV2nKocF54uZjVc=; b=OzsNLjPAeAgTvzr0oTX8lW+ykm22WbeV5H0Tfz2O4c7RmM4usrxRE9IjyxvUS2HoWZ GiMdXq26A18R5de8QXQvMrGmZEEkNTbNMQ+rblNUX7QcpsT1W6kzZSUstqO++Nqiep2R bhxLUCdYWf/4d8UhrfA9+fwJd5hTIJpG5jJxZ8Cpi7IImXbUDbVoBv4uJPl1u1h324El SCfDFuSQYQY/nZbg0VgChxM+QJLGMJ+DPtZXfNESm53ql0An3ZTQQbV8vwF+RJMdN4Lt UJlXGftGB2n35gDHF1hkFjMyDtFVlaub4iF5eNEGGkOa2AqvPH9nwDFRiVq3SbHN+YD5 sB+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9t2y9g3scykxphDyHEISqe1jOh0HWV2nKocF54uZjVc=; b=kfP76H/5wnFeFT1NB9SuFi7JzaV3SmCvEiLuMg7BKCYaBxycuJ1KLE8gevSYFsqH4W 84zM6Q5qXs3giB5LusvnpsqtSFl26hWr+OVue+SxMbpGNud8uqCutAFw0ZeQB8zH5sLV 5QG8b0JStg1L0u+gYsM1BbYEPsE9DdX+e6HyhS3/yfRS71ma1yMJhSrPI4ZtB6U0OJ83 QBM/uKn3TiSb7iZwCP+dlNYJa0yMQHwChdiUc6xxfzNlsPnxDvaaRwYZgOFqahbhLK6/ 1ImlwTxZ1/B5ZfyRsuGzRQAJjgzE+ig0jm58+RNWZc+chQ3ujbp/IEBxdzSiMhlNdb2r Gtog== X-Gm-Message-State: ALKqPwcM3PDRhwPRyl1UahUOB1doxqIW9170LWA4aXf4600FStBHA1dj VoAafT5eXgRb+8+b9YKiSlYb7njdDy+Q4UY6zsvDAA== X-Google-Smtp-Source: ADUXVKK9yexOq4untvDnzdDiATkOvFhHt4mIFYSZ+3fuxk3cnVgTL1gVB2MtxnZ24p+g36URYW/bI9/TWLPMuRPzApg= X-Received: by 2002:a24:4388:: with SMTP id s130-v6mr6517879itb.51.1527102301546; Wed, 23 May 2018 12:05:01 -0700 (PDT) MIME-Version: 1.0 References: <201805231814.w4NIExZ9036362@pdx.rh.CN85.dnsmgr.net> <034afbd6-a83a-b753-15fa-5f42eba24b51@freebsd.org> In-Reply-To: <034afbd6-a83a-b753-15fa-5f42eba24b51@freebsd.org> From: Warner Losh Date: Wed, 23 May 2018 13:04:49 -0600 Message-ID: Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share To: Stefan Esser Cc: "Rodney W. Grimes" , Mark Linimon , Gleb Smirnoff , Sean Bruno , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:05:03 -0000 On Wed, May 23, 2018, 12:44 PM Stefan Esser wrote: > Am 23.05.18 um 20:14 schrieb Rodney W. Grimes: > >> On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: > >>> If end of sales and support is enough to remove 10g driver from the > kernel, > >>> can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the > kernel? > >> > >> Depends on how many existing users we want to screw over. Not everyone > >> replaces all their hardware every 2 years, folks. > > > > And some of us buy 2 year old hardware because it is cheap, > > and serves our needs just fine. Even 8 year old servers > > make usable machines today. > > > >> The difference is that the Exar chips failed in the marketplace; very > >> few seem to have made it out into the wild. > >> > >> Given, 10Mbit-only things are way past their sell-by date. > > > > Do we even have any 10Mbit only drivers? I think that all the > > 10mbit drivers also support 100mbit devices, but maybe there > > are some odd cases I cant remeber. > > AFAIK and FWIW: > > ed(4), le(4) on amd64 and on i386 (ISA and PCI) > ex(4), ep(4) on i386 (ISA and PCcard) > My plans are to retire PC Card and these drivers in 13. Machines that have this hardware still run 12 OK. Packages make them upgradable still, but its clear the hand writing is on the wall. Ed and ep also support 100M, but are unable to do line rate. Warner Warner > From owner-svn-src-head@freebsd.org Wed May 23 19:07:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE896EADFFB; Wed, 23 May 2018 19:07:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B86D798A3; Wed, 23 May 2018 19:07:05 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DD3126D63; Wed, 23 May 2018 19:07:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NJ75CO013730; Wed, 23 May 2018 19:07:05 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NJ74KD013723; Wed, 23 May 2018 19:07:04 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201805231907.w4NJ74KD013723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 23 May 2018 19:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334112 - in head/sys: arm64/rockchip/clk conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm64/rockchip/clk conf X-SVN-Commit-Revision: 334112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:07:05 -0000 Author: manu Date: Wed May 23 19:07:03 2018 New Revision: 334112 URL: https://svnweb.freebsd.org/changeset/base/334112 Log: arm64: rockchip: Add proper armclock support The core clock (armclk) on RockChip SoC is special. It can derive it's clock from many PLLs but RockChip recommand to do it from "apll" on old SoC and "npll" on new SoC. The reason for choosing npll is that it's have less jitter and is more close to the arm core on the SoC. r333314 added the core clock as a composite clock but due to it's specials property we need to deal with it differently. A new rk_clk_armclk type is added for this and it supports only the "npll" as we don't run on old RockChip SoC that only have the "apll". It will always reparent to "npll" and set the frequency according to a rate table that is known to be good. For now we set the "npll" to the desired frequency and just set the core clk divider to 1 as its parent it just used for the core clk. Added: head/sys/arm64/rockchip/clk/rk_clk_armclk.c (contents, props changed) head/sys/arm64/rockchip/clk/rk_clk_armclk.h (contents, props changed) Modified: head/sys/arm64/rockchip/clk/rk3328_cru.c head/sys/arm64/rockchip/clk/rk_cru.c head/sys/arm64/rockchip/clk/rk_cru.h head/sys/conf/files.arm64 Modified: head/sys/arm64/rockchip/clk/rk3328_cru.c ============================================================================== --- head/sys/arm64/rockchip/clk/rk3328_cru.c Wed May 23 17:55:30 2018 (r334111) +++ head/sys/arm64/rockchip/clk/rk3328_cru.c Wed May 23 19:07:03 2018 (r334112) @@ -593,9 +593,60 @@ static struct rk_clk_composite_def aclk_bus_pre = { .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, }; +static struct rk_clk_armclk_rates rk3328_armclk_rates[] = { + { + .freq = 1296000000, + .div = 1, + }, + { + .freq = 1200000000, + .div = 1, + }, + { + .freq = 1104000000, + .div = 1, + }, + { + .freq = 1008000000, + .div = 1, + }, + { + .freq = 912000000, + .div = 1, + }, + { + .freq = 816000000, + .div = 1, + }, + { + .freq = 696000000, + .div = 1, + }, + { + .freq = 600000000, + .div = 1, + }, + { + .freq = 408000000, + .div = 1, + }, + { + .freq = 312000000, + .div = 1, + }, + { + .freq = 216000000, + .div = 1, + }, + { + .freq = 96000000, + .div = 1, + }, +}; + #define ARMCLK 6 static const char *armclk_parents[] = {"apll", "gpll", "dpll", "npll" }; -static struct rk_clk_composite_def armclk = { +static struct rk_clk_armclk_def armclk = { .clkdef = { .id = ARMCLK, .name = "armclk", @@ -610,6 +661,11 @@ static struct rk_clk_composite_def armclk = { .div_width = 5, .flags = RK_CLK_COMPOSITE_HAVE_MUX, + .main_parent = 3, /* npll */ + .alt_parent = 0, /* apll */ + + .rates = rk3328_armclk_rates, + .nrates = nitems(rk3328_armclk_rates), }; /* CRU_CLKSEL_CON1 */ @@ -825,15 +881,16 @@ static struct rk_clk rk3328_clks[] = { }, { .type = RK_CLK_COMPOSITE, - .clk.composite = &armclk - }, - { - .type = RK_CLK_COMPOSITE, .clk.composite = &hclk_bus_pre }, { .type = RK_CLK_COMPOSITE, .clk.composite = &pclk_bus_pre + }, + + { + .type = RK_CLK_ARMCLK, + .clk.armclk = &armclk, }, { Added: head/sys/arm64/rockchip/clk/rk_clk_armclk.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/rockchip/clk/rk_clk_armclk.c Wed May 23 19:07:03 2018 (r334112) @@ -0,0 +1,237 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +#include + +#include "clkdev_if.h" + +struct rk_clk_armclk_sc { + uint32_t muxdiv_offset; + uint32_t mux_shift; + uint32_t mux_width; + uint32_t mux_mask; + + uint32_t div_shift; + uint32_t div_width; + uint32_t div_mask; + + uint32_t gate_offset; + uint32_t gate_shift; + + uint32_t flags; + + uint32_t main_parent; + uint32_t alt_parent; + + struct rk_clk_armclk_rates *rates; + int nrates; +}; + +#define WRITE4(_clk, off, val) \ + CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) +#define READ4(_clk, off, val) \ + CLKDEV_READ_4(clknode_get_device(_clk), off, val) +#define DEVICE_LOCK(_clk) \ + CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) +#define DEVICE_UNLOCK(_clk) \ + CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk)) + +#define RK_ARMCLK_WRITE_MASK 0xFFFF0000 + +static int +rk_clk_armclk_init(struct clknode *clk, device_t dev) +{ + struct rk_clk_armclk_sc *sc; + uint32_t val, idx; + + sc = clknode_get_softc(clk); + + idx = 0; + DEVICE_LOCK(clk); + READ4(clk, sc->muxdiv_offset, &val); + DEVICE_UNLOCK(clk); + + idx = (val & sc->mux_mask) >> sc->mux_shift; + + clknode_init_parent_idx(clk, idx); + + return (0); +} + +static int +rk_clk_armclk_set_mux(struct clknode *clk, int index) +{ + struct rk_clk_armclk_sc *sc; + uint32_t val; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + READ4(clk, sc->muxdiv_offset, &val); + val &= ~(sc->mux_mask >> sc->mux_shift); + val |= index << sc->mux_shift; + WRITE4(clk, sc->muxdiv_offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static int +rk_clk_armclk_recalc(struct clknode *clk, uint64_t *freq) +{ + struct rk_clk_armclk_sc *sc; + uint32_t reg, div; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + + READ4(clk, sc->muxdiv_offset, ®); + + DEVICE_UNLOCK(clk); + + div = ((reg & sc->div_mask) >> sc->div_shift) + 1; + + *freq = *freq / div; + + return (0); +} + +static int +rk_clk_armclk_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, + int flags, int *stop) +{ + struct rk_clk_armclk_sc *sc; + struct clknode *p_main; + const char **p_names; + uint64_t best = 0, best_p = 0; + uint32_t div = 0, val; + int err, i, rate = 0; + + sc = clknode_get_softc(clk); + + p_names = clknode_get_parent_names(clk); + p_main = clknode_find_by_name(p_names[sc->main_parent]); + clknode_set_parent_by_idx(clk, sc->main_parent); + + for (i = 0; i < sc->nrates; i++) { + if (sc->rates[i].freq == *fout) { + best = sc->rates[i].freq; + div = sc->rates[i].div; + best_p = best * (div + 1); + rate = i; + } + } + + if (rate == 0) + return (0); + + err = clknode_set_freq(p_main, best_p, 0, 1); + if (err != 0) + printf("Cannot set %s to %lu\n", + clknode_get_name(p_main), + best_p); + + if ((flags & CLK_SET_DRYRUN) != 0) { + *fout = best; + *stop = 1; + return (0); + } + + DEVICE_LOCK(clk); + READ4(clk, sc->muxdiv_offset, &val); + val &= ~sc->div_mask; + val |= div << sc->div_shift; + WRITE4(clk, sc->muxdiv_offset, val | RK_CLK_ARMCLK_MASK); + DEVICE_UNLOCK(clk); + + *fout = best; + *stop = 1; + + return (0); +} + +static clknode_method_t rk_clk_armclk_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, rk_clk_armclk_init), + CLKNODEMETHOD(clknode_set_mux, rk_clk_armclk_set_mux), + CLKNODEMETHOD(clknode_recalc_freq, rk_clk_armclk_recalc), + CLKNODEMETHOD(clknode_set_freq, rk_clk_armclk_set_freq), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(rk_clk_armclk_clknode, rk_clk_armclk_clknode_class, + rk_clk_armclk_clknode_methods, sizeof(struct rk_clk_armclk_sc), + clknode_class); + +int +rk_clk_armclk_register(struct clkdom *clkdom, struct rk_clk_armclk_def *clkdef) +{ + struct clknode *clk; + struct rk_clk_armclk_sc *sc; + + clk = clknode_create(clkdom, &rk_clk_armclk_clknode_class, + &clkdef->clkdef); + if (clk == NULL) + return (1); + + sc = clknode_get_softc(clk); + + sc->muxdiv_offset = clkdef->muxdiv_offset; + + sc->mux_shift = clkdef->mux_shift; + sc->mux_width = clkdef->mux_width; + sc->mux_mask = ((1 << clkdef->mux_width) - 1) << sc->mux_shift; + + sc->div_shift = clkdef->div_shift; + sc->div_width = clkdef->div_width; + sc->div_mask = ((1 << clkdef->div_width) - 1) << sc->div_shift; + + sc->flags = clkdef->flags; + + sc->main_parent = clkdef->main_parent; + sc->alt_parent = clkdef->alt_parent; + + sc->rates = clkdef->rates; + sc->nrates = clkdef->nrates; + + clknode_register(clkdom, clk); + + return (0); +} Added: head/sys/arm64/rockchip/clk/rk_clk_armclk.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/rockchip/clk/rk_clk_armclk.h Wed May 23 19:07:03 2018 (r334112) @@ -0,0 +1,66 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright 2018 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _RK_CLK_ARMCLK_H_ +#define _RK_CLK_ARMCLK_H_ + +#include + +struct rk_clk_armclk_rates { + uint64_t freq; + uint32_t div; +}; + +struct rk_clk_armclk_def { + struct clknode_init_def clkdef; + + uint32_t muxdiv_offset; + + uint32_t mux_shift; + uint32_t mux_width; + + uint32_t div_shift; + uint32_t div_width; + + uint32_t flags; + + uint32_t main_parent; + uint32_t alt_parent; + + struct rk_clk_armclk_rates *rates; + int nrates; +}; + +#define RK_CLK_ARMCLK_MASK 0xFFFF0000 + +int rk_clk_armclk_register(struct clkdom *clkdom, + struct rk_clk_armclk_def *clkdef); + +#endif /* _RK_CLK_ARMCLK_H_ */ Modified: head/sys/arm64/rockchip/clk/rk_cru.c ============================================================================== --- head/sys/arm64/rockchip/clk/rk_cru.c Wed May 23 17:55:30 2018 (r334111) +++ head/sys/arm64/rockchip/clk/rk_cru.c Wed May 23 19:07:03 2018 (r334112) @@ -230,6 +230,9 @@ rk_cru_attach(device_t dev) case RK_CLK_MUX: rk_clk_mux_register(sc->clkdom, sc->clks[i].clk.mux); break; + case RK_CLK_ARMCLK: + rk_clk_armclk_register(sc->clkdom, sc->clks[i].clk.armclk); + break; default: device_printf(dev, "Unknown clock type\n"); return (ENXIO); Modified: head/sys/arm64/rockchip/clk/rk_cru.h ============================================================================== --- head/sys/arm64/rockchip/clk/rk_cru.h Wed May 23 17:55:30 2018 (r334111) +++ head/sys/arm64/rockchip/clk/rk_cru.h Wed May 23 19:07:03 2018 (r334112) @@ -31,6 +31,7 @@ #ifndef __RK_CRU_H__ #define __RK_CRU_H__ +#include #include #include #include @@ -63,6 +64,7 @@ enum rk_clk_type { RK_CLK_PLL, RK_CLK_COMPOSITE, RK_CLK_MUX, + RK_CLK_ARMCLK, }; struct rk_clk { @@ -71,6 +73,7 @@ struct rk_clk { struct rk_clk_pll_def *pll; struct rk_clk_composite_def *composite; struct rk_clk_mux_def *mux; + struct rk_clk_armclk_def *armclk; } clk; }; @@ -86,6 +89,9 @@ struct rk_cru_softc { int ngates; struct rk_clk *clks; int nclks; + struct rk_clk_armclk_def *armclk; + struct rk_clk_armclk_rates *armclk_rates; + int narmclk_rates; }; DECLARE_CLASS(rk_cru_driver); Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed May 23 17:55:30 2018 (r334111) +++ head/sys/conf/files.arm64 Wed May 23 19:07:03 2018 (r334112) @@ -248,6 +248,7 @@ arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk arm64/rockchip/rk_pinctrl.c optional fdt soc_rockchip_rk3328 arm64/rockchip/rk_gpio.c optional fdt soc_rockchip_rk3328 arm64/rockchip/clk/rk_cru.c optional fdt soc_rockchip_rk3328 +arm64/rockchip/clk/rk_clk_armclk.c optional fdt soc_rockchip_rk3328 arm64/rockchip/clk/rk_clk_composite.c optional fdt soc_rockchip_rk3328 arm64/rockchip/clk/rk_clk_gate.c optional fdt soc_rockchip_rk3328 arm64/rockchip/clk/rk_clk_mux.c optional fdt soc_rockchip_rk3328 From owner-svn-src-head@freebsd.org Wed May 23 19:10:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5526FEAE0D9 for ; Wed, 23 May 2018 19:10:31 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02BD179A28 for ; Wed, 23 May 2018 19:10:31 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yw0-f180.google.com (mail-yw0-f180.google.com [209.85.161.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id BD5C8A2B2 for ; Wed, 23 May 2018 19:10:30 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yw0-f180.google.com with SMTP id h11-v6so6277465ywc.8 for ; Wed, 23 May 2018 12:10:30 -0700 (PDT) X-Gm-Message-State: ALKqPwf1HzGvmipD6k4BwxOfSbUwJKQArBlv8ZhGvPboNMc7Vqdeuzm5 iFCgI/uLiKI8JQXAf412e9TUlEsHJK/rqmiK1A3oZw== X-Google-Smtp-Source: AB8JxZq9FGq3b8HvFeDgZ4IRvvFQbC5jdGwhV8ydNpba0N12xcm5uJ0DsLIlqO4o+Y5yBUFSJDBf/sBcp9jMk80lUGg= X-Received: by 2002:a81:5fc4:: with SMTP id t187-v6mr2272800ywb.19.1527102630229; Wed, 23 May 2018 12:10:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Wed, 23 May 2018 12:09:59 -0700 (PDT) In-Reply-To: <3609973.viVQJQYxmB@ralph.baldwin.cx> References: <201805230409.w4N491iB057004@repo.freebsd.org> <3609973.viVQJQYxmB@ralph.baldwin.cx> From: Eitan Adler Date: Wed, 23 May 2018 12:09:59 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334073 - head To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:10:31 -0000 On 23 May 2018 at 09:27, John Baldwin wrote: > On Wednesday, May 23, 2018 04:09:01 AM Eitan Adler wrote: >> Author: eadler >> Date: Wed May 23 04:09:01 2018 >> New Revision: 334073 >> URL: https://svnweb.freebsd.org/changeset/base/334073 >> >> Log: >> README: Reduce the textdump; describe the project >> >> Rework the README to make it a little easier for new users. This is the >> first file many will see when persuing the FreeBSD source code so >> >> - remove some of the text describes how to build. This is better covered >> in the linked documentation. >> - add a small blurb for what FreeBSD is. Some users might find this >> document through features such as github search so they may not even >> know what the project is >> >> generally, gear this file for the new, accidental, or casual user rather >> than towards someone seeking fuller documentation. >> >> Modified: >> head/README >> head/README.md >> >> Modified: head/README >> ============================================================================== >> --- head/README Wed May 23 03:41:22 2018 (r334072) >> +++ head/README Wed May 23 04:09:01 2018 (r334073) >> @@ -2,35 +2,25 @@ This is the top level of the FreeBSD source directory. >> - >> -The kernel configuration files reside in the sys//conf >> -sub-directory. GENERIC is the default configuration used in release builds. >> -NOTES contains entries and documentation for all possible >> -devices, not just those commonly used. > > I do think this paragraph is still useful as part of the Source Roadmap and > not really part of the build instructions. I added a reference to sys//conf to the bottom of the README.Adding something about NOTES might be helpful, but IMHO closer to the build. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Wed May 23 19:11:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBBACEAE174; Wed, 23 May 2018 19:11:27 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 85A4A79D15; Wed, 23 May 2018 19:11:27 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 4E7A625D3A86; Wed, 23 May 2018 19:11:25 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 81D8FD1F7F0; Wed, 23 May 2018 19:11:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id EhVfMKvEw1CG; Wed, 23 May 2018 19:11:23 +0000 (UTC) Received: from [192.168.124.1] (fresh-ayiya.sbone.de [IPv6:fde9:577b:c1a9:f001::2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A3F51D1F7E8; Wed, 23 May 2018 19:11:22 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Brooks Davis" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share Date: Wed, 23 May 2018 19:11:21 +0000 X-Mailer: MailMate (2.0BETAr6111) Message-ID: <06ACF82E-4072-40B1-9ECF-A0DBDD23A11B@lists.zabbadoz.net> In-Reply-To: <20180523182010.GB58848@spindle.one-eyed-alien.net> References: <201805082114.w48LETM3060105@repo.freebsd.org> <20180523174117.GO71675@FreeBSD.org> <20180523182010.GB58848@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:11:28 -0000 On 23 May 2018, at 18:20, Brooks Davis wrote: > On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: >> On Tue, May 08, 2018 at 09:14:29PM +0000, Sean Bruno wrote: >> S> Log: >> S> nxge(4): >> S> Remove nxge(4) and associated man page and tools in FreeBSD >> 12.0. >> ... >> S> +20180508: >> S> + The nxge(4) driver has been removed. This driver was for PCI-X >> 10g >> S> + cards made by s2io/Neterion. The company was aquired by Exar >> and >> S> + no longer sells or supports Ethernet products. If you have >> device >> S> + nxge in your kernel config file it must be removed. >> S> + >> >> If end of sales and support is enough to remove 10g driver from the >> kernel, >> can we please delete all 10Mbit, 100Mbit 10+ year old drivers from >> the kernel? > > It's probably a good idea to add deprecation notices for them now and > merge for 11 to find out which ones still have users. Someone on IRC > mentioned that FreeNAS removed them and ended up restoring one, but I > don't remember which one it was. > > My gut feeling is that we're a bit late in the game for doing a mass > removal for 12, but we should definitely do so for 13. I’d be very careful. I can still buy a lot of 100Mbit/s cards and you constantly find them on new SoCs still which don’t do Gbit/s. Also there’s a lot of legacy hw floating around for some of them. 12 definitively seems to be too short term. /bz From owner-svn-src-head@freebsd.org Wed May 23 19:16:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2B44EAE42C; Wed, 23 May 2018 19:16:29 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B90CC79FC6; Wed, 23 May 2018 19:16:28 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4NJGNPS036639; Wed, 23 May 2018 12:16:23 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4NJGN9d036638; Wed, 23 May 2018 12:16:23 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805231916.w4NJGN9d036638@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share In-Reply-To: <034afbd6-a83a-b753-15fa-5f42eba24b51@freebsd.org> To: Stefan Esser Date: Wed, 23 May 2018 12:16:23 -0700 (PDT) CC: rgrimes@freebsd.org, Mark Linimon , Gleb Smirnoff , Sean Bruno , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:16:29 -0000 > Am 23.05.18 um 20:14 schrieb Rodney W. Grimes: > >> On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: > >>> If end of sales and support is enough to remove 10g driver from the kernel, > >>> can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the kernel? > >> > >> Depends on how many existing users we want to screw over. Not everyone > >> replaces all their hardware every 2 years, folks. > > > > And some of us buy 2 year old hardware because it is cheap, > > and serves our needs just fine. Even 8 year old servers > > make usable machines today. > > > >> The difference is that the Exar chips failed in the marketplace; very > >> few seem to have made it out into the wild. > >> > >> Given, 10Mbit-only things are way past their sell-by date. > > > > Do we even have any 10Mbit only drivers? I think that all the > > 10mbit drivers also support 100mbit devices, but maybe there > > are some odd cases I cant remeber. > > AFAIK and FWIW: > > ed(4), le(4) on amd64 and on i386 (ISA and PCI) ed(4) has many 100 mbit cards. I recall recently booting something that showed up with an ed0: le(4) has some 100 mbit cards. Mostly supersceded by lnc(4) > ex(4), ep(4) on i386 (ISA and PCcard) These are truely dead, IMHO. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed May 23 19:17:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F840EAE483; Wed, 23 May 2018 19:17:18 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7C77A0F1; Wed, 23 May 2018 19:17:18 +0000 (UTC) (envelope-from luporl@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A73426EF2; Wed, 23 May 2018 19:17:18 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NJHIht018860; Wed, 23 May 2018 19:17:18 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NJHHQL018859; Wed, 23 May 2018 19:17:17 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201805231917.w4NJHHQL018859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Wed, 23 May 2018 19:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334113 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: in head: share/misc usr.bin/calendar/calendars X-SVN-Commit-Revision: 334113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:17:18 -0000 Author: luporl Date: Wed May 23 19:17:17 2018 New Revision: 334113 URL: https://svnweb.freebsd.org/changeset/base/334113 Log: Adding myself to committers-src.dot and calendar.freebsd Approved by: jhibbits (mentor) Modified: head/share/misc/committers-src.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed May 23 19:07:03 2018 (r334112) +++ head/share/misc/committers-src.dot Wed May 23 19:17:17 2018 (r334113) @@ -238,6 +238,7 @@ leitao [label="Breno Leitao\nleitao@FreeBSD.org\n2018/ lidl [label="Kurt Lidl\nlidl@FreeBSD.org\n2015/10/21"] loos [label="Luiz Otavio O Souza\nloos@FreeBSD.org\n2013/07/03"] lstewart [label="Lawrence Stewart\nlstewart@FreeBSD.org\n2008/10/06"] +luporl [label="Leandro Lupori\nluporl@FreeBSD.org\n2018/05/21"] manu [label="Emmanuel Vadot\nmanu@FreeBSD.org\n2016/04/24"] marcel [label="Marcel Moolenaar\nmarcel@FreeBSD.org\n1999/07/03"] marius [label="Marius Strobl\nmarius@FreeBSD.org\n2004/04/17"] @@ -591,6 +592,7 @@ jhb -> rpokala jhb -> arichardson jhibbits -> leitao +jhibbits -> luporl jimharris -> carl @@ -713,6 +715,7 @@ njl -> sepotvin nwhitehorn -> andreast nwhitehorn -> jhibbits nwhitehorn -> leitao +nwhitehorn -> luporl obrien -> benno obrien -> groudier Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Wed May 23 19:07:03 2018 (r334112) +++ head/usr.bin/calendar/calendars/calendar.freebsd Wed May 23 19:17:17 2018 (r334113) @@ -176,6 +176,7 @@ 05/09 Daniel Eischen born in Syracuse, New York, United States, 1963 05/09 Aaron Dalton born in Boise, Idaho, United States, 1973 05/09 Jase Thew born in Abergavenny, Gwent, United Kingdom, 1974 +05/09 Leandro Lupori born in Sao Paulo, Sao Paulo, Brazil, 1983 05/10 Markus Brueffer born in Gronau, Nordrhein-Westfalen, Germany, 1977 05/11 Kurt Lidl born in Rockville, Maryland, United States, 1968 05/11 Jesus Rodriguez born in Barcelona, Spain, 1972 From owner-svn-src-head@freebsd.org Wed May 23 19:30:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 378ABEAED20; Wed, 23 May 2018 19:30:39 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 57B267A851; Wed, 23 May 2018 19:30:38 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id LZSufKRrTSzNNLZSvfwejH; Wed, 23 May 2018 13:30:31 -0600 X-Authority-Analysis: v=2.3 cv=KuxjJ1eN c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=VUJBJC2UJ8kA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=7-wb64_vboOz9cySJ-kA:9 a=MK8dPyvghpYmsHx2:21 a=f3_PpXVscLl_IUfO:21 a=pILNOxqGKmIA:10 a=BgSxtmHFWSR1mRn6:21 a=5QyAWYKhLW3XyETa:21 a=mn-8ZsUBN8L_gf15:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from [192.168.1.110] (S0106002401cb186f.gv.shawcable.net [70.67.125.17]) by spqr.komquats.com (Postfix) with ESMTPSA id 825583BC; Wed, 23 May 2018 12:30:27 -0700 (PDT) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share Date: Wed, 23 May 2018 12:30:26 -0700 To: Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon CC: Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Message-Id: <20180523193027.825583BC@spqr.komquats.com> X-CMAE-Envelope: MS4wfGc+mdqwA+s7NpzXtrM0wWaHBtxSX9cLWlEBdQFYynNyQvaza01dHS+Dyjc3cRJHob4ryXLWEInqKJAcR0c6Hy+Pdbyjd2TB7Rorc97zbnOkU3BMBJOz 3WjV2VlCaCulyMze0fBZ6Lx/kBcCy7OVcTC+2l9ChYDBrqgUPSEnWMNIJwUN6cGwkcxWc20NXQrFM7A1kXc/pD3D4QO7mBonm8upUeIwVvPwAO6UGVUg2E8u qJXSa0W34EGoCsuSqBbdu05gjtQv/qR8IwYfKCeNQp0MWbrK/uOX887lAfrnuXEeQD5OzSHfW2WHVL5HgNQgfpmLIniXXljifB7ZBtajFwNZYO0pmUSn8n32 /MyMinmRMHgV3Gtz95CNaSaoDpQ1LXVrHK2h+zNOgv2Ebrae+fg= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:30:39 -0000 Except for old computers and old software that segfaults on 64-bit, how man= y people still use i386? Full disclosure: I'd like to see i386 deorbited before I retire. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Stefan Esser Sent: 23/05/2018 11:44 To: rgrimes@freebsd.org; Mark Linimon Cc: Gleb Smirnoff; Sean Bruno; svn-src-head@freebsd.org; svn-src-all@freebs= d.org; src-committers@freebsd.org Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/de= v/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools= /tools/nxge usr.sbin/bsdconfig/share Am 23.05.18 um 20:14 schrieb Rodney W. Grimes: >> On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: >>> If end of sales and support is enough to remove 10g driver from the ker= nel, >>> can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the = kernel? >> >> Depends on how many existing users we want to screw over. Not everyone >> replaces all their hardware every 2 years, folks. >=20 > And some of us buy 2 year old hardware because it is cheap, > and serves our needs just fine. Even 8 year old servers > make usable machines today. >=20 >> The difference is that the Exar chips failed in the marketplace; very >> few seem to have made it out into the wild. >> >> Given, 10Mbit-only things are way past their sell-by date. >=20 > Do we even have any 10Mbit only drivers? I think that all the > 10mbit drivers also support 100mbit devices, but maybe there > are some odd cases I cant remeber. AFAIK and FWIW: ed(4), le(4) on amd64 and on i386 (ISA and PCI) ex(4), ep(4) on i386 (ISA and PCcard) Regards, STefan From owner-svn-src-head@freebsd.org Wed May 23 19:43:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A53EEEAF43B; Wed, 23 May 2018 19:43:57 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 511B07B10A; Wed, 23 May 2018 19:43:57 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com [209.85.223.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 11B95A6B8; Wed, 23 May 2018 19:43:57 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f170.google.com with SMTP id o185-v6so1086159iod.0; Wed, 23 May 2018 12:43:57 -0700 (PDT) X-Gm-Message-State: ALKqPwcezvDrKqi62NLqLEA6pv5/FL/FpWeZQ1t4j6p1bDfPqALr/VpA 5XZjCSAQ9bR1QrdqBZCn8RZLBMQey/NqnHYQI2o= X-Google-Smtp-Source: ADUXVKLUX+IGKWyXdzQxvyzJB/T5xDZr1AJUCnfD2WoW8yqQxXWzOXMMIv0+jXoApSDz5UoIw5jHD+VGzmgTZ72dyOM= X-Received: by 2002:a6b:5009:: with SMTP id e9-v6mr3922094iob.5.1527104636416; Wed, 23 May 2018 12:43:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 12:43:56 -0700 (PDT) In-Reply-To: <20180523184023.GB27571@lonesome.com> References: <201805230615.w4N6FtiS022201@repo.freebsd.org> <2320762.5cWPj1u675@ralph.baldwin.cx> <20180523184023.GB27571@lonesome.com> From: Matthew Macy Date: Wed, 23 May 2018 12:43:56 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334074 - head/sys/sys To: Mark Linimon Cc: John Baldwin , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:43:57 -0000 Thanks. On Wed, May 23, 2018 at 11:40 AM, Mark Linimon wrote: > On Wed, May 23, 2018 at 09:56:00AM -0700, Matthew Macy wrote: >> Thanks updated for 1200064. Someone(tm) needs to do 1200063. > > done. > > mcl From owner-svn-src-head@freebsd.org Wed May 23 19:53:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82E1FEAFAA3; Wed, 23 May 2018 19:53:46 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (unknown [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id ED3557B74A; Wed, 23 May 2018 19:53:45 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w4NJrTV5007503 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 May 2018 21:53:29 +0200 (CEST) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: src-committers@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w4NJrKxX077479 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 24 May 2018 02:53:20 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share To: Cy Schubert , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon References: <20180523193027.825583BC@spqr.komquats.com> Cc: Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Eugene Grosbein Message-ID: <5B05C6AC.6010202@grosbein.net> Date: Thu, 24 May 2018 02:53:16 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20180523193027.825583BC@spqr.komquats.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -0.0 SPF_PASS SPF: sender matches SPF record * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:53:46 -0000 24.05.2018 2:30, Cy Schubert wrote: > Except for old computers and old software that segfaults on 64-bit, how many people still use i386? > > Full disclosure: I'd like to see i386 deorbited before I retire. Plese don't. I routinely use FreeBSD11/i386 for cheap VPS hosts having less than 2G memory because amd64 has noticeable overhead. I even have ZFS-only i386 VPS, here is live example with 1G only: Mem: 10M Active, 69M Inact, 230M Wired, 685M Free ARC: 75M Total, 1953K MFU, 31M MRU, 172K Anon, 592K Header, 42M Other 3500K Compressed, 29M Uncompressed, 8.61:1 Ratio Swap: 1024M Total, 1024M Free The VPS has only 20G of disk space and ZFS compression gives compressratio 2.22x for ports, 2.51x for src, 2.29x for obj and 1.95x for installed i386 system plus other software and data. From owner-svn-src-head@freebsd.org Wed May 23 19:55:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 056FAEAFC72; Wed, 23 May 2018 19:55:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEF467B97F; Wed, 23 May 2018 19:55:48 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 902A72757C; Wed, 23 May 2018 19:55:48 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NJtmkp038850; Wed, 23 May 2018 19:55:48 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NJtmna038849; Wed, 23 May 2018 19:55:48 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805231955.w4NJtmna038849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 23 May 2018 19:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334114 - in head: sys/sys usr.sbin/pmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: sys/sys usr.sbin/pmcstat X-SVN-Commit-Revision: 334114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 19:55:49 -0000 Author: mmacy Date: Wed May 23 19:55:47 2018 New Revision: 334114 URL: https://svnweb.freebsd.org/changeset/base/334114 Log: pmc: bump PMC major version to reflect ABI breakage and make warning not require verbose Modified: head/sys/sys/pmc.h head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Wed May 23 19:17:17 2018 (r334113) +++ head/sys/sys/pmc.h Wed May 23 19:55:47 2018 (r334114) @@ -61,7 +61,7 @@ * * The patch version is incremented for every bug fix. */ -#define PMC_VERSION_MAJOR 0x03 +#define PMC_VERSION_MAJOR 0x04 #define PMC_VERSION_MINOR 0x01 #define PMC_VERSION_PATCH 0x0000 Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Wed May 23 19:17:17 2018 (r334113) +++ head/usr.sbin/pmcstat/pmcstat_log.c Wed May 23 19:55:47 2018 (r334114) @@ -406,7 +406,7 @@ pmcstat_print_log(void) ev.pl_u.pl_i.pl_version, pmc_name_of_cputype(ev.pl_u.pl_i.pl_arch)); if ((ev.pl_u.pl_i.pl_version & 0xFF000000) != - PMC_VERSION_MAJOR << 24 && args.pa_verbosity > 0) + PMC_VERSION_MAJOR << 24) warnx( "WARNING: Log version 0x%x != expected version 0x%x.", ev.pl_u.pl_i.pl_version, PMC_VERSION); From owner-svn-src-head@freebsd.org Wed May 23 20:06:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C432AEB00F5; Wed, 23 May 2018 20:06:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 662C17C214; Wed, 23 May 2018 20:06:07 +0000 (UTC) (envelope-from trasz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4492A2771F; Wed, 23 May 2018 20:06:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NK67pR044397; Wed, 23 May 2018 20:06:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NK64jS044384; Wed, 23 May 2018 20:06:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201805232006.w4NK64jS044384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 23 May 2018 20:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334115 - in head: share/man/man4 sys/dev/usb/template X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/usb/template X-SVN-Commit-Revision: 334115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 20:06:08 -0000 Author: trasz Date: Wed May 23 20:06:04 2018 New Revision: 334115 URL: https://svnweb.freebsd.org/changeset/base/334115 Log: Centralize USB device mode bus power reporting, and add hw.usb.template_power sysctl to control it. Reviewed by: hselasky@ (earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/usb_template.4 head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/template/usb_template_audio.c head/sys/dev/usb/template/usb_template_cdce.c head/sys/dev/usb/template/usb_template_kbd.c head/sys/dev/usb/template/usb_template_midi.c head/sys/dev/usb/template/usb_template_modem.c head/sys/dev/usb/template/usb_template_mouse.c head/sys/dev/usb/template/usb_template_msc.c head/sys/dev/usb/template/usb_template_mtp.c head/sys/dev/usb/template/usb_template_multi.c head/sys/dev/usb/template/usb_template_phone.c head/sys/dev/usb/template/usb_template_serialnet.c Modified: head/share/man/man4/usb_template.4 ============================================================================== --- head/share/man/man4/usb_template.4 Wed May 23 19:55:47 2018 (r334114) +++ head/share/man/man4/usb_template.4 Wed May 23 20:06:04 2018 (r334115) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 17, 2018 +.Dd May 23, 2018 .Dt USB_TEMPLATE 4 .Os . @@ -100,6 +100,11 @@ tunables: .It Va hw.usb.template Currently selected template. Set to -1 to make the device disappear from the USB host point of view. +.It Va hw.usb.template_power +USB bus power consumption in mA. +Must be between 0 and 500. +Setting to 0 marks the device as self-powered. +Defaults to 500mA. .It Va hw.usb.templates.N Configuration for template number .Va N . Modified: head/sys/dev/usb/template/usb_template.c ============================================================================== --- head/sys/dev/usb/template/usb_template.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template.c Wed May 23 20:06:04 2018 (r334115) @@ -76,14 +76,12 @@ #include #endif /* USB_GLOBAL_INCLUDE_FILE */ -SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW, 0, - "USB device side templates"); - MODULE_DEPEND(usb_template, usb, 1, 1, 1); MODULE_VERSION(usb_template, 1); /* function prototypes */ +static int sysctl_hw_usb_template_power(SYSCTL_HANDLER_ARGS); static void usb_make_raw_desc(struct usb_temp_setup *, const uint8_t *); static void usb_make_endpoint_desc(struct usb_temp_setup *, const struct usb_temp_endpoint_desc *); @@ -117,6 +115,33 @@ static usb_error_t usb_temp_setup_by_index(struct usb_ uint16_t index); static void usb_temp_init(void *); +SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW, 0, + "USB device side templates"); +SYSCTL_PROC(_hw_usb, OID_AUTO, template_power, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + NULL, 0, sysctl_hw_usb_template_power, + "I", "USB bus power consumption in mA"); + +static int usb_template_power = 500; /* 500mA */ + +static int +sysctl_hw_usb_template_power(SYSCTL_HANDLER_ARGS) +{ + int error, val; + + val = usb_template_power; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + if (val < 0 || val > 500) + return (EINVAL); + + usb_template_power = val; + + return (0); +} + /*------------------------------------------------------------------------* * usb_decode_str_desc * @@ -426,6 +451,7 @@ usb_make_config_desc(struct usb_temp_setup *temp, struct usb_config_descriptor *cd; const struct usb_temp_interface_desc **tid; uint16_t old_size; + int power; /* Reserve memory */ @@ -463,13 +489,16 @@ usb_make_config_desc(struct usb_temp_setup *temp, cd->bConfigurationValue = temp->bConfigurationValue; cd->iConfiguration = tcd->iConfiguration; cd->bmAttributes = tcd->bmAttributes; - cd->bMaxPower = tcd->bMaxPower; - cd->bmAttributes |= (UC_REMOTE_WAKEUP | UC_BUS_POWERED); - if (temp->self_powered) { - cd->bmAttributes |= UC_SELF_POWERED; - } else { + power = usb_template_power; + cd->bMaxPower = power / 2; /* 2 mA units */ + cd->bmAttributes |= UC_REMOTE_WAKEUP; + if (power > 0) { + cd->bmAttributes |= UC_BUS_POWERED; cd->bmAttributes &= ~UC_SELF_POWERED; + } else { + cd->bmAttributes &= ~UC_BUS_POWERED; + cd->bmAttributes |= UC_SELF_POWERED; } } } Modified: head/sys/dev/usb/template/usb_template_audio.c ============================================================================== --- head/sys/dev/usb/template/usb_template_audio.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_audio.c Wed May 23 20:06:04 2018 (r334115) @@ -351,8 +351,8 @@ static const struct usb_temp_interface_desc *audio_int static const struct usb_temp_config_desc audio_config_desc = { .ppIfaceDesc = audio_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = AUDIO_PRODUCT_INDEX, }; Modified: head/sys/dev/usb/template/usb_template_cdce.c ============================================================================== --- head/sys/dev/usb/template/usb_template_cdce.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_cdce.c Wed May 23 20:06:04 2018 (r334115) @@ -219,8 +219,8 @@ static const struct usb_temp_interface_desc *eth_inter static const struct usb_temp_config_desc eth_config_desc = { .ppIfaceDesc = eth_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = ETH_CONFIGURATION_INDEX, }; Modified: head/sys/dev/usb/template/usb_template_kbd.c ============================================================================== --- head/sys/dev/usb/template/usb_template_kbd.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_kbd.c Wed May 23 20:06:04 2018 (r334115) @@ -157,8 +157,8 @@ static const struct usb_temp_interface_desc *keyboard_ static const struct usb_temp_config_desc keyboard_config_desc = { .ppIfaceDesc = keyboard_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = KBD_PRODUCT_INDEX, }; Modified: head/sys/dev/usb/template/usb_template_midi.c ============================================================================== --- head/sys/dev/usb/template/usb_template_midi.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_midi.c Wed May 23 20:06:04 2018 (r334115) @@ -199,8 +199,8 @@ static const struct usb_temp_interface_desc *midi_inte static const struct usb_temp_config_desc midi_config_desc = { .ppIfaceDesc = midi_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = MIDI_PRODUCT_INDEX, }; Modified: head/sys/dev/usb/template/usb_template_modem.c ============================================================================== --- head/sys/dev/usb/template/usb_template_modem.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_modem.c Wed May 23 20:06:04 2018 (r334115) @@ -198,8 +198,8 @@ static const struct usb_temp_interface_desc *modem_int static const struct usb_temp_config_desc modem_config_desc = { .ppIfaceDesc = modem_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = MODEM_PRODUCT_INDEX, }; Modified: head/sys/dev/usb/template/usb_template_mouse.c ============================================================================== --- head/sys/dev/usb/template/usb_template_mouse.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_mouse.c Wed May 23 20:06:04 2018 (r334115) @@ -155,8 +155,8 @@ static const struct usb_temp_interface_desc *mouse_int static const struct usb_temp_config_desc mouse_config_desc = { .ppIfaceDesc = mouse_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = MOUSE_INTERFACE_INDEX, }; Modified: head/sys/dev/usb/template/usb_template_msc.c ============================================================================== --- head/sys/dev/usb/template/usb_template_msc.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_msc.c Wed May 23 20:06:04 2018 (r334115) @@ -142,8 +142,8 @@ static const struct usb_temp_interface_desc *msc_inter static const struct usb_temp_config_desc msc_config_desc = { .ppIfaceDesc = msc_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = MSC_CONFIGURATION_INDEX, }; Modified: head/sys/dev/usb/template/usb_template_mtp.c ============================================================================== --- head/sys/dev/usb/template/usb_template_mtp.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_mtp.c Wed May 23 20:06:04 2018 (r334115) @@ -164,8 +164,8 @@ static const struct usb_temp_interface_desc *mtp_inter static const struct usb_temp_config_desc mtp_config_desc = { .ppIfaceDesc = mtp_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = MTP_CONFIGURATION_INDEX, }; Modified: head/sys/dev/usb/template/usb_template_multi.c ============================================================================== --- head/sys/dev/usb/template/usb_template_multi.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_multi.c Wed May 23 20:06:04 2018 (r334115) @@ -370,8 +370,8 @@ static const struct usb_temp_interface_desc *multi_int static const struct usb_temp_config_desc multi_config_desc = { .ppIfaceDesc = multi_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = MULTI_CONFIGURATION_INDEX, }; static const struct usb_temp_config_desc *multi_configs[] = { Modified: head/sys/dev/usb/template/usb_template_phone.c ============================================================================== --- head/sys/dev/usb/template/usb_template_phone.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_phone.c Wed May 23 20:06:04 2018 (r334115) @@ -347,8 +347,8 @@ static const struct usb_temp_interface_desc *phone_int static const struct usb_temp_config_desc phone_config_desc = { .ppIfaceDesc = phone_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = PHONE_PRODUCT_INDEX, }; Modified: head/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- head/sys/dev/usb/template/usb_template_serialnet.c Wed May 23 19:55:47 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_serialnet.c Wed May 23 20:06:04 2018 (r334115) @@ -327,8 +327,8 @@ static const struct usb_temp_interface_desc *serialnet static const struct usb_temp_config_desc serialnet_config_desc = { .ppIfaceDesc = serialnet_interfaces, - .bmAttributes = UC_BUS_POWERED, - .bMaxPower = 25, /* 50 mA */ + .bmAttributes = 0, + .bMaxPower = 0, .iConfiguration = SERIALNET_CONFIGURATION_INDEX, }; static const struct usb_temp_config_desc *serialnet_configs[] = { From owner-svn-src-head@freebsd.org Wed May 23 20:09:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 326E7EB01FC for ; Wed, 23 May 2018 20:09:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB4307C3DB for ; Wed, 23 May 2018 20:09:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id g14-v6so24284101ioc.7 for ; Wed, 23 May 2018 13:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=lL2u5PeAUiP7+B5YpTbO7gp0h4ifITuNitMmgLTE55M=; b=CWqMHccWp9BaNyseIcGmBXaToQfhIn8L6afEI16lN/KOwXIt8kTf72xoNAKvqtk742 8uvflETj9QnGWXRa245GPi5e2LpJV76iWZ4XLF9D7D8S4/0IlNQydhAmCRNV9au6pyJR C+66NrLX2dITKWKPgV72R2xLDLPOG3EnNqnPb8AoXJN8pzvW7jU4JtXdSHp6uHOL5umK 7wSwgCFjS3eYSRDpTpsrrHgGZ1fn5rqqEdUSPwMelcFTbv1OHJ22R3NJFk+ci0m9YA12 dYPBPpu9NfUFNk8tZhOz/JPP2gKAkUoJLgCbpyh9J5MeOzI4TDKyBB6a5skVjQmwChAk Tdrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=lL2u5PeAUiP7+B5YpTbO7gp0h4ifITuNitMmgLTE55M=; b=Kwxi0U2LLMTW/jABEGi/yOSKkprpwUrq+zxTrw+1OVpxBRg+fwQW8z5vTSTWajlhPB C4u6/Fz+vMbfo5jecXUKBc6E12fu87nfSbr+x/voqIbGkyfMl9xNWV6rFkeXxpIGd06Q ig6aoZZDIPdYXf92QCeEaXzC0uzUIjO3rINhMWKKLdV1smcKY+HfaFGXrnFsWDGeZX/m Q7kI+GC5gvLUZP5i65OnuAlHBZcsUbkQXMxlOhuB5gN3kQOI98S9oW6PrK4GvKd+8W5+ w2iwaLa7TcWSIAfdxD1E8tsdAa2PkYko9BtCagGbm/+WtSBLOffC8SSJ5OYbRg/Gq44b mBkA== X-Gm-Message-State: ALKqPwe0yrH0KKXfxS8uj8z/WRme5DYqFQUhfadL4FoGRTCXBH2yJWxS +saJgL35toHYj9SstvFIjcH046Sg3SY/gpF8+T5Vlg== X-Google-Smtp-Source: ADUXVKJ1yn/b9t5j+lB45R8irFEzoOF1aiSwHbc6tZVqlVpdOoyemT1+rW3Ej8qYxk5L2cakZt2qmgpPsAIKkfV4osA= X-Received: by 2002:a6b:5a0d:: with SMTP id o13-v6mr3932810iob.39.1527106177887; Wed, 23 May 2018 13:09:37 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:d028:0:0:0:0:0 with HTTP; Wed, 23 May 2018 13:09:37 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <201805230739.w4N7d34c062450@repo.freebsd.org> References: <201805230739.w4N7d34c062450@repo.freebsd.org> From: Warner Losh Date: Wed, 23 May 2018 14:09:37 -0600 X-Google-Sender-Auth: XCZcsFYg1XsuIdPVD8Fejj5EQGU Message-ID: Subject: Re: svn commit: r334077 - in head/sbin/devd: . tests To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 20:09:39 -0000 On Wed, May 23, 2018 at 1:39 AM, Eitan Adler wrote: > Author: eadler > Date: Wed May 23 07:39:02 2018 > New Revision: 334077 > URL: https://svnweb.freebsd.org/changeset/base/334077 > > Log: > devd: correct two warnings > > - catching a polymorphic type by value > - "output between 16 and 95 bytes into a destination of size 80" > > Modified: > head/sbin/devd/devd.cc > head/sbin/devd/tests/client_test.c > > Modified: head/sbin/devd/devd.cc > ============================================================ > ================== > --- head/sbin/devd/devd.cc Wed May 23 07:39:00 2018 (r334076) > +++ head/sbin/devd/devd.cc Wed May 23 07:39:02 2018 (r334077) > @@ -1087,7 +1087,7 @@ event_loop(void) > try { > process_event(buffer); > } > - catch (std::length_error e) { > + catch (const std::length_error& e) { > devdlog(LOG_ERR, "Dropping event > %s " > "due to low memory", buffer); > } > > Modified: head/sbin/devd/tests/client_test.c > ============================================================ > ================== > --- head/sbin/devd/tests/client_test.c Wed May 23 07:39:00 2018 > (r334076) > +++ head/sbin/devd/tests/client_test.c Wed May 23 07:39:02 2018 > (r334077) > @@ -50,7 +50,7 @@ create_two_events(void) > FILE *create_stdout; > FILE *destroy_stdout; > char mdname[80]; > - char destroy_cmd[80]; > + char destroy_cmd[95]; > char *error; > I know it's just a test, but 95 seems equally as magical as 80... Warner > create_stdout = popen("mdconfig -a -s 64 -t null", "r"); > > From owner-svn-src-head@freebsd.org Wed May 23 20:19:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC550EB05DA for ; Wed, 23 May 2018 20:19:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5507B7C9F7 for ; Wed, 23 May 2018 20:19:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x243.google.com with SMTP id c3-v6so5957331itj.4 for ; Wed, 23 May 2018 13:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=qrky2lAGI6g/yA8trx1R1oN7oA6qIvKM4MvmiFrC1B0=; b=Al/oWkpPLEjON1EsTY/2MqfiUGup6NgYDhIZwCm/neT4UB2ZLauN/pi7hTpt/YEvYT gk4Fwsd5PssF5T2R9oKMMtyaJmoaZBWsABdqlHZnU+9V9HnodH4Uu2ijJuYfC1dmLUkN fCCk9byQ0FStSAJcmCHRgRggW7OCxkkby39Q4/kMymgN3hBLN+46gSQe8tLRC4McprQI SVDNsM9llhruURiuIt063rXCF91PPOXFVLgsbkRgL7gdvSPYxHhMXK7uXl1Ti2TUbJJ4 0SrWUef+uzpz3u1S4TFII79kRE8zGTffZMkfsccdgCAPmlgsh2a0SmB8EjoPJ5WthTX/ MWHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=qrky2lAGI6g/yA8trx1R1oN7oA6qIvKM4MvmiFrC1B0=; b=FPQC90QVP2YpkO8Vo/CyEBI4uD62G+hNrPkOKNzEV3KffJfvVbSeUHkpFXBH/1mRHA rv/Pdf3tsR0nxEpf6lCGevJvLLZpLtMKqOmJZVaQiTJ9HFsuLDPXZ6ptzWiYgKaMFLQI Z3HJzvbESuQ/ZMwfMCK7C4us6tQTFBD2kAcQENvAb0q9oNifi+1ZalDJoWAl5nriWTVJ kjCiqz46DNqWbRM+IZy2lC4ykubWORadYLZIQoe2eY8bbKqW7pDMWW7xlYvW8HcTOJqC cZ11XAk1y/VDP959+nj/+rJPY/Y+IlxduoSFg7BqKrr1Ywn3ZZWgnnitOhVfo80l1XPd Wn2A== X-Gm-Message-State: ALKqPwca8HiLimSehpOo10SuRbB/QTBhV9E5psbFb6e7xapO+6k+fJH1 6XNA8CvZ+LZ6IXeOEPD0HrXVyv+CHRxg8V+CYO9zIg== X-Google-Smtp-Source: ADUXVKLh7lDxgdhdo9zrxsh/CgUOi1K9cjSWY/2/+A07nVKZY+UySGk2rVcoqzUsh0pbJ683Cs6sGRuq6kmi/mEQMHY= X-Received: by 2002:a24:4388:: with SMTP id s130-v6mr6770225itb.51.1527106788651; Wed, 23 May 2018 13:19:48 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:d028:0:0:0:0:0 with HTTP; Wed, 23 May 2018 13:19:47 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <06ACF82E-4072-40B1-9ECF-A0DBDD23A11B@lists.zabbadoz.net> References: <201805082114.w48LETM3060105@repo.freebsd.org> <20180523174117.GO71675@FreeBSD.org> <20180523182010.GB58848@spindle.one-eyed-alien.net> <06ACF82E-4072-40B1-9ECF-A0DBDD23A11B@lists.zabbadoz.net> From: Warner Losh Date: Wed, 23 May 2018 14:19:47 -0600 X-Google-Sender-Auth: ENP-2bls2Iy1wHfHSdL5vUHjTcs Message-ID: Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share To: "Bjoern A. Zeeb" Cc: Brooks Davis , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 20:19:50 -0000 On Wed, May 23, 2018 at 1:11 PM, Bjoern A. Zeeb < bzeeb-lists@lists.zabbadoz.net> wrote: > On 23 May 2018, at 18:20, Brooks Davis wrote: > > On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: >> >>> On Tue, May 08, 2018 at 09:14:29PM +0000, Sean Bruno wrote: >>> S> Log: >>> S> nxge(4): >>> S> Remove nxge(4) and associated man page and tools in FreeBSD 12.0. >>> ... >>> S> +20180508: >>> S> + The nxge(4) driver has been removed. This driver was for PCI-X >>> 10g >>> S> + cards made by s2io/Neterion. The company was aquired by Exar a= nd >>> S> + no longer sells or supports Ethernet products. If you have >>> device >>> S> + nxge in your kernel config file it must be removed. >>> S> + >>> >>> If end of sales and support is enough to remove 10g driver from the >>> kernel, >>> can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the >>> kernel? >>> >> >> It's probably a good idea to add deprecation notices for them now and >> merge for 11 to find out which ones still have users. Someone on IRC >> mentioned that FreeNAS removed them and ended up restoring one, but I >> don't remember which one it was. >> >> My gut feeling is that we're a bit late in the game for doing a mass >> removal for 12, but we should definitely do so for 13. >> > > I=E2=80=99d be very careful. I can still buy a lot of 100Mbit/s cards an= d you > constantly find them on new SoCs still which don=E2=80=99t do Gbit/s. Al= so there=E2=80=99s > a lot of legacy hw floating around for some of them. 12 definitively see= ms > to be too short term. There's a lot of really old drivers we could safely retire in 13 and not affect more than a handful of users who could easily buy a new add-in card since several of the early Bill Paul tulip drivers never were designed into mobos. There's no compelling reason to move quickly with 12 retirement. But marking them *NOW* as going away in 13 will let us get some feedback from people / situations that would be affected in plenty of time to change course. Warner From owner-svn-src-head@freebsd.org Wed May 23 20:21:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C067EB0816; Wed, 23 May 2018 20:21:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB4667CBC5; Wed, 23 May 2018 20:21:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 95C25D865; Wed, 23 May 2018 20:21:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 67B5656F9; Wed, 23 May 2018 20:21:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id eVT27xm-CJ3x; Wed, 23 May 2018 20:21:00 +0000 (UTC) Subject: Re: svn commit: r334008 - head/bin/sh DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 8CC1C56F4 From: Bryan Drewery To: "O. Hartmann" , Cy Schubert , David Wolfskill Cc: Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> <201805220445.w4M4jroR019550@slippy.cwsent.com> <20180522101737.52e76c0f@freyja.zeit4.iv.bundesimmobilien.de> <20180522202259.GA44110@stack.nl> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: <1e2b1d35-d3ac-34b6-cb68-5e52605e2a31@FreeBSD.org> Date: Wed, 23 May 2018 13:20:58 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r0SjQLVt0aVOsWRU8pTqlNVwklafpmlAH" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 20:21:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --r0SjQLVt0aVOsWRU8pTqlNVwklafpmlAH Content-Type: multipart/mixed; boundary="m4hjhAuQR2Z5ZyU2z6tcTDiTQu04EKQ2E"; protected-headers="v1" From: Bryan Drewery To: "O. Hartmann" , Cy Schubert , David Wolfskill Cc: Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <1e2b1d35-d3ac-34b6-cb68-5e52605e2a31@FreeBSD.org> Subject: Re: svn commit: r334008 - head/bin/sh References: <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien.de> <201805220445.w4M4jroR019550@slippy.cwsent.com> <20180522101737.52e76c0f@freyja.zeit4.iv.bundesimmobilien.de> <20180522202259.GA44110@stack.nl> In-Reply-To: --m4hjhAuQR2Z5ZyU2z6tcTDiTQu04EKQ2E Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/22/2018 5:30 PM, Bryan Drewery wrote: > On 5/22/2018 1:22 PM, Jilles Tjoelker wrote: >> On Tue, May 22, 2018 at 10:17:41AM +0200, O. Hartmann wrote: >>> On Mon, 21 May 2018 21:45:53 -0700 >>> Cy Schubert wrote: >>>> In message <20180522061339.2149763e@freyja.zeit4.iv.bundesimmobilien= =2Ede> >>>> , "O. H >>>> artmann" writes: >>>>> On Mon, 21 May 2018 21:52:48 +0000 (UTC) >>>>> Jilles Tjoelker wrote: >> >>>>>> Author: jilles >>>>>> Date: Mon May 21 21:52:48 2018 >>>>>> New Revision: 334008 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/334008 >> >>>>>> Log: >>>>>> sh: Split CNL syntax category to avoid a check on state[level].s= yntax >> >>>>>> No functional change is intended. >> >>>>>> Modified: >>>>>> head/bin/sh/mksyntax.c >>>>>> head/bin/sh/parser.c >>> [snip] >> >>>>> Have this been tested? Doesn't compile for me: >> >>>>> [...] >>>>> Building /usr/obj/usr/src/amd64.amd64/kerberos5/libexec/hprop/hprop= >>>>> --- all_subdir_rescue --- >>>>> --- parser.o --- >>>>> /usr/src/bin/sh/parser.c:1440:9: error: use of undeclared identifie= r 'CQNL' >>>>> case CQNL: >>>>> ^ >>>>> --- all_subdir_gnu --- >>>>> Building /usr/obj/usr/src/amd64.amd64/gnu/usr.bin/gdb/libgdb/amd64b= sd-nat.o >>>>> --- all_subdir_rescue --- >>>>> 1 error generated. >>>>> *** [parser.o] Error code 1 >> >>>>> make[6]: stopped in /usr/src/bin/sh >> >>>> CQNL is defined in /usr/obj/opt/src/svn-current/amd64.amd64/bin/sh/s= ynta >>>> x.h, generated by mksyntax. >> >>>> slippy$ ag -s CQNL /export/obj/opt/src/svn-current/amd64.amd64/bin/s= h/*. >>>> h >>>> /export/obj/opt/src/svn-current/amd64.amd64/bin/sh/syntax.h >>>> 11:#define CQNL 2 /* newline character in quotes */ >>>> slippy$=20 >> >>>> Remove the file if it's not defined in your syntax.h. >> >>>> Just out of interest, do you use meta mode? >> >>> I think such a question is of common interest if errors/bugs like tha= t occur: >>> Yes, I use/compile world/kernel with META mode. >> >> The change itself is fine. It built for me and for Jenkins >> (ci.freebsd.org). What is not fine is an incremental build with meta >> mode. Apparently, the syntax.h: .NOMETA rule added in r301285 causes= >> bmake to build some files against the old syntax.h, even though syntax= =2Ec >> and syntax.h will be rebuilt. >> >> To fix this, it may be possible to generate a meta file for syntax.h >> based on the one for syntax.c. The same would be done for builtins.[ch= ] >> and nodes.[ch]. >> >> Conceptually simpler is accepting what make would like: one command >> generates one file only. This is not really new with meta mode since a= >=20 > Yeah bmake (both with and without meta mode) is lacking in properly > handling 1 target generating multiple files. It's a big frustration of= > mine as every pattern I've seen does not do the right thing. I'll look= > into this case more. For now just remove the syntax.h file from the > objdir or remove the bin/sh dir. >=20 >> somewhat ugly .ORDER declaration had been necessary before. The .c >> content can go inside a #ifdef in the .h file so the .c file need not = be >> autogenerated, or the tools can be run twice, once to generate the .c >> file and once to generate the .h file. In both cases, the tools will b= e >> somewhat uglier in order to simplify the build system. >> >=20 >=20 The problem is the rescue build is doing 'make foo.o bar.o' rather than 'make all', so the implicit 'make depend' phase is skipped. Switching rescue (crunchgen) to use 'make all' fixes it. I am testing a full build of that now and will commit it soon. The .NOMETA does certainly cause the problem but 'make all' ensures the implicit 'make depend' will always run for all modes as intended. --=20 Regards, Bryan Drewery --m4hjhAuQR2Z5ZyU2z6tcTDiTQu04EKQ2E-- --r0SjQLVt0aVOsWRU8pTqlNVwklafpmlAH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJbBc0qAAoJEDXXcbtuRpfPsKsH/1ruDtJNevoxWNcs3yxOdEZc IJocanEV2gL8mUficsUWwui6tf/UjR2saaiSCrbDssRA0+J/KEC3t1SoPB/n/qNJ JZ6lgfugIfGVVlmZg7Jfqh4J9J+4ZQu/ip3helR3NUTW401Z6Ves84x0bsZmQO9Q DeBS1uOYp98/O9huiDTR8XWQQqmqR/tU/dhVcMxzNUenQkI7D9cmgYCLzZ/HZ8s3 tMCSoM4x94T5+cJ3kW4t8Er/2SluSRWbTE2u23OThzppiF1thcwoWk+SnAPBTKpX dLVTKSuW1K+BR5LQNHkdwReHwUIBxAl5qAfsLWC1mstoNzexy6cRHqrWqNzVv4E= =lwBA -----END PGP SIGNATURE----- --r0SjQLVt0aVOsWRU8pTqlNVwklafpmlAH-- From owner-svn-src-head@freebsd.org Wed May 23 20:35:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D669EB1402; Wed, 23 May 2018 20:35:30 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D7A07D8FF; Wed, 23 May 2018 20:35:30 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.41] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 7CE4EABC6; Wed, 23 May 2018 20:35:29 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.d.0.180513 Date: Wed, 23 May 2018 13:35:26 -0700 Subject: Re: svn commit: r334115 - in head: share/man/man4 sys/dev/usb/template From: Ravi Pokala To: Edward Tomasz Napierala , , , Message-ID: <9B0033E1-56EC-4CA0-BC28-056871B32B0A@panasas.com> Thread-Topic: svn commit: r334115 - in head: share/man/man4 sys/dev/usb/template References: <201805232006.w4NK64jS044384@repo.freebsd.org> In-Reply-To: <201805232006.w4NK64jS044384@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 20:35:31 -0000 Hi Traz, You're referring to power consumption in terms of (milli)Amps. That's not r= ight; power is measured in Watts. What you're actually talking about is *cur= rent*. And it looks like in some situations USB devices can draw more than 5= 00mA. https://en.wikipedia.org/wiki/USB_(Physical)#POWER Thanks, Ravi (rpokala@)=20 =EF=BB=BF-----Original Message----- From: on behalf of Edward Tomasz Napiera= la Date: 2018-05-23, Wednesday at 13:06 To: , , Subject: svn commit: r334115 - in head: share/man/man4 sys/dev/usb/template Author: trasz Date: Wed May 23 20:06:04 2018 New Revision: 334115 URL: https://svnweb.freebsd.org/changeset/base/334115 Log: Centralize USB device mode bus power reporting, and add hw.usb.template_power sysctl to control it. =20 Reviewed by: hselasky@ (earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/usb_template.4 head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/template/usb_template_audio.c head/sys/dev/usb/template/usb_template_cdce.c head/sys/dev/usb/template/usb_template_kbd.c head/sys/dev/usb/template/usb_template_midi.c head/sys/dev/usb/template/usb_template_modem.c head/sys/dev/usb/template/usb_template_mouse.c head/sys/dev/usb/template/usb_template_msc.c head/sys/dev/usb/template/usb_template_mtp.c head/sys/dev/usb/template/usb_template_multi.c head/sys/dev/usb/template/usb_template_phone.c head/sys/dev/usb/template/usb_template_serialnet.c Modified: head/share/man/man4/usb_template.4 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/share/man/man4/usb_template.4 Wed May 23 19:55:47 2018 (r334114) +++ head/share/man/man4/usb_template.4 Wed May 23 20:06:04 2018 (r334115) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 17, 2018 +.Dd May 23, 2018 .Dt USB_TEMPLATE 4 .Os . @@ -100,6 +100,11 @@ tunables: .It Va hw.usb.template Currently selected template. Set to -1 to make the device disappear from the USB host point of view. +.It Va hw.usb.template_power +USB bus power consumption in mA. +Must be between 0 and 500. +Setting to 0 marks the device as self-powered. +Defaults to 500mA. .It Va hw.usb.templates.N Configuration for template number .Va N . Modified: head/sys/dev/usb/template/usb_template.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template.c Wed May 23 19:55:47 2018 (r334= 114) +++ head/sys/dev/usb/template/usb_template.c Wed May 23 20:06:04 2018 (r334= 115) @@ -76,14 +76,12 @@ #include #endif /* USB_GLOBAL_INCLUDE_FILE */ =20 -SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW, 0, - "USB device side templates"); - MODULE_DEPEND(usb_template, usb, 1, 1, 1); MODULE_VERSION(usb_template, 1); =20 /* function prototypes */ =20 +static int sysctl_hw_usb_template_power(SYSCTL_HANDLER_ARGS); static void usb_make_raw_desc(struct usb_temp_setup *, const uint8_t *); static void usb_make_endpoint_desc(struct usb_temp_setup *, const struct usb_temp_endpoint_desc *); @@ -117,6 +115,33 @@ static usb_error_t usb_temp_setup_by_index(struct usb_ uint16_t index); static void usb_temp_init(void *); =20 +SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW, 0, + "USB device side templates"); +SYSCTL_PROC(_hw_usb, OID_AUTO, template_power, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + NULL, 0, sysctl_hw_usb_template_power, + "I", "USB bus power consumption in mA"); + +static int usb_template_power =3D 500; /* 500mA */ + +static int +sysctl_hw_usb_template_power(SYSCTL_HANDLER_ARGS) +{ + int error, val; + + val =3D usb_template_power; + error =3D sysctl_handle_int(oidp, &val, 0, req); + if (error !=3D 0 || req->newptr =3D=3D NULL) + return (error); + + if (val < 0 || val > 500) + return (EINVAL); + + usb_template_power =3D val; + + return (0); +} + /*------------------------------------------------------------------------= * * usb_decode_str_desc * @@ -426,6 +451,7 @@ usb_make_config_desc(struct usb_temp_setup *temp, struct usb_config_descriptor *cd; const struct usb_temp_interface_desc **tid; uint16_t old_size; + int power; =20 /* Reserve memory */ =20 @@ -463,13 +489,16 @@ usb_make_config_desc(struct usb_temp_setup *temp, cd->bConfigurationValue =3D temp->bConfigurationValue; cd->iConfiguration =3D tcd->iConfiguration; cd->bmAttributes =3D tcd->bmAttributes; - cd->bMaxPower =3D tcd->bMaxPower; - cd->bmAttributes |=3D (UC_REMOTE_WAKEUP | UC_BUS_POWERED); =20 - if (temp->self_powered) { - cd->bmAttributes |=3D UC_SELF_POWERED; - } else { + power =3D usb_template_power; + cd->bMaxPower =3D power / 2; /* 2 mA units */ + cd->bmAttributes |=3D UC_REMOTE_WAKEUP; + if (power > 0) { + cd->bmAttributes |=3D UC_BUS_POWERED; cd->bmAttributes &=3D ~UC_SELF_POWERED; + } else { + cd->bmAttributes &=3D ~UC_BUS_POWERED; + cd->bmAttributes |=3D UC_SELF_POWERED; } } } Modified: head/sys/dev/usb/template/usb_template_audio.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_audio.c Wed May 23 19:55:47 2018= (r334114) +++ head/sys/dev/usb/template/usb_template_audio.c Wed May 23 20:06:04 2018= (r334115) @@ -351,8 +351,8 @@ static const struct usb_temp_interface_desc *audio_int =20 static const struct usb_temp_config_desc audio_config_desc =3D { .ppIfaceDesc =3D audio_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D AUDIO_PRODUCT_INDEX, }; =20 Modified: head/sys/dev/usb/template/usb_template_cdce.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_cdce.c Wed May 23 19:55:47 2018 = (r334114) +++ head/sys/dev/usb/template/usb_template_cdce.c Wed May 23 20:06:04 2018 = (r334115) @@ -219,8 +219,8 @@ static const struct usb_temp_interface_desc *eth_inter =20 static const struct usb_temp_config_desc eth_config_desc =3D { .ppIfaceDesc =3D eth_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D ETH_CONFIGURATION_INDEX, }; =20 Modified: head/sys/dev/usb/template/usb_template_kbd.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_kbd.c Wed May 23 19:55:47 2018 (= r334114) +++ head/sys/dev/usb/template/usb_template_kbd.c Wed May 23 20:06:04 2018 (= r334115) @@ -157,8 +157,8 @@ static const struct usb_temp_interface_desc *keyboard_ =20 static const struct usb_temp_config_desc keyboard_config_desc =3D { .ppIfaceDesc =3D keyboard_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D KBD_PRODUCT_INDEX, }; =20 Modified: head/sys/dev/usb/template/usb_template_midi.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_midi.c Wed May 23 19:55:47 2018 = (r334114) +++ head/sys/dev/usb/template/usb_template_midi.c Wed May 23 20:06:04 2018 = (r334115) @@ -199,8 +199,8 @@ static const struct usb_temp_interface_desc *midi_inte =20 static const struct usb_temp_config_desc midi_config_desc =3D { .ppIfaceDesc =3D midi_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D MIDI_PRODUCT_INDEX, }; =20 Modified: head/sys/dev/usb/template/usb_template_modem.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_modem.c Wed May 23 19:55:47 2018= (r334114) +++ head/sys/dev/usb/template/usb_template_modem.c Wed May 23 20:06:04 2018= (r334115) @@ -198,8 +198,8 @@ static const struct usb_temp_interface_desc *modem_int =20 static const struct usb_temp_config_desc modem_config_desc =3D { .ppIfaceDesc =3D modem_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D MODEM_PRODUCT_INDEX, }; =20 Modified: head/sys/dev/usb/template/usb_template_mouse.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_mouse.c Wed May 23 19:55:47 2018= (r334114) +++ head/sys/dev/usb/template/usb_template_mouse.c Wed May 23 20:06:04 2018= (r334115) @@ -155,8 +155,8 @@ static const struct usb_temp_interface_desc *mouse_int =20 static const struct usb_temp_config_desc mouse_config_desc =3D { .ppIfaceDesc =3D mouse_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D MOUSE_INTERFACE_INDEX, }; =20 Modified: head/sys/dev/usb/template/usb_template_msc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_msc.c Wed May 23 19:55:47 2018 (= r334114) +++ head/sys/dev/usb/template/usb_template_msc.c Wed May 23 20:06:04 2018 (= r334115) @@ -142,8 +142,8 @@ static const struct usb_temp_interface_desc *msc_inter =20 static const struct usb_temp_config_desc msc_config_desc =3D { .ppIfaceDesc =3D msc_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D MSC_CONFIGURATION_INDEX, }; =20 Modified: head/sys/dev/usb/template/usb_template_mtp.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_mtp.c Wed May 23 19:55:47 2018 (= r334114) +++ head/sys/dev/usb/template/usb_template_mtp.c Wed May 23 20:06:04 2018 (= r334115) @@ -164,8 +164,8 @@ static const struct usb_temp_interface_desc *mtp_inter =20 static const struct usb_temp_config_desc mtp_config_desc =3D { .ppIfaceDesc =3D mtp_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D MTP_CONFIGURATION_INDEX, }; =20 Modified: head/sys/dev/usb/template/usb_template_multi.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_multi.c Wed May 23 19:55:47 2018= (r334114) +++ head/sys/dev/usb/template/usb_template_multi.c Wed May 23 20:06:04 2018= (r334115) @@ -370,8 +370,8 @@ static const struct usb_temp_interface_desc *multi_int =20 static const struct usb_temp_config_desc multi_config_desc =3D { .ppIfaceDesc =3D multi_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D MULTI_CONFIGURATION_INDEX, }; static const struct usb_temp_config_desc *multi_configs[] =3D { Modified: head/sys/dev/usb/template/usb_template_phone.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_phone.c Wed May 23 19:55:47 2018= (r334114) +++ head/sys/dev/usb/template/usb_template_phone.c Wed May 23 20:06:04 2018= (r334115) @@ -347,8 +347,8 @@ static const struct usb_temp_interface_desc *phone_int =20 static const struct usb_temp_config_desc phone_config_desc =3D { .ppIfaceDesc =3D phone_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D PHONE_PRODUCT_INDEX, }; =20 Modified: head/sys/dev/usb/template/usb_template_serialnet.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/usb/template/usb_template_serialnet.c Wed May 23 19:55:47 = 2018 (r334114) +++ head/sys/dev/usb/template/usb_template_serialnet.c Wed May 23 20:06:04 = 2018 (r334115) @@ -327,8 +327,8 @@ static const struct usb_temp_interface_desc *serialnet =20 static const struct usb_temp_config_desc serialnet_config_desc =3D { .ppIfaceDesc =3D serialnet_interfaces, - .bmAttributes =3D UC_BUS_POWERED, - .bMaxPower =3D 25, /* 50 mA */ + .bmAttributes =3D 0, + .bMaxPower =3D 0, .iConfiguration =3D SERIALNET_CONFIGURATION_INDEX, }; static const struct usb_temp_config_desc *serialnet_configs[] =3D { From owner-svn-src-head@freebsd.org Wed May 23 20:22:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81B21EB08D1; Wed, 23 May 2018 20:22:29 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 277887CF54; Wed, 23 May 2018 20:22:28 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 1ACD15A9F13; Wed, 23 May 2018 20:22:28 +0000 (UTC) Date: Wed, 23 May 2018 20:22:28 +0000 From: Brooks Davis To: Eugene Grosbein Cc: Cy Schubert , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share Message-ID: <20180523202228.GC58848@spindle.one-eyed-alien.net> References: <20180523193027.825583BC@spqr.komquats.com> <5B05C6AC.6010202@grosbein.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QRj9sO5tAVLaXnSD" Content-Disposition: inline In-Reply-To: <5B05C6AC.6010202@grosbein.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-Mailman-Approved-At: Wed, 23 May 2018 20:38:32 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 20:22:29 -0000 --QRj9sO5tAVLaXnSD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 24, 2018 at 02:53:16AM +0700, Eugene Grosbein wrote: > 24.05.2018 2:30, Cy Schubert wrote: >=20 > > Except for old computers and old software that segfaults on 64-bit, how= many people still use i386? > >=20 > > Full disclosure: I'd like to see i386 deorbited before I retire. >=20 > Plese don't. I routinely use FreeBSD11/i386 for cheap VPS hosts having le= ss than 2G memory > because amd64 has noticeable overhead. I even have ZFS-only i386 VPS, her= e is live example with 1G only: >=20 > Mem: 10M Active, 69M Inact, 230M Wired, 685M Free > ARC: 75M Total, 1953K MFU, 31M MRU, 172K Anon, 592K Header, 42M Other > 3500K Compressed, 29M Uncompressed, 8.61:1 Ratio > Swap: 1024M Total, 1024M Free >=20 > The VPS has only 20G of disk space and ZFS compression gives > compressratio 2.22x for ports, 2.51x for src, 2.29x for obj > and 1.95x for installed i386 system plus other software and data. I think we're quite a ways from being ready to axe i386. For VPS applications, we should probably get x32 support in place which should give us the best of both worlds. That said, we either need to rev the i386 ABI to use a 64-bit time_t or kill it in the not to distant future or we risk embedded systems failing in place in 2038. If we assume a 15 year life for most equipment to fail electrically or mechanically that says FreeBSD 13 shouldn't support the current i386 ABI. -- Brooks --QRj9sO5tAVLaXnSD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbBc2DAAoJEKzQXbSebgfAfaMH/iqAaCSH9bzyeHF2VDuzqqZP SqksvvtEjgdyfgzbf24Bmiu1rZ0liSOVxYFoSifRRXHpY+zsJtjDzdxMksI4KYfe Z6Tbmeazqj7pJEUPGXYqyM7FobiSQYPrFSf1Z3sKhrgQ7bSTEzBS5PXzlZErX03o 7BOyJ/bBXgUIQutTdtxUI1u6bowgONs/5Yfc0gTMfpzRisuyn7y7zmOhvOTOknSW Ejc9O2Avz1k59OVeFB3VU4xl5Ll3xnNqLmZK/M2vVPVCpMuoQWACRWTXSReMSMsv hRodN50FIDzxdhk6VvaT4CkhXiAgDog2pib6XOWDMTxEMPW7PZdN/29YTGdHHkE= =n1Qw -----END PGP SIGNATURE----- --QRj9sO5tAVLaXnSD-- From owner-svn-src-head@freebsd.org Wed May 23 20:23:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B99E6EB099D; Wed, 23 May 2018 20:23:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D8ABA7D068; Wed, 23 May 2018 20:23:12 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id LaHmfE1a7vB5RLaHnfwUfm; Wed, 23 May 2018 14:23:05 -0600 X-Authority-Analysis: v=2.3 cv=PvS9kTE3 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=H0GPC0OhAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=RnU9IzQPQthLdAGSiHQA:9 a=CjuIK1q_8ugA:10 a=KczGKrPSgCPlefTG41c3:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 14FEF4AC; Wed, 23 May 2018 13:23:02 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4NKN1pU050506; Wed, 23 May 2018 13:23:01 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4NKN1jb050503; Wed, 23 May 2018 13:23:01 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805232023.w4NKN1jb050503@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Eugene Grosbein cc: Cy Schubert , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share In-Reply-To: Message from Eugene Grosbein of "Thu, 24 May 2018 02:53:16 +0700." <5B05C6AC.6010202@grosbein.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 23 May 2018 13:23:01 -0700 X-CMAE-Envelope: MS4wfBQE6AFrMfnLqwpF2Y34EdHazvdM2fzAs7/AVcMUG7uV1ZuPJZcpEAjKWgnTsX15ynPsNah+3MFU+LlE0Y6HoQKZB56SZw4+nrOBYxBE8mwk7LWOg4t5 pl4ORW5XWY1Dcvjhk6mu7CtnM3zxTDHxRfMHiF3V7b0j+fzwNH2XU1YQNcl6T/14mnQxyk4bP1+jWOQX6P5VBRlS/5LWlbrDeUhPOm638mSnEFF7ELOmWHs8 6erxpvSXuUwlm8umVwzzpJIOs9RNsu7lPEnt1h8aSNXrppL9zagXWfRl5yv693KNe7UfU97TZVhoOBRtjEMajri50igZLGPXo4PTg13wWlJubFy00aMJmhIa CC5bas4Dw164JRjF5iXIiuTH53wF+ay+tkRgqA3Kr+MCrJl+5VoWdGfUqdODaPZUg3fQjLeYg+Nt2Ue28t3BIODoeZa/aQ== X-Mailman-Approved-At: Wed, 23 May 2018 20:38:32 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 20:23:14 -0000 In message <5B05C6AC.6010202@grosbein.net>, Eugene Grosbein writes: > 24.05.2018 2:30, Cy Schubert wrote: > > > Except for old computers and old software that segfaults on 64-bit, how man > y people still use i386? > > > > Full disclosure: I'd like to see i386 deorbited before I retire. > > Plese don't. I routinely use FreeBSD11/i386 for cheap VPS hosts having less t > han 2G memory > because amd64 has noticeable overhead. I even have ZFS-only i386 VPS, here is > live example with 1G only: > > Mem: 10M Active, 69M Inact, 230M Wired, 685M Free > ARC: 75M Total, 1953K MFU, 31M MRU, 172K Anon, 592K Header, 42M Other > 3500K Compressed, 29M Uncompressed, 8.61:1 Ratio > Swap: 1024M Total, 1024M Free I did say before I retire and I have no immediate plans. However dealing with 32-bit issues are a PITA and considering the causes of, IMO, most of the -CURRENT build failures over the past year, I suspect others may also feel the same way. Also, when there are i386 buildworld failures, people hardly complain. I do because my build scripts here build both (which I also do for ports). It is a fair bit of overhead. > > The VPS has only 20G of disk space and ZFS compression gives > compressratio 2.22x for ports, 2.51x for src, 2.29x for obj > and 1.95x for installed i386 system plus other software and data. I used a 768 MB Pentium M with compressed ZFS on a 40 GB disk, I think that was about 10 or 12 years ago. Documented on our wiki. That same machine is now my i386 testbed, used a few times a year. It now has 2 GB RAM and 150 GB disk. Same configuration, just a little bigger. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed May 23 20:26:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9805EB0AAE; Wed, 23 May 2018 20:26:01 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B1C967D1EA; Wed, 23 May 2018 20:26:00 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id LaKbfE2YGvB5RLaKdfwVNk; Wed, 23 May 2018 14:25:59 -0600 X-Authority-Analysis: v=2.3 cv=PvS9kTE3 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=y3olD_i8AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=r063oOu-cMAH_u38Wi8A:9 a=CjuIK1q_8ugA:10 a=2GdgqtpztZvaxdPX1XqS:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 812054D7; Wed, 23 May 2018 13:25:57 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4NKPvDg050851; Wed, 23 May 2018 13:25:57 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4NKPvmo050848; Wed, 23 May 2018 13:25:57 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805232025.w4NKPvmo050848@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Brooks Davis cc: Eugene Grosbein , Cy Schubert , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share In-Reply-To: Message from Brooks Davis of "Wed, 23 May 2018 20:22:28 -0000." <20180523202228.GC58848@spindle.one-eyed-alien.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 23 May 2018 13:25:57 -0700 X-CMAE-Envelope: MS4wfGaomeU5/L2BLkdQ3iXeh+C8jgbBDX9nJ/7xU3XcSIEtRzb48R0yYpy1aKVLcHlqHp5ANkHeGEHgehoOjKkeP9hDNJAeHd07RUbiqkAEhL2TH5i5kJpr qMWxwsOuwvjCVUAkU6i6ZfdRHXhvtkNk0r+9J3BBZZXr2U5miHQI4Ds1lFUcPJ0c0jF0Uy2EV26oA1TX8IF5aLmN37q4nbymxrmkdyLLWPU9OAWLL099XXcr /r4vjHOuGSN35OMSbFZS1Oqlm/28d0c+tzf1IRzoA95cguwOYnnLEFLnbm3ZF4KR/5TMRnBPXjrG+gIaBdWGCn9BSTf9G2j8WIjlYU1eiU90WToW8Oa9QEmd krZcX2wOV3BlaNd18/sAz+Du8LgJsrDnUqCYntC7EX0KcVEGpxqLsij67LCm+aMZKcKgJCOcwdgIjAKsznZyxudmvGPL3SxNlzFWk9F/2eY+qqtrZX0= X-Mailman-Approved-At: Wed, 23 May 2018 20:38:35 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 20:26:02 -0000 In message <20180523202228.GC58848@spindle.one-eyed-alien.net>, Brooks Davis wr ites: > > > --QRj9sO5tAVLaXnSD > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > On Thu, May 24, 2018 at 02:53:16AM +0700, Eugene Grosbein wrote: > > 24.05.2018 2:30, Cy Schubert wrote: > >=20 > > > Except for old computers and old software that segfaults on 64-bit, how= > many people still use i386? > > >=20 > > > Full disclosure: I'd like to see i386 deorbited before I retire. > >=20 > > Plese don't. I routinely use FreeBSD11/i386 for cheap VPS hosts having le= > ss than 2G memory > > because amd64 has noticeable overhead. I even have ZFS-only i386 VPS, her= > e is live example with 1G only: > >=20 > > Mem: 10M Active, 69M Inact, 230M Wired, 685M Free > > ARC: 75M Total, 1953K MFU, 31M MRU, 172K Anon, 592K Header, 42M Other > > 3500K Compressed, 29M Uncompressed, 8.61:1 Ratio > > Swap: 1024M Total, 1024M Free > >=20 > > The VPS has only 20G of disk space and ZFS compression gives > > compressratio 2.22x for ports, 2.51x for src, 2.29x for obj > > and 1.95x for installed i386 system plus other software and data. > > I think we're quite a ways from being ready to axe i386. > > For VPS applications, we should probably get x32 support in place which > should give us the best of both worlds. > > That said, we either need to rev the i386 ABI to use a 64-bit time_t or > kill it in the not to distant future or we risk embedded systems failing > in place in 2038. If we assume a 15 year life for most equipment to > fail electrically or mechanically that says FreeBSD 13 shouldn't support > the current i386 ABI. I think many of the Linux distros have already done this or are seriously discussing it. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed May 23 20:50:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB5B9EB1A55; Wed, 23 May 2018 20:50:10 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 997177E12C; Wed, 23 May 2018 20:50:10 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A93427E23; Wed, 23 May 2018 20:50:10 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NKoAe2064634; Wed, 23 May 2018 20:50:10 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NKoATG064633; Wed, 23 May 2018 20:50:10 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805232050.w4NKoATG064633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 23 May 2018 20:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334116 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 334116 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 20:50:11 -0000 Author: mmacy Date: Wed May 23 20:50:09 2018 New Revision: 334116 URL: https://svnweb.freebsd.org/changeset/base/334116 Log: udp: assign flowid to udp sockets round-robin On a 2x8x2 SKL this increases measured throughput with 64 netperf -H $DUT -t UDP_STREAM -- -m 1 from 590kpps to 1.1Mpps before: https://people.freebsd.org/~mmacy/2018.05.11/udpsender.svg after: https://people.freebsd.org/~mmacy/2018.05.11/udpsender2.svg Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Wed May 23 20:06:04 2018 (r334115) +++ head/sys/netinet/udp_usrreq.c Wed May 23 20:50:09 2018 (r334116) @@ -1565,6 +1565,7 @@ udp_abort(struct socket *so) static int udp_attach(struct socket *so, int proto, struct thread *td) { + static uint32_t udp_flowid; struct inpcb *inp; struct inpcbinfo *pcbinfo; int error; @@ -1585,6 +1586,8 @@ udp_attach(struct socket *so, int proto, struct thread inp = sotoinpcb(so); inp->inp_vflag |= INP_IPV4; inp->inp_ip_ttl = V_ip_defttl; + inp->inp_flowid = atomic_fetchadd_int(&udp_flowid, 1); + inp->inp_flowtype = M_HASHTYPE_OPAQUE; error = udp_newudpcb(inp); if (error) { From owner-svn-src-head@freebsd.org Wed May 23 21:02:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5BD9EB1F5C; Wed, 23 May 2018 21:02:17 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54A147EA42; Wed, 23 May 2018 21:02:17 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 357F11AF; Wed, 23 May 2018 21:02:17 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4NL2H4D073864; Wed, 23 May 2018 21:02:17 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NL2FaJ073854; Wed, 23 May 2018 21:02:15 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805232102.w4NL2FaJ073854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 23 May 2018 21:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334118 - in head/sys: compat/linprocfs compat/linux compat/linuxkpi/common/include/linux dev/mlx5/mlx5_ib dev/wtap net net/altq netinet netinet/netdump netinet6 netpfil/pf nfs ofed/dri... X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: compat/linprocfs compat/linux compat/linuxkpi/common/include/linux dev/mlx5/mlx5_ib dev/wtap net net/altq netinet netinet/netdump netinet6 netpfil/pf nfs ofed/drivers/infiniband/core X-SVN-Commit-Revision: 334118 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 21:02:18 -0000 Author: mmacy Date: Wed May 23 21:02:14 2018 New Revision: 334118 URL: https://svnweb.freebsd.org/changeset/base/334118 Log: UDP: further performance improvements on tx Cumulative throughput while running 64 netperf -H $DUT -t UDP_STREAM -- -m 1 on a 2x8x2 SKL went from 1.1Mpps to 2.5Mpps Single stream throughput increases from 910kpps to 1.18Mpps Baseline: https://people.freebsd.org/~mmacy/2018.05.11/udpsender2.svg - Protect read access to global ifnet list with epoch https://people.freebsd.org/~mmacy/2018.05.11/udpsender3.svg - Protect short lived ifaddr references with epoch https://people.freebsd.org/~mmacy/2018.05.11/udpsender4.svg - Convert if_afdata read lock path to epoch https://people.freebsd.org/~mmacy/2018.05.11/udpsender5.svg A fix for the inpcbhash contention is pending sufficient time on a canary at LLNW. Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15409 Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_ioctl.c head/sys/compat/linuxkpi/common/include/linux/inetdevice.h head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c head/sys/dev/wtap/if_wtap.c head/sys/net/altq/altq_subr.c head/sys/net/bridgestp.c head/sys/net/if.c head/sys/net/if_llatbl.c head/sys/net/if_llatbl.h head/sys/net/if_var.h head/sys/net/route.c head/sys/net/rtsock.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/in_var.h head/sys/netinet/ip_divert.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_output.c head/sys/netinet/netdump/netdump_client.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_bsd_addr.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/ip6_input.c head/sys/netinet6/nd6.c head/sys/netinet6/raw_ip6.c head/sys/netpfil/pf/pf_if.c head/sys/nfs/bootp_subr.c head/sys/nfs/nfs_diskless.c head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Wed May 23 20:55:01 2018 (r334117) +++ head/sys/compat/linprocfs/linprocfs.c Wed May 23 21:02:14 2018 (r334118) @@ -1138,7 +1138,7 @@ linux_ifname(struct ifnet *ifp, char *buffer, size_t b /* Determine the (relative) unit number for ethernet interfaces */ ethno = 0; - TAILQ_FOREACH(ifscan, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifscan, &V_ifnet, if_link) { if (ifscan == ifp) return (snprintf(buffer, buflen, "eth%d", ethno)); if (IFP_IS_ETH(ifscan)) @@ -1166,7 +1166,7 @@ linprocfs_donetdev(PFS_FILL_ARGS) CURVNET_SET(TD_TO_VNET(curthread)); IFNET_RLOCK(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { linux_ifname(ifp, ifname, sizeof ifname); sbuf_printf(sb, "%6.6s: ", ifname); sbuf_printf(sb, "%7ju %7ju %4ju %4ju %4lu %5lu %10lu %9ju ", Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Wed May 23 20:55:01 2018 (r334117) +++ head/sys/compat/linux/linux_ioctl.c Wed May 23 21:02:14 2018 (r334118) @@ -2150,7 +2150,7 @@ ifname_linux_to_bsd(struct thread *td, const char *lxn is_eth = (len == 3 && !strncmp(lxname, "eth", len)) ? 1 : 0; CURVNET_SET(TD_TO_VNET(td)); IFNET_RLOCK(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { /* * Allow Linux programs to use FreeBSD names. Don't presume * we never have an interface named "eth", so don't make @@ -2188,7 +2188,7 @@ linux_ioctl_ifname(struct thread *td, struct l_ifreq * index = 1; /* ifr.ifr_ifindex starts from 1 */ ethno = 0; error = ENODEV; - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifr.ifr_ifindex == index) { if (IFP_IS_ETH(ifp)) snprintf(ifr.ifr_name, LINUX_IFNAMSIZ, @@ -2240,7 +2240,7 @@ linux_ifconf(struct thread *td, struct ifconf *uifc) if ((l_uintptr_t)ifc.ifc_buf == PTROUT(NULL)) { ifc.ifc_len = 0; IFNET_RLOCK(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { struct sockaddr *sa = ifa->ifa_addr; if (sa->sa_family == AF_INET) @@ -2271,7 +2271,7 @@ again: /* Return all AF_INET addresses of all interfaces */ IFNET_RLOCK(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { int addrs = 0; bzero(&ifr, sizeof(ifr)); Modified: head/sys/compat/linuxkpi/common/include/linux/inetdevice.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/inetdevice.h Wed May 23 20:55:01 2018 (r334117) +++ head/sys/compat/linuxkpi/common/include/linux/inetdevice.h Wed May 23 21:02:14 2018 (r334118) @@ -44,16 +44,17 @@ ip_dev_find(struct vnet *vnet, uint32_t addr) sin.sin_addr.s_addr = addr; sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; + NET_EPOCH_ENTER(); CURVNET_SET_QUIET(vnet); ifa = ifa_ifwithaddr((struct sockaddr *)&sin); CURVNET_RESTORE(); if (ifa) { ifp = ifa->ifa_ifp; if_ref(ifp); - ifa_free(ifa); } else { ifp = NULL; } + NET_EPOCH_EXIT(); return (ifp); } @@ -69,6 +70,7 @@ ip6_dev_find(struct vnet *vnet, struct in6_addr addr) sin6.sin6_addr = addr; sin6.sin6_len = sizeof(sin6); sin6.sin6_family = AF_INET6; + NET_EPOCH_ENTER(); CURVNET_SET_QUIET(vnet); if (IN6_IS_SCOPE_LINKLOCAL(&addr) || IN6_IS_ADDR_MC_INTFACELOCAL(&addr)) { @@ -85,8 +87,8 @@ ip6_dev_find(struct vnet *vnet, struct in6_addr addr) if (ifa != NULL) { ifp = ifa->ifa_ifp; if_ref(ifp); - ifa_free(ifa); } + NET_EPOCH_EXIT(); CURVNET_RESTORE(); return (ifp); } Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed May 23 20:55:01 2018 (r334117) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed May 23 21:02:14 2018 (r334118) @@ -2771,7 +2771,7 @@ static int mlx5_enable_roce(struct mlx5_ib_dev *dev) VNET_FOREACH(vnet_iter) { IFNET_RLOCK(); CURVNET_SET_QUIET(vnet_iter); - TAILQ_FOREACH(idev, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(idev, &V_ifnet, if_link) { /* check if network interface belongs to mlx5en */ if (!mlx5_netdev_match(idev, dev->mdev, "mce")) continue; Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Wed May 23 20:55:01 2018 (r334117) +++ head/sys/dev/wtap/if_wtap.c Wed May 23 21:02:14 2018 (r334118) @@ -108,7 +108,7 @@ wtap_node_write(struct cdev *dev, struct uio *uio, int CURVNET_SET(TD_TO_VNET(curthread)); IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { printf("ifp->if_xname = %s\n", ifp->if_xname); if(strcmp(devtoname(dev), ifp->if_xname) == 0){ printf("found match, correspoding wtap = %s\n", Modified: head/sys/net/altq/altq_subr.c ============================================================================== --- head/sys/net/altq/altq_subr.c Wed May 23 20:55:01 2018 (r334117) +++ head/sys/net/altq/altq_subr.c Wed May 23 21:02:14 2018 (r334118) @@ -434,8 +434,8 @@ tbr_timeout(arg) VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_link)) { + for (ifp = CK_STAILQ_FIRST(&V_ifnet); ifp; + ifp = CK_STAILQ_NEXT(ifp, if_link)) { /* read from if_snd unlocked */ if (!TBR_IS_ENABLED(&ifp->if_snd)) continue; Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Wed May 23 20:55:01 2018 (r334117) +++ head/sys/net/bridgestp.c Wed May 23 21:02:14 2018 (r334118) @@ -2043,7 +2043,7 @@ bstp_reinit(struct bstp_state *bs) * bridges in the same STP domain. */ IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_type != IFT_ETHER) continue; /* Not Ethernet */ Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed May 23 20:55:01 2018 (r334117) +++ head/sys/net/if.c Wed May 23 21:02:14 2018 (r334118) @@ -256,7 +256,7 @@ struct mbuf *(*tbr_dequeue_ptr)(struct ifaltq *, int) static void if_attachdomain(void *); static void if_attachdomain1(struct ifnet *); static int ifconf(u_long, caddr_t); -static void if_grow(void); +static void *if_grow(void); static void if_input_default(struct ifnet *, struct mbuf *); static int if_requestencap_default(struct ifnet *, struct if_encap_req *); static void if_route(struct ifnet *, int flag, int fam); @@ -345,9 +345,7 @@ ifnet_byindex(u_short idx) { struct ifnet *ifp; - IFNET_RLOCK_NOSLEEP(); ifp = ifnet_byindex_locked(idx); - IFNET_RUNLOCK_NOSLEEP(); return (ifp); } @@ -372,12 +370,11 @@ ifnet_byindex_ref(u_short idx) * failure. */ static u_short -ifindex_alloc(void) +ifindex_alloc(void **old) { u_short idx; IFNET_WLOCK_ASSERT(); -retry: /* * Try to find an empty slot below V_if_index. If we fail, take the * next slot. @@ -389,8 +386,8 @@ retry: /* Catch if_index overflow. */ if (idx >= V_if_indexlim) { - if_grow(); - goto retry; + *old = if_grow(); + return (USHRT_MAX); } if (idx > V_if_index) V_if_index = idx; @@ -419,23 +416,12 @@ ifindex_free(u_short idx) } static void -ifnet_setbyindex_locked(u_short idx, struct ifnet *ifp) +ifnet_setbyindex(u_short idx, struct ifnet *ifp) { - IFNET_WLOCK_ASSERT(); - V_ifindex_table[idx] = ifp; } -static void -ifnet_setbyindex(u_short idx, struct ifnet *ifp) -{ - - IFNET_WLOCK(); - ifnet_setbyindex_locked(idx, ifp); - IFNET_WUNLOCK(); -} - struct ifaddr * ifaddr_byindex(u_short idx) { @@ -460,12 +446,15 @@ ifaddr_byindex(u_short idx) static void vnet_if_init(const void *unused __unused) { + void *old; - TAILQ_INIT(&V_ifnet); - TAILQ_INIT(&V_ifg_head); + CK_STAILQ_INIT(&V_ifnet); + CK_STAILQ_INIT(&V_ifg_head); IFNET_WLOCK(); - if_grow(); /* create initial table */ + old = if_grow(); /* create initial table */ IFNET_WUNLOCK(); + epoch_wait_preempt(net_epoch_preempt); + free(old, M_IFNET); vnet_if_clone_init(); } VNET_SYSINIT(vnet_if_init, SI_SUB_INIT_IF, SI_ORDER_SECOND, vnet_if_init, @@ -476,9 +465,9 @@ static void vnet_if_uninit(const void *unused __unused) { - VNET_ASSERT(TAILQ_EMPTY(&V_ifnet), ("%s:%d tailq &V_ifnet=%p " + VNET_ASSERT(CK_STAILQ_EMPTY(&V_ifnet), ("%s:%d tailq &V_ifnet=%p " "not empty", __func__, __LINE__, &V_ifnet)); - VNET_ASSERT(TAILQ_EMPTY(&V_ifg_head), ("%s:%d tailq &V_ifg_head=%p " + VNET_ASSERT(CK_STAILQ_EMPTY(&V_ifg_head), ("%s:%d tailq &V_ifg_head=%p " "not empty", __func__, __LINE__, &V_ifg_head)); free((caddr_t)V_ifindex_table, M_IFNET); @@ -492,7 +481,7 @@ vnet_if_return(const void *unused __unused) struct ifnet *ifp, *nifp; /* Return all inherited interfaces to their parent vnets. */ - TAILQ_FOREACH_SAFE(ifp, &V_ifnet, if_link, nifp) { + CK_STAILQ_FOREACH_SAFE(ifp, &V_ifnet, if_link, nifp) { if (ifp->if_home_vnet != ifp->if_vnet) if_vmove(ifp, ifp->if_home_vnet); } @@ -501,13 +490,16 @@ VNET_SYSUNINIT(vnet_if_return, SI_SUB_VNET_DONE, SI_OR vnet_if_return, NULL); #endif -static void + +static void * if_grow(void) { int oldlim; u_int n; struct ifnet **e; + void *old; + old = NULL; IFNET_WLOCK_ASSERT(); oldlim = V_if_indexlim; IFNET_WUNLOCK(); @@ -516,14 +508,15 @@ if_grow(void) IFNET_WLOCK(); if (V_if_indexlim != oldlim) { free(e, M_IFNET); - return; + return (NULL); } if (V_ifindex_table != NULL) { memcpy((caddr_t)e, (caddr_t)V_ifindex_table, n/2); - free((caddr_t)V_ifindex_table, M_IFNET); + old = V_ifindex_table; } V_if_indexlim <<= 1; V_ifindex_table = e; + return (old); } /* @@ -536,11 +529,19 @@ if_alloc(u_char type) { struct ifnet *ifp; u_short idx; + void *old; ifp = malloc(sizeof(struct ifnet), M_IFNET, M_WAITOK|M_ZERO); + restart: IFNET_WLOCK(); - idx = ifindex_alloc(); - ifnet_setbyindex_locked(idx, IFNET_HOLD); + idx = ifindex_alloc(&old); + if (__predict_false(idx == USHRT_MAX)) { + IFNET_WUNLOCK(); + epoch_wait_preempt(net_epoch_preempt); + free(old, M_IFNET); + goto restart; + } + ifnet_setbyindex(idx, IFNET_HOLD); IFNET_WUNLOCK(); ifp->if_index = idx; ifp->if_type = type; @@ -563,7 +564,7 @@ if_alloc(u_char type) IF_AFDATA_LOCK_INIT(ifp); CK_STAILQ_INIT(&ifp->if_addrhead); CK_STAILQ_INIT(&ifp->if_multiaddrs); - TAILQ_INIT(&ifp->if_groups); + CK_STAILQ_INIT(&ifp->if_groups); #ifdef MAC mac_ifnet_init(ifp); #endif @@ -609,6 +610,15 @@ if_free_internal(struct ifnet *ifp) free(ifp, M_IFNET); } +static void +if_destroy(epoch_context_t ctx) +{ + struct ifnet *ifp; + + ifp = __containerof(ctx, struct ifnet, if_epoch_ctx); + if_free_internal(ifp); +} + /* * Deregister an interface and free the associated storage. */ @@ -627,7 +637,7 @@ if_free(struct ifnet *ifp) IFNET_WUNLOCK(); if (refcount_release(&ifp->if_refcount)) - if_free_internal(ifp); + epoch_call(net_epoch_preempt, &ifp->if_epoch_ctx, if_destroy); CURVNET_RESTORE(); } @@ -650,7 +660,7 @@ if_rele(struct ifnet *ifp) if (!refcount_release(&ifp->if_refcount)) return; - if_free_internal(ifp); + epoch_call(net_epoch_preempt, &ifp->if_epoch_ctx, if_destroy); } void @@ -883,7 +893,7 @@ if_attach_internal(struct ifnet *ifp, int vmove, struc #endif IFNET_WLOCK(); - TAILQ_INSERT_TAIL(&V_ifnet, ifp, if_link); + CK_STAILQ_INSERT_TAIL(&V_ifnet, ifp, if_link); #ifdef VIMAGE curvnet->vnet_ifcnt++; #endif @@ -915,7 +925,7 @@ if_attachdomain(void *dummy) { struct ifnet *ifp; - TAILQ_FOREACH(ifp, &V_ifnet, if_link) + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) if_attachdomain1(ifp); } SYSINIT(domainifattach, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_SECOND, @@ -1050,9 +1060,9 @@ if_detach_internal(struct ifnet *ifp, int vmove, struc ifp->if_vnet->vnet_state < SI_SUB_VNET_DONE) ? 1 : 0; #endif IFNET_WLOCK(); - TAILQ_FOREACH(iter, &V_ifnet, if_link) + CK_STAILQ_FOREACH(iter, &V_ifnet, if_link) if (iter == ifp) { - TAILQ_REMOVE(&V_ifnet, ifp, if_link); + CK_STAILQ_REMOVE(&V_ifnet, ifp, ifnet, if_link); found = 1; break; } @@ -1080,7 +1090,7 @@ if_detach_internal(struct ifnet *ifp, int vmove, struc #ifdef VIMAGE curvnet->vnet_ifcnt--; #endif - + epoch_wait_preempt(net_epoch_preempt); /* * In any case (destroy or vmove) detach us from the groups * and remove/wait for pending events on the taskq. @@ -1220,6 +1230,7 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet) { struct if_clone *ifc; u_int bif_dlt, bif_hdrlen; + void *old; int rc; /* @@ -1260,10 +1271,16 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet) * Switch to the context of the target vnet. */ CURVNET_SET_QUIET(new_vnet); - + restart: IFNET_WLOCK(); - ifp->if_index = ifindex_alloc(); - ifnet_setbyindex_locked(ifp->if_index, ifp); + ifp->if_index = ifindex_alloc(&old); + if (__predict_false(ifp->if_index == USHRT_MAX)) { + IFNET_WUNLOCK(); + epoch_wait_preempt(net_epoch_preempt); + free(old, M_IFNET); + goto restart; + } + ifnet_setbyindex(ifp->if_index, ifp); IFNET_WUNLOCK(); if_attach_internal(ifp, 1, ifc); @@ -1400,7 +1417,7 @@ if_addgroup(struct ifnet *ifp, const char *groupname) return (EINVAL); IFNET_WLOCK(); - TAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) + CK_STAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) if (!strcmp(ifgl->ifgl_group->ifg_group, groupname)) { IFNET_WUNLOCK(); return (EEXIST); @@ -1419,7 +1436,7 @@ if_addgroup(struct ifnet *ifp, const char *groupname) return (ENOMEM); } - TAILQ_FOREACH(ifg, &V_ifg_head, ifg_next) + CK_STAILQ_FOREACH(ifg, &V_ifg_head, ifg_next) if (!strcmp(ifg->ifg_group, groupname)) break; @@ -1433,8 +1450,8 @@ if_addgroup(struct ifnet *ifp, const char *groupname) } strlcpy(ifg->ifg_group, groupname, sizeof(ifg->ifg_group)); ifg->ifg_refcnt = 0; - TAILQ_INIT(&ifg->ifg_members); - TAILQ_INSERT_TAIL(&V_ifg_head, ifg, ifg_next); + CK_STAILQ_INIT(&ifg->ifg_members); + CK_STAILQ_INSERT_TAIL(&V_ifg_head, ifg, ifg_next); new = 1; } @@ -1443,8 +1460,8 @@ if_addgroup(struct ifnet *ifp, const char *groupname) ifgm->ifgm_ifp = ifp; IF_ADDR_WLOCK(ifp); - TAILQ_INSERT_TAIL(&ifg->ifg_members, ifgm, ifgm_next); - TAILQ_INSERT_TAIL(&ifp->if_groups, ifgl, ifgl_next); + CK_STAILQ_INSERT_TAIL(&ifg->ifg_members, ifgm, ifgm_next); + CK_STAILQ_INSERT_TAIL(&ifp->if_groups, ifgl, ifgl_next); IF_ADDR_WUNLOCK(ifp); IFNET_WUNLOCK(); @@ -1464,9 +1481,10 @@ if_delgroup(struct ifnet *ifp, const char *groupname) { struct ifg_list *ifgl; struct ifg_member *ifgm; + int freeifgl; IFNET_WLOCK(); - TAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) + CK_STAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) if (!strcmp(ifgl->ifgl_group->ifg_group, groupname)) break; if (ifgl == NULL) { @@ -1474,27 +1492,30 @@ if_delgroup(struct ifnet *ifp, const char *groupname) return (ENOENT); } + freeifgl = 0; IF_ADDR_WLOCK(ifp); - TAILQ_REMOVE(&ifp->if_groups, ifgl, ifgl_next); + CK_STAILQ_REMOVE(&ifp->if_groups, ifgl, ifg_list, ifgl_next); IF_ADDR_WUNLOCK(ifp); - TAILQ_FOREACH(ifgm, &ifgl->ifgl_group->ifg_members, ifgm_next) + CK_STAILQ_FOREACH(ifgm, &ifgl->ifgl_group->ifg_members, ifgm_next) if (ifgm->ifgm_ifp == ifp) break; - if (ifgm != NULL) { - TAILQ_REMOVE(&ifgl->ifgl_group->ifg_members, ifgm, ifgm_next); - free(ifgm, M_TEMP); - } + if (ifgm != NULL) + CK_STAILQ_REMOVE(&ifgl->ifgl_group->ifg_members, ifgm, ifg_member, ifgm_next); if (--ifgl->ifgl_group->ifg_refcnt == 0) { - TAILQ_REMOVE(&V_ifg_head, ifgl->ifgl_group, ifg_next); - IFNET_WUNLOCK(); + CK_STAILQ_REMOVE(&V_ifg_head, ifgl->ifgl_group, ifg_group, ifg_next); + freeifgl = 1; + } + IFNET_WUNLOCK(); + + epoch_wait_preempt(net_epoch_preempt); + if (freeifgl) { EVENTHANDLER_INVOKE(group_detach_event, ifgl->ifgl_group); free(ifgl->ifgl_group, M_TEMP); - } else - IFNET_WUNLOCK(); - + } + free(ifgm, M_TEMP); free(ifgl, M_TEMP); EVENTHANDLER_INVOKE(group_change_event, groupname); @@ -1511,38 +1532,38 @@ if_delgroups(struct ifnet *ifp) struct ifg_list *ifgl; struct ifg_member *ifgm; char groupname[IFNAMSIZ]; + int ifglfree; IFNET_WLOCK(); - while (!TAILQ_EMPTY(&ifp->if_groups)) { - ifgl = TAILQ_FIRST(&ifp->if_groups); + while (!CK_STAILQ_EMPTY(&ifp->if_groups)) { + ifgl = CK_STAILQ_FIRST(&ifp->if_groups); strlcpy(groupname, ifgl->ifgl_group->ifg_group, IFNAMSIZ); IF_ADDR_WLOCK(ifp); - TAILQ_REMOVE(&ifp->if_groups, ifgl, ifgl_next); + CK_STAILQ_REMOVE(&ifp->if_groups, ifgl, ifg_list, ifgl_next); IF_ADDR_WUNLOCK(ifp); - TAILQ_FOREACH(ifgm, &ifgl->ifgl_group->ifg_members, ifgm_next) + CK_STAILQ_FOREACH(ifgm, &ifgl->ifgl_group->ifg_members, ifgm_next) if (ifgm->ifgm_ifp == ifp) break; - if (ifgm != NULL) { - TAILQ_REMOVE(&ifgl->ifgl_group->ifg_members, ifgm, + if (ifgm != NULL) + CK_STAILQ_REMOVE(&ifgl->ifgl_group->ifg_members, ifgm, ifg_member, ifgm_next); - free(ifgm, M_TEMP); + ifglfree = 0; + if (--ifgl->ifgl_group->ifg_refcnt == 0) { + CK_STAILQ_REMOVE(&V_ifg_head, ifgl->ifgl_group, ifg_group, ifg_next); + ifglfree = 1; } - if (--ifgl->ifgl_group->ifg_refcnt == 0) { - TAILQ_REMOVE(&V_ifg_head, ifgl->ifgl_group, ifg_next); - IFNET_WUNLOCK(); + epoch_wait_preempt(net_epoch_preempt); + free(ifgm, M_TEMP); + if (ifglfree) { EVENTHANDLER_INVOKE(group_detach_event, - ifgl->ifgl_group); + ifgl->ifgl_group); free(ifgl->ifgl_group, M_TEMP); - } else - IFNET_WUNLOCK(); - - free(ifgl, M_TEMP); - + } EVENTHANDLER_INVOKE(group_change_event, groupname); IFNET_WLOCK(); @@ -1589,7 +1610,7 @@ if_getgroup(struct ifgroupreq *ifgr, struct ifnet *ifp if (ifgr->ifgr_len == 0) { IF_ADDR_RLOCK(ifp); - TAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) + CK_STAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) ifgr->ifgr_len += sizeof(struct ifg_req); IF_ADDR_RUNLOCK(ifp); return (0); @@ -1599,7 +1620,7 @@ if_getgroup(struct ifgroupreq *ifgr, struct ifnet *ifp ifgp = ifgr_groups_get(ifgr); /* XXX: wire */ IF_ADDR_RLOCK(ifp); - TAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) { + CK_STAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) { if (len < sizeof(ifgrq)) { IF_ADDR_RUNLOCK(ifp); return (EINVAL); @@ -1631,7 +1652,7 @@ if_getgroupmembers(struct ifgroupreq *ifgr) int len, error; IFNET_RLOCK(); - TAILQ_FOREACH(ifg, &V_ifg_head, ifg_next) + CK_STAILQ_FOREACH(ifg, &V_ifg_head, ifg_next) if (!strcmp(ifg->ifg_group, ifgr->ifgr_name)) break; if (ifg == NULL) { @@ -1640,7 +1661,7 @@ if_getgroupmembers(struct ifgroupreq *ifgr) } if (ifgr->ifgr_len == 0) { - TAILQ_FOREACH(ifgm, &ifg->ifg_members, ifgm_next) + CK_STAILQ_FOREACH(ifgm, &ifg->ifg_members, ifgm_next) ifgr->ifgr_len += sizeof(ifgrq); IFNET_RUNLOCK(); return (0); @@ -1648,7 +1669,7 @@ if_getgroupmembers(struct ifgroupreq *ifgr) len = ifgr->ifgr_len; ifgp = ifgr_groups_get(ifgr); - TAILQ_FOREACH(ifgm, &ifg->ifg_members, ifgm_next) { + CK_STAILQ_FOREACH(ifgm, &ifg->ifg_members, ifgm_next) { if (len < sizeof(ifgrq)) { IFNET_RUNLOCK(); return (EINVAL); @@ -1897,22 +1918,18 @@ ifa_switch_loopback_route(struct ifaddr *ifa, struct s * Locate an interface based on a complete address. */ /*ARGSUSED*/ -static struct ifaddr * -ifa_ifwithaddr_internal(const struct sockaddr *addr, int getref) +struct ifaddr * +ifa_ifwithaddr(const struct sockaddr *addr) { struct ifnet *ifp; struct ifaddr *ifa; - IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { - IF_ADDR_RLOCK(ifp); + MPASS(in_epoch()); + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != addr->sa_family) continue; if (sa_equal(addr, ifa->ifa_addr)) { - if (getref) - ifa_ref(ifa); - IF_ADDR_RUNLOCK(ifp); goto done; } /* IP6 doesn't have broadcast */ @@ -1920,32 +1937,24 @@ ifa_ifwithaddr_internal(const struct sockaddr *addr, i ifa->ifa_broadaddr && ifa->ifa_broadaddr->sa_len != 0 && sa_equal(ifa->ifa_broadaddr, addr)) { - if (getref) - ifa_ref(ifa); - IF_ADDR_RUNLOCK(ifp); goto done; } } - IF_ADDR_RUNLOCK(ifp); } ifa = NULL; done: - IFNET_RUNLOCK_NOSLEEP(); return (ifa); } -struct ifaddr * -ifa_ifwithaddr(const struct sockaddr *addr) -{ - - return (ifa_ifwithaddr_internal(addr, 1)); -} - int ifa_ifwithaddr_check(const struct sockaddr *addr) { + int rc; - return (ifa_ifwithaddr_internal(addr, 0) != NULL); + NET_EPOCH_ENTER(); + rc = (ifa_ifwithaddr(addr) != NULL); + NET_EPOCH_EXIT(); + return (rc); } /* @@ -1958,11 +1967,10 @@ ifa_ifwithbroadaddr(const struct sockaddr *addr, int f struct ifnet *ifp; struct ifaddr *ifa; - IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + MPASS(in_epoch()); + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if ((fibnum != RT_ALL_FIBS) && (ifp->if_fib != fibnum)) continue; - IF_ADDR_RLOCK(ifp); CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != addr->sa_family) continue; @@ -1970,16 +1978,12 @@ ifa_ifwithbroadaddr(const struct sockaddr *addr, int f ifa->ifa_broadaddr && ifa->ifa_broadaddr->sa_len != 0 && sa_equal(ifa->ifa_broadaddr, addr)) { - ifa_ref(ifa); - IF_ADDR_RUNLOCK(ifp); goto done; } } - IF_ADDR_RUNLOCK(ifp); } ifa = NULL; done: - IFNET_RUNLOCK_NOSLEEP(); return (ifa); } @@ -1993,28 +1997,23 @@ ifa_ifwithdstaddr(const struct sockaddr *addr, int fib struct ifnet *ifp; struct ifaddr *ifa; - IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + MPASS(in_epoch()); + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if ((ifp->if_flags & IFF_POINTOPOINT) == 0) continue; if ((fibnum != RT_ALL_FIBS) && (ifp->if_fib != fibnum)) continue; - IF_ADDR_RLOCK(ifp); CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != addr->sa_family) continue; if (ifa->ifa_dstaddr != NULL && sa_equal(addr, ifa->ifa_dstaddr)) { - ifa_ref(ifa); - IF_ADDR_RUNLOCK(ifp); goto done; } } - IF_ADDR_RUNLOCK(ifp); } ifa = NULL; done: - IFNET_RUNLOCK_NOSLEEP(); return (ifa); } @@ -2031,6 +2030,7 @@ ifa_ifwithnet(const struct sockaddr *addr, int ignore_ u_int af = addr->sa_family; const char *addr_data = addr->sa_data, *cplim; + MPASS(in_epoch()); /* * AF_LINK addresses can be looked up directly by their index number, * so do that if we can. @@ -2047,11 +2047,9 @@ ifa_ifwithnet(const struct sockaddr *addr, int ignore_ * on ifa_maybe once we find one, as we release the IF_ADDR_RLOCK() that * kept it stable when we move onto the next interface. */ - IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if ((fibnum != RT_ALL_FIBS) && (ifp->if_fib != fibnum)) continue; - IF_ADDR_RLOCK(ifp); CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { const char *cp, *cp2, *cp3; @@ -2069,7 +2067,6 @@ next: continue; */ if (ifa->ifa_dstaddr != NULL && sa_equal(addr, ifa->ifa_dstaddr)) { - ifa_ref(ifa); IF_ADDR_RUNLOCK(ifp); goto done; } @@ -2103,21 +2100,14 @@ next: continue; ifa_preferred(ifa_maybe, ifa) || rn_refines((caddr_t)ifa->ifa_netmask, (caddr_t)ifa_maybe->ifa_netmask)) { - if (ifa_maybe != NULL) - ifa_free(ifa_maybe); ifa_maybe = ifa; - ifa_ref(ifa_maybe); } } } - IF_ADDR_RUNLOCK(ifp); } ifa = ifa_maybe; ifa_maybe = NULL; done: - IFNET_RUNLOCK_NOSLEEP(); - if (ifa_maybe != NULL) - ifa_free(ifa_maybe); return (ifa); } @@ -2136,7 +2126,7 @@ ifaof_ifpforaddr(const struct sockaddr *addr, struct i if (af >= AF_MAX) return (NULL); - IF_ADDR_RLOCK(ifp); + MPASS(in_epoch()); CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != af) continue; @@ -2166,9 +2156,6 @@ ifaof_ifpforaddr(const struct sockaddr *addr, struct i } ifa = ifa_maybe; done: - if (ifa != NULL) - ifa_ref(ifa); - IF_ADDR_RUNLOCK(ifp); return (ifa); } @@ -2204,14 +2191,15 @@ link_rtrequest(int cmd, struct rtentry *rt, struct rt_ if (cmd != RTM_ADD || ((ifa = rt->rt_ifa) == NULL) || ((ifp = ifa->ifa_ifp) == NULL) || ((dst = rt_key(rt)) == NULL)) return; + NET_EPOCH_ENTER(); ifa = ifaof_ifpforaddr(dst, ifp); if (ifa) { oifa = rt->rt_ifa; rt->rt_ifa = ifa; - ifa_free(oifa); if (ifa->ifa_rtrequest && ifa->ifa_rtrequest != link_rtrequest) ifa->ifa_rtrequest(cmd, rt, info); } + NET_EPOCH_EXIT(); } struct sockaddr_dl * @@ -2414,7 +2402,7 @@ ifunit_ref(const char *name) struct ifnet *ifp; IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (strncmp(name, ifp->if_xname, IFNAMSIZ) == 0 && !(ifp->if_flags & IFF_DYING)) break; @@ -2431,7 +2419,7 @@ ifunit(const char *name) struct ifnet *ifp; IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (strncmp(name, ifp->if_xname, IFNAMSIZ) == 0) break; } @@ -3256,7 +3244,7 @@ again: valid_len = 0; IFNET_RLOCK(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { int addrs; /* @@ -3609,7 +3597,7 @@ if_delmulti(struct ifnet *ifp, struct sockaddr *sa) struct ifnet *oifp; IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(oifp, &V_ifnet, if_link) + CK_STAILQ_FOREACH(oifp, &V_ifnet, if_link) if (ifp == oifp) break; if (ifp != oifp) @@ -3683,7 +3671,7 @@ if_delmulti_ifma_flags(struct ifmultiaddr *ifma, int f struct ifnet *oifp; IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(oifp, &V_ifnet, if_link) + CK_STAILQ_FOREACH(oifp, &V_ifnet, if_link) if (ifp == oifp) break; if (ifp != oifp) { @@ -3810,23 +3798,24 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, struct sockaddr_dl *sdl; struct ifaddr *ifa; struct ifreq ifr; + int rc; - IF_ADDR_RLOCK(ifp); + rc = 0; + NET_EPOCH_ENTER(); ifa = ifp->if_addr; if (ifa == NULL) { - IF_ADDR_RUNLOCK(ifp); - return (EINVAL); + rc = EINVAL; + goto out; } - ifa_ref(ifa); - IF_ADDR_RUNLOCK(ifp); + sdl = (struct sockaddr_dl *)ifa->ifa_addr; if (sdl == NULL) { - ifa_free(ifa); - return (EINVAL); + rc = EINVAL; + goto out; } if (len != sdl->sdl_alen) { /* don't allow length to change */ - ifa_free(ifa); - return (EINVAL); + rc = EINVAL; + goto out; } switch (ifp->if_type) { case IFT_ETHER: @@ -3835,11 +3824,10 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, case IFT_BRIDGE: case IFT_IEEE8023ADLAG: bcopy(lladdr, LLADDR(sdl), len); - ifa_free(ifa); break; default: - ifa_free(ifa); - return (ENODEV); + rc = ENODEV; + goto out; } /* @@ -3860,7 +3848,9 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, } } EVENTHANDLER_INVOKE(iflladdr_event, ifp); - return (0); + out: + NET_EPOCH_EXIT(); + return (rc); } /* Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Wed May 23 20:55:01 2018 (r334117) +++ head/sys/net/if_llatbl.c Wed May 23 21:02:14 2018 (r334118) @@ -146,7 +146,7 @@ htable_foreach_lle(struct lltable *llt, llt_foreach_cb error = 0; for (i = 0; i < llt->llt_hsize; i++) { - LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { + CK_LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { error = f(llt, lle, farg); if (error != 0) break; @@ -173,7 +173,7 @@ htable_link_entry(struct lltable *llt, struct llentry lle->lle_tbl = llt; lle->lle_head = lleh; lle->la_flags |= LLE_LINKED; - LIST_INSERT_HEAD(lleh, lle, lle_next); + CK_LIST_INSERT_HEAD(lleh, lle, lle_next); } static void @@ -182,7 +182,7 @@ htable_unlink_entry(struct llentry *lle) if ((lle->la_flags & LLE_LINKED) != 0) { IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp); - LIST_REMOVE(lle, lle_next); + CK_LIST_REMOVE(lle, lle_next); lle->la_flags &= ~(LLE_VALID | LLE_LINKED); #if 0 lle->lle_tbl = NULL; @@ -224,7 +224,7 @@ htable_prefix_free(struct lltable *llt, const struct s pmd.addr = addr; pmd.mask = mask; pmd.flags = flags; - LIST_INIT(&pmd.dchain); + CK_LIST_INIT(&pmd.dchain); IF_AFDATA_WLOCK(llt->llt_ifp); /* Push matching lles to chain */ @@ -514,7 +514,7 @@ lltable_free(struct lltable *llt) lltable_unlink(llt); - LIST_INIT(&dchain); + CK_LIST_INIT(&dchain); IF_AFDATA_WLOCK(llt->llt_ifp); /* Push all lles to @dchain */ lltable_foreach_lle(llt, lltable_free_cb, &dchain); @@ -544,7 +544,7 @@ lltable_drain(int af) continue; for (i=0; i < llt->llt_hsize; i++) { - LIST_FOREACH(lle, &llt->lle_head[i], lle_next) { + CK_LIST_FOREACH(lle, &llt->lle_head[i], lle_next) { LLE_WLOCK(lle); if (lle->la_hold) { m_freem(lle->la_hold); @@ -620,7 +620,7 @@ lltable_allocate_htbl(uint32_t hsize) M_LLTABLE, M_WAITOK | M_ZERO); for (i = 0; i < llt->llt_hsize; i++) - LIST_INIT(&llt->lle_head[i]); + CK_LIST_INIT(&llt->lle_head[i]); /* Set some default callbacks */ llt->llt_link_entry = htable_link_entry; @@ -917,7 +917,7 @@ llatbl_llt_show(struct lltable *llt) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed May 23 21:25:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86528EE6677; Wed, 23 May 2018 21:25:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3825F7F61D; Wed, 23 May 2018 21:25:50 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14EA857E; Wed, 23 May 2018 21:25:50 +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 w4NLPnDW084707; Wed, 23 May 2018 21:25:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NLPnGB084704; Wed, 23 May 2018 21:25:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805232125.w4NLPnGB084704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 May 2018 21:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334119 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 334119 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 21:25:50 -0000 Author: kib Date: Wed May 23 21:25:49 2018 New Revision: 334119 URL: https://svnweb.freebsd.org/changeset/base/334119 Log: Style. Wording and reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D15054 Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Wed May 23 21:02:14 2018 (r334118) +++ head/sys/amd64/amd64/machdep.c Wed May 23 21:25:49 2018 (r334119) @@ -1985,6 +1985,7 @@ ptrace_single_step(struct thread *td) int ptrace_clear_single_step(struct thread *td) { + td->td_frame->tf_rflags &= ~PSL_T; return (0); } Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Wed May 23 21:02:14 2018 (r334118) +++ head/sys/i386/i386/machdep.c Wed May 23 21:25:49 2018 (r334119) @@ -2771,6 +2771,7 @@ ptrace_single_step(struct thread *td) int ptrace_clear_single_step(struct thread *td) { + td->td_frame->tf_eflags &= ~PSL_T; return (0); } From owner-svn-src-head@freebsd.org Wed May 23 21:26:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FA03EE670C; Wed, 23 May 2018 21:26:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 350B27F7A0; Wed, 23 May 2018 21:26:34 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 177D7590; Wed, 23 May 2018 21:26:34 +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 w4NLQXK4084776; Wed, 23 May 2018 21:26:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NLQXrc084775; Wed, 23 May 2018 21:26:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805232126.w4NLQXrc084775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 23 May 2018 21:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334120 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 334120 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 21:26:34 -0000 Author: emaste Date: Wed May 23 21:26:33 2018 New Revision: 334120 URL: https://svnweb.freebsd.org/changeset/base/334120 Log: Revert r334081 (-Wmain) as it broke the build on gcc architectures Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Wed May 23 21:25:49 2018 (r334119) +++ head/share/mk/bsd.sys.mk Wed May 23 21:26:33 2018 (r334120) @@ -28,7 +28,7 @@ CFLAGS+= -std=${CSTD} #CFLAGS+= -pedantic .if defined(WARNS) .if ${WARNS} >= 1 -CWARNFLAGS+= -Wsystem-headers -Wmain +CWARNFLAGS+= -Wsystem-headers .if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE}) CWARNFLAGS+= -Werror .endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE} From owner-svn-src-head@freebsd.org Wed May 23 21:26:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C466EE6749; Wed, 23 May 2018 21:26:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A82A7F88B; Wed, 23 May 2018 21:26:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0ADFC591; Wed, 23 May 2018 21:26:42 +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 w4NLQf9e084826; Wed, 23 May 2018 21:26:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NLQfgm084825; Wed, 23 May 2018 21:26:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805232126.w4NLQfgm084825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 May 2018 21:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334121 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 334121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 21:26:42 -0000 Author: kib Date: Wed May 23 21:26:41 2018 New Revision: 334121 URL: https://svnweb.freebsd.org/changeset/base/334121 Log: Stop obliterating actual exception type for emulated traps from vm86. Wording and reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D15054 Modified: head/sys/i386/i386/trap.c Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Wed May 23 21:26:33 2018 (r334120) +++ head/sys/i386/i386/trap.c Wed May 23 21:26:41 2018 (r334121) @@ -357,7 +357,6 @@ user_trctrap_out: if (frame->tf_eflags & PSL_VM) { signo = vm86_emulate((struct vm86frame *)frame); if (signo == SIGTRAP) { - type = T_TRCTRAP; load_dr6(rdr6() | 0x4000); goto user_trctrap_out; } From owner-svn-src-head@freebsd.org Wed May 23 21:39:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08282EE6CFF; Wed, 23 May 2018 21:39:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A753780227; Wed, 23 May 2018 21:39:30 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84C15744; Wed, 23 May 2018 21:39:30 +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 w4NLdUYB090274; Wed, 23 May 2018 21:39:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4NLdTV1090268; Wed, 23 May 2018 21:39:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805232139.w4NLdTV1090268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 23 May 2018 21:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334122 - in head/sys: amd64/amd64 i386/i386 sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 sys X-SVN-Commit-Revision: 334122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 21:39:31 -0000 Author: kib Date: Wed May 23 21:39:29 2018 New Revision: 334122 URL: https://svnweb.freebsd.org/changeset/base/334122 Log: x86: stop unconditionally clearing PSL_T on the trace trap. We certainly should clear PSL_T when calling the SIGTRAP signal handler, which is already done by all x86 sendsig(9) ABI code. On the other hand, there is no obvious reason why PSL_T needs to be cleared when returning from the signal handler. For instance, Linux allows userspace to set PSL_T and keep tracing enabled for the desired period. There are userspace programs which would use PSL_T if we make it possible, for instance sbcl. Remember if PSL_T was set by PT_STEP or PT_SETSTEP by mean of TDB_STEP flag, and only clear it when the flag is set. Discussed with: Ali Mashtizadeh Reviewed by: jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D15054 Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/trap.c head/sys/i386/i386/machdep.c head/sys/i386/i386/trap.c head/sys/sys/proc.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Wed May 23 21:26:41 2018 (r334121) +++ head/sys/amd64/amd64/machdep.c Wed May 23 21:39:29 2018 (r334122) @@ -1978,7 +1978,12 @@ ptrace_set_pc(struct thread *td, unsigned long addr) int ptrace_single_step(struct thread *td) { - td->td_frame->tf_rflags |= PSL_T; + + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + if ((td->td_frame->tf_rflags & PSL_T) == 0) { + td->td_frame->tf_rflags |= PSL_T; + td->td_dbgflags |= TDB_STEP; + } return (0); } @@ -1986,7 +1991,9 @@ int ptrace_clear_single_step(struct thread *td) { + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); td->td_frame->tf_rflags &= ~PSL_T; + td->td_dbgflags &= ~TDB_STEP; return (0); } Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Wed May 23 21:26:41 2018 (r334121) +++ head/sys/amd64/amd64/trap.c Wed May 23 21:39:29 2018 (r334122) @@ -285,8 +285,14 @@ trap(struct trapframe *frame) signo = SIGTRAP; ucode = TRAP_TRACE; dr6 = rdr6(); - if (dr6 & DBREG_DR6_BS) - frame->tf_rflags &= ~PSL_T; + if ((dr6 & DBREG_DR6_BS) != 0) { + PROC_LOCK(td->td_proc); + if ((td->td_dbgflags & TDB_STEP) != 0) { + td->td_frame->tf_rflags &= ~PSL_T; + td->td_dbgflags &= ~TDB_STEP; + } + PROC_UNLOCK(td->td_proc); + } break; case T_ARITHTRAP: /* arithmetic trap */ Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Wed May 23 21:26:41 2018 (r334121) +++ head/sys/i386/i386/machdep.c Wed May 23 21:39:29 2018 (r334122) @@ -2764,7 +2764,12 @@ ptrace_set_pc(struct thread *td, u_long addr) int ptrace_single_step(struct thread *td) { - td->td_frame->tf_eflags |= PSL_T; + + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + if ((td->td_frame->tf_eflags & PSL_T) == 0) { + td->td_frame->tf_eflags |= PSL_T; + td->td_dbgflags |= TDB_STEP; + } return (0); } @@ -2772,7 +2777,9 @@ int ptrace_clear_single_step(struct thread *td) { + PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); td->td_frame->tf_eflags &= ~PSL_T; + td->td_dbgflags &= ~TDB_STEP; return (0); } Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Wed May 23 21:26:41 2018 (r334121) +++ head/sys/i386/i386/trap.c Wed May 23 21:39:29 2018 (r334122) @@ -337,8 +337,14 @@ user_trctrap_out: signo = SIGTRAP; ucode = TRAP_TRACE; dr6 = rdr6(); - if (dr6 & DBREG_DR6_BS) - frame->tf_eflags &= ~PSL_T; + if ((dr6 & DBREG_DR6_BS) != 0) { + PROC_LOCK(td->td_proc); + if ((td->td_dbgflags & TDB_STEP) != 0) { + td->td_frame->tf_eflags &= ~PSL_T; + td->td_dbgflags &= ~TDB_STEP; + } + PROC_UNLOCK(td->td_proc); + } break; case T_ARITHTRAP: /* arithmetic trap */ Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed May 23 21:26:41 2018 (r334121) +++ head/sys/sys/proc.h Wed May 23 21:39:29 2018 (r334122) @@ -465,6 +465,7 @@ do { \ #define TDB_EXIT 0x00000400 /* Exiting LWP indicator for ptrace() */ #define TDB_VFORK 0x00000800 /* vfork indicator for ptrace() */ #define TDB_FSTP 0x00001000 /* The thread is PT_ATTACH leader */ +#define TDB_STEP 0x00002000 /* (x86) PSL_T set for PT_STEP */ /* * "Private" flags kept in td_pflags: From owner-svn-src-head@freebsd.org Wed May 23 22:27:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AC49EEAB2C; Wed, 23 May 2018 22:27:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DF75882592; Wed, 23 May 2018 22:27:44 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w4NMRh1C085412 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 May 2018 15:27:43 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w4NMRhZQ085411; Wed, 23 May 2018 15:27:43 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 23 May 2018 15:27:43 -0700 From: Gleb Smirnoff To: Matt Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333860 - head/sys/kern Message-ID: <20180523222743.GU71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201805190510.w4J5AqfS054367@repo.freebsd.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 22:27:45 -0000 Hi, On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: M> Author: mmacy M> Date: Sat May 19 05:10:51 2018 M> New Revision: 333860 M> URL: https://svnweb.freebsd.org/changeset/base/333860 M> M> Log: M> sendfile: annotate unused value and ensure that npages is actually initialized M> M> Modified: M> head/sys/kern/kern_sendfile.c M> M> Modified: head/sys/kern/kern_sendfile.c M> ============================================================================== M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o M> } M> M> for (int i = 0; i < npages;) { M> - int j, a, count, rv; M> + int j, a, count, rv __unused; M> M> /* Skip valid pages. */ M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, M> @@ -688,6 +688,7 @@ retry_space: M> if (space == 0) { M> sfio = NULL; M> nios = 0; M> + npages = 0; M> goto prepend_header; M> } M> hdr_uio = NULL; This initialization is redundant and a compiler warning if exists is wrong. If we jump down to prepend_header with nios == 0, we won't ever use npages. -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Wed May 23 22:19:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16037EEA85D; Wed, 23 May 2018 22:19:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 29C5582156; Wed, 23 May 2018 22:19:07 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id Lc62f8Y4N5wO5Lc64fb0Kv; Wed, 23 May 2018 16:19:05 -0600 X-Authority-Analysis: v=2.3 cv=SJtsqtnH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=y3olD_i8AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=JPvq4AXnckQ8xl7YyHMA:9 a=CjuIK1q_8ugA:10 a=2GdgqtpztZvaxdPX1XqS:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 79008691; Wed, 23 May 2018 15:19:02 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4NMJ1tD067897; Wed, 23 May 2018 15:19:01 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4NMIxMA067892; Wed, 23 May 2018 15:18:59 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805232218.w4NMIxMA067892@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Brooks Davis cc: Eugene Grosbein , Cy Schubert , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Deorbiting i386 (was: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share) In-Reply-To: Message from Brooks Davis of "Wed, 23 May 2018 20:22:28 -0000." <20180523202228.GC58848@spindle.one-eyed-alien.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 23 May 2018 15:18:59 -0700 X-CMAE-Envelope: MS4wfDq2nE+tVzdlsgbJHLVwo0ePptL/v8QkUvUODcIo00mWcUilORugEftHBEjH/yNg2vF0f/uzr6EzqdCwOz1VymCVAQr0dzBgB+fV7LtJK6j3ZlbfpMfB 2Ph5dxLuTm+udUl1jv95+6MydhStrKFKiq0qZZsdI0yi97bViTcdMLLJIbC6505x3Z+Bdu69kPVshbCWKxuFe1ywtEOD2B/UwBiDXgIkE3YLe/p9uZQwtuTv 3Lx5HN/UoeD+YuC6gNK5qqwjNjW5/0110JcbFI1S5kB4wMMVsFDtiIVZajwRoXKKxmVesg3s6ZQ4LPMcMOz8aXU6z56J9EkQtirzpowm8h+m1PjU99oAX8yY xnmlnCs0TVnKpQeAOn1UUqntcLk8it3Z4bPMv0N4KZNsPQuMLLayEG/+sIWZ+dKsEUAuH5Ln+vjxXA13oU63bw3ZpGOux+k+NiVets306p0x5mov7bI= X-Mailman-Approved-At: Wed, 23 May 2018 22:43:53 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 22:19:09 -0000 In message <20180523202228.GC58848@spindle.one-eyed-alien.net>, Brooks Davis wr ites: > > > --QRj9sO5tAVLaXnSD > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > On Thu, May 24, 2018 at 02:53:16AM +0700, Eugene Grosbein wrote: > > 24.05.2018 2:30, Cy Schubert wrote: > >=20 > > > Except for old computers and old software that segfaults on 64-bit, how= > many people still use i386? > > >=20 > > > Full disclosure: I'd like to see i386 deorbited before I retire. > >=20 > > Plese don't. I routinely use FreeBSD11/i386 for cheap VPS hosts having le= > ss than 2G memory > > because amd64 has noticeable overhead. I even have ZFS-only i386 VPS, her= > e is live example with 1G only: > >=20 > > Mem: 10M Active, 69M Inact, 230M Wired, 685M Free > > ARC: 75M Total, 1953K MFU, 31M MRU, 172K Anon, 592K Header, 42M Other > > 3500K Compressed, 29M Uncompressed, 8.61:1 Ratio > > Swap: 1024M Total, 1024M Free > >=20 > > The VPS has only 20G of disk space and ZFS compression gives > > compressratio 2.22x for ports, 2.51x for src, 2.29x for obj > > and 1.95x for installed i386 system plus other software and data. > > I think we're quite a ways from being ready to axe i386. > > For VPS applications, we should probably get x32 support in place which > should give us the best of both worlds. > > That said, we either need to rev the i386 ABI to use a 64-bit time_t or > kill it in the not to distant future or we risk embedded systems failing > in place in 2038. If we assume a 15 year life for most equipment to > fail electrically or mechanically that says FreeBSD 13 shouldn't support > the current i386 ABI. Rereading this, I'm confused. FreeBSD 13? 2023? Either works for me, though 2023 is more reasonable and gives people more than enough time to migrate. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed May 23 22:52:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B87E4EEB5C8; Wed, 23 May 2018 22:52:43 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62CE6832C6; Wed, 23 May 2018 22:52:43 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 2AC1DB9C8; Wed, 23 May 2018 22:52:43 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f179.google.com with SMTP id r9-v6so7138iod.6; Wed, 23 May 2018 15:52:43 -0700 (PDT) X-Gm-Message-State: ALKqPwfVJl4EoNCBSQPbkCwaelEn3+KlWylmLluObM9bwbdpbTN8WCGG jQhpvIpVUdpZhEwMOeWuGy72irKNHvCq8MeHkdY= X-Google-Smtp-Source: AB8JxZrOrw6wZ2++QUa4i5fp+JTuRTjoElraCCTkrF6z8C0cRlsAcG6RatwF5PkVjaxa0Eb5vCRdGLOu7snkbR4DqQA= X-Received: by 2002:a6b:c5a:: with SMTP id w87-v6mr4582158ioi.132.1527115962498; Wed, 23 May 2018 15:52:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 15:52:42 -0700 (PDT) In-Reply-To: <20180523222743.GU71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> From: Matthew Macy Date: Wed, 23 May 2018 15:52:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Gleb Smirnoff Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 22:52:43 -0000 Talk to the gcc devs. The warning is useful even if there are false positives. On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: > Hi, > > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: > M> Author: mmacy > M> Date: Sat May 19 05:10:51 2018 > M> New Revision: 333860 > M> URL: https://svnweb.freebsd.org/changeset/base/333860 > M> > M> Log: > M> sendfile: annotate unused value and ensure that npages is actually initialized > M> > M> Modified: > M> head/sys/kern/kern_sendfile.c > M> > M> Modified: head/sys/kern/kern_sendfile.c > M> ============================================================================== > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o > M> } > M> > M> for (int i = 0; i < npages;) { > M> - int j, a, count, rv; > M> + int j, a, count, rv __unused; > M> > M> /* Skip valid pages. */ > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, > M> @@ -688,6 +688,7 @@ retry_space: > M> if (space == 0) { > M> sfio = NULL; > M> nios = 0; > M> + npages = 0; > M> goto prepend_header; > M> } > M> hdr_uio = NULL; > > This initialization is redundant and a compiler warning if exists is wrong. > > If we jump down to prepend_header with nios == 0, we won't ever use npages. > > -- > Gleb Smirnoff From owner-svn-src-head@freebsd.org Wed May 23 22:57:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5344EEB7BB; Wed, 23 May 2018 22:57:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 53D4A83475; Wed, 23 May 2018 22:57:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w4NMvTfP085558 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 May 2018 15:57:29 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w4NMvTsV085557; Wed, 23 May 2018 15:57:29 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 23 May 2018 15:57:29 -0700 From: Gleb Smirnoff To: Matthew Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333860 - head/sys/kern Message-ID: <20180523225729.GV71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 22:57:31 -0000 The initialization isn't useful. On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: M> Talk to the gcc devs. The warning is useful even if there are false positives. M> M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: M> > Hi, M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: M> > M> Author: mmacy M> > M> Date: Sat May 19 05:10:51 2018 M> > M> New Revision: 333860 M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 M> > M> M> > M> Log: M> > M> sendfile: annotate unused value and ensure that npages is actually initialized M> > M> M> > M> Modified: M> > M> head/sys/kern/kern_sendfile.c M> > M> M> > M> Modified: head/sys/kern/kern_sendfile.c M> > M> ============================================================================== M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o M> > M> } M> > M> M> > M> for (int i = 0; i < npages;) { M> > M> - int j, a, count, rv; M> > M> + int j, a, count, rv __unused; M> > M> M> > M> /* Skip valid pages. */ M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, M> > M> @@ -688,6 +688,7 @@ retry_space: M> > M> if (space == 0) { M> > M> sfio = NULL; M> > M> nios = 0; M> > M> + npages = 0; M> > M> goto prepend_header; M> > M> } M> > M> hdr_uio = NULL; M> > M> > This initialization is redundant and a compiler warning if exists is wrong. M> > M> > If we jump down to prepend_header with nios == 0, we won't ever use npages. M> > M> > -- M> > Gleb Smirnoff -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Wed May 23 22:59:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7230FEEB886; Wed, 23 May 2018 22:59:35 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15DC9835FE; Wed, 23 May 2018 22:59:35 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id C994DB9CA; Wed, 23 May 2018 22:59:34 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f45.google.com with SMTP id 70-v6so31228ity.2; Wed, 23 May 2018 15:59:34 -0700 (PDT) X-Gm-Message-State: ALKqPwd402RKQgUSHeIj4YakROXGOytbvAQ8eZn8IfvAE9GxlzQwmB5M 6Hlf2nnmsx8mHQ8RjTlfkfVNY9Hyau7IH9jWuDc= X-Google-Smtp-Source: AB8JxZpNUch4xgqVeiwwesz6olKrvXswx/vsFKeKFXOy4irRK/iRtOdMB5RWXWyNnyKKaVzo/UFECH/0GjC214QCNfg= X-Received: by 2002:a24:5a85:: with SMTP id v127-v6mr7238660ita.128.1527116374275; Wed, 23 May 2018 15:59:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 15:59:33 -0700 (PDT) In-Reply-To: <20180523225729.GV71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> From: Matthew Macy Date: Wed, 23 May 2018 15:59:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Gleb Smirnoff Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 22:59:35 -0000 On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff wrote: > The initialization isn't useful. It silences a gcc warning. So yes it is. It's this exchange which is not useful. -M > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: > M> Talk to the gcc devs. The warning is useful even if there are false positives. > M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: > M> > Hi, > M> > > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: > M> > M> Author: mmacy > M> > M> Date: Sat May 19 05:10:51 2018 > M> > M> New Revision: 333860 > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 > M> > M> > M> > M> Log: > M> > M> sendfile: annotate unused value and ensure that npages is actually initialized > M> > M> > M> > M> Modified: > M> > M> head/sys/kern/kern_sendfile.c > M> > M> > M> > M> Modified: head/sys/kern/kern_sendfile.c > M> > M> ============================================================================== > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o > M> > M> } > M> > M> > M> > M> for (int i = 0; i < npages;) { > M> > M> - int j, a, count, rv; > M> > M> + int j, a, count, rv __unused; > M> > M> > M> > M> /* Skip valid pages. */ > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, > M> > M> @@ -688,6 +688,7 @@ retry_space: > M> > M> if (space == 0) { > M> > M> sfio = NULL; > M> > M> nios = 0; > M> > M> + npages = 0; > M> > M> goto prepend_header; > M> > M> } > M> > M> hdr_uio = NULL; > M> > > M> > This initialization is redundant and a compiler warning if exists is wrong. > M> > > M> > If we jump down to prepend_header with nios == 0, we won't ever use npages. > M> > > M> > -- > M> > Gleb Smirnoff > > -- > Gleb Smirnoff From owner-svn-src-head@freebsd.org Wed May 23 23:11:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B01FAEEBCEA; Wed, 23 May 2018 23:11:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 150A983CFE; Wed, 23 May 2018 23:11:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id C48FABBC1; Wed, 23 May 2018 23:11:15 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Matt Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334104 - in head/sys: netinet sys Date: Wed, 23 May 2018 11:52:23 -0700 Message-ID: <2281830.zrSQodBeDb@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201805231700.w4NH05hs047395@repo.freebsd.org> References: <201805231700.w4NH05hs047395@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 23:11:16 -0000 On Wednesday, May 23, 2018 05:00:05 PM Matt Macy wrote: > Author: mmacy > Date: Wed May 23 17:00:05 2018 > New Revision: 334104 > URL: https://svnweb.freebsd.org/changeset/base/334104 > > Log: > epoch: allow for conditionally asserting that the epoch context fields > are unused by zeroing on INVARIANTS builds Is M_ZERO really so bad that you need to make it conditional? I would probably have preferred something like 'M_ZERO_INVARIANTS' instead perhaps (or M_ZERO_EPOCH) that only controls M_ZERO and is still or'd with M_WAITOK or M_NOWAIT. -- John Baldwin From owner-svn-src-head@freebsd.org Wed May 23 23:11:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19A97EEBB92; Wed, 23 May 2018 23:11:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C279083CD5; Wed, 23 May 2018 23:11:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 8E766BBC0; Wed, 23 May 2018 23:11:14 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334073 - head Date: Wed, 23 May 2018 15:48:25 -0700 Message-ID: <7080153.TjCS0o8iqD@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <201805230409.w4N491iB057004@repo.freebsd.org> <3609973.viVQJQYxmB@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 23:11:15 -0000 On Wednesday, May 23, 2018 12:09:59 PM Eitan Adler wrote: > On 23 May 2018 at 09:27, John Baldwin wrote: > > On Wednesday, May 23, 2018 04:09:01 AM Eitan Adler wrote: > >> Author: eadler > >> Date: Wed May 23 04:09:01 2018 > >> New Revision: 334073 > >> URL: https://svnweb.freebsd.org/changeset/base/334073 > >> > >> Log: > >> README: Reduce the textdump; describe the project > >> > >> Rework the README to make it a little easier for new users. This is the > >> first file many will see when persuing the FreeBSD source code so > >> > >> - remove some of the text describes how to build. This is better covered > >> in the linked documentation. > >> - add a small blurb for what FreeBSD is. Some users might find this > >> document through features such as github search so they may not even > >> know what the project is > >> > >> generally, gear this file for the new, accidental, or casual user rather > >> than towards someone seeking fuller documentation. > >> > >> Modified: > >> head/README > >> head/README.md > >> > >> Modified: head/README > >> ============================================================================== > >> --- head/README Wed May 23 03:41:22 2018 (r334072) > >> +++ head/README Wed May 23 04:09:01 2018 (r334073) > >> @@ -2,35 +2,25 @@ This is the top level of the FreeBSD source directory. > >> - > >> -The kernel configuration files reside in the sys//conf > >> -sub-directory. GENERIC is the default configuration used in release builds. > >> -NOTES contains entries and documentation for all possible > >> -devices, not just those commonly used. > > > > I do think this paragraph is still useful as part of the Source Roadmap and > > not really part of the build instructions. > > I added a reference to sys//conf to the bottom of the > README.Adding something about NOTES might be helpful, but IMHO closer > to the build. Yes, but the directory doesn't tell you which file is the default kernel. I'm thinking in terms of a random person browsing the tree via github's web interface who doesn't know which files are which in which case I think this note was kind of useful. -- John Baldwin From owner-svn-src-head@freebsd.org Wed May 23 23:13:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D60A2EEBEAB; Wed, 23 May 2018 23:13:46 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8480B841F5; Wed, 23 May 2018 23:13:46 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4B912BBC2; Wed, 23 May 2018 23:13:46 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f41.google.com with SMTP id d10-v6so66079itj.1; Wed, 23 May 2018 16:13:46 -0700 (PDT) X-Gm-Message-State: ALKqPwffuAdAmSYsbkx8Dv3KM6ExXR+pzTMX5Lt0Y4bzotcE8/zMYkAq DUFYUstq8nC5NywAkQWLQUl0qVXQkaSuAigRqbA= X-Google-Smtp-Source: AB8JxZpy53l2AUtJ3BdGJiICY1MHUn2xekVxKocFe93Lnnts5WXb6mWTxcELxh0cn1a1bHNaVAieGo/yBAyO31y9uQk= X-Received: by 2002:a24:5b54:: with SMTP id g81-v6mr6986426itb.7.1527117225840; Wed, 23 May 2018 16:13:45 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 16:13:45 -0700 (PDT) In-Reply-To: <2281830.zrSQodBeDb@ralph.baldwin.cx> References: <201805231700.w4NH05hs047395@repo.freebsd.org> <2281830.zrSQodBeDb@ralph.baldwin.cx> From: Matthew Macy Date: Wed, 23 May 2018 16:13:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334104 - in head/sys: netinet sys To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 23:13:47 -0000 On Wed, May 23, 2018 at 11:52 AM, John Baldwin wrote: > On Wednesday, May 23, 2018 05:00:05 PM Matt Macy wrote: >> Author: mmacy >> Date: Wed May 23 17:00:05 2018 >> New Revision: 334104 >> URL: https://svnweb.freebsd.org/changeset/base/334104 >> >> Log: >> epoch: allow for conditionally asserting that the epoch context fields >> are unused by zeroing on INVARIANTS builds > > Is M_ZERO really so bad that you need to make it conditional? In this case not at all. It's only exercised by sysctl handlers. I'm mostly responding to an inquiry by jtl. However, gratuitous M_ZERO usage does have a cumulative adverse performance impact. > I would probably have preferred something like 'M_ZERO_INVARIANTS' > instead perhaps (or M_ZERO_EPOCH) that only controls M_ZERO and is > still or'd with M_WAITOK or M_NOWAIT. Yes. I like that better too. Thanks. -M From owner-svn-src-head@freebsd.org Wed May 23 23:54:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87045EEDED7 for ; Wed, 23 May 2018 23:54:55 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) Received: from sonic314-21.consmr.mail.ne1.yahoo.com (sonic314-21.consmr.mail.ne1.yahoo.com [66.163.189.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CB23865D9 for ; Wed, 23 May 2018 23:54:54 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) X-YMail-OSG: 91UxFrgVM1lmJwo62KIe4sAVP7EWPHAFmVhCxCLefeMVtY1u1YWEqTVxagbTkcB NZy2mJ8cYI9HMMtWQw3XxLrWt9IxtsghTEdrgSLE06GwCSJ.7jAE3vicZYWKiZ0SWp68o0_3ufoF 9sN4vpJTMQMUcx4VNuIXaO.FBEJ5e851NIrnoaCpF_GrP2kpToVz6ap0TAEsrzX8hsck4FEtN10S iWikWhCziYgpOHndqn9qZP1YxEfuisndMNPQ.s5oL7fjd2X53USaXeLVxD51SFnt6JqyvhS.3QUU kaCpz4cgh7VDCcPdADXST9ujenLDInRzSBnt.tLISYFbUiwKYwrxdIm9Lmp4XEQkzJ2QbO3EClXy B1MIu4te.48AHK6wUCHtVds_YTiztw9YIdfz7WeFQaqLHexyJyyO8bIPSo3mRqETY3vUd8U_Zqhh b8hbqBwdFFuGsXhhBJueoaYH4PMpiI684TKaasG__0utNlMLToWR9waO78qwsGjYuio2SWxLeM8i T23ZLuGADMrcqT1rC1MI8Nb73oKVXkBZnGiosd_a5TlSP4f5hPhtft_kEblibyCymqU2WFSn9fjf UZdUVCGWW9aBkw51V79y.H_UhGwW1nIXaY1ehUrCBXhPBDwKVhr6L9virdYVUDpIcZFm7W33LL6a 8UAEvAfJ7tW.xu_csad9tfJVIwBUikxo7Q7pfmundW2CeDI2TEA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Wed, 23 May 2018 23:54:53 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.25]) ([76.115.7.162]) by smtp411.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 82f9cb067b57876030591a4a0c9e7989; Wed, 23 May 2018 23:54:51 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: svn commit: r334089 - head/sbin/dumpon Message-Id: <9A6349FF-DC57-411C-97C8-0BB6FA8FA160@yahoo.com> Date: Wed, 23 May 2018 16:54:50 -0700 To: Ed Maste , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 23:54:55 -0000 Ed Maste emaste at freebsd.org wrote on Wed May 23 14:18:34 UTC 2018 : > On 23 May 2018 at 10:15, Rodney W. Grimes > wrote: > >> Author: eadler > >> Date: Wed May 23 10:45:32 2018 > >> New Revision: 334089 > >> URL: https://svnweb.freebsd.org/changeset/base/334089 > >> > >> Log: > >> dumpon: point to better kernel debug symbols. > >> ... > > > > You should of probably also included that fact that kgdb now must be = invoked > > /usr/libexec/kgdb, as it has been moved. >=20 > Rather, dumon should document installing the gdb port or package. I've had examples of needing kgdb but the system being unable to build ports because of what was wrong, including just after an update or install attempt of FreeBSD. I'd be cautious of completely removing references to /usr/libexec/kgdb vs. indicating its use as a last resort, such as when the alternatives are not available and can not readily be made available. Going in another direction . . . On at least one non-tier-1 architecture I've at least once had both kgdb's available but only /usr/libexec/kgdb would work. (I do not remember the details any more.) I'd be cautious of too much tied to tier-1 if some others (still) have such problems. (This last might be tied to my experiments with using clang to target powerpc family members and so might be outside the normal/supported form of building. I just do not remember at this point.) =3D=3D=3D Mark Millard marklmi26-fbsd at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu May 24 00:06:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31C88EEE650; Thu, 24 May 2018 00:06:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC56486A3D; Thu, 24 May 2018 00:06:55 +0000 (UTC) (envelope-from jhb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B732B1FC0; Thu, 24 May 2018 00:06:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O06tF9068306; Thu, 24 May 2018 00:06:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O06tUg068304; Thu, 24 May 2018 00:06:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201805240006.w4O06tUg068304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 24 May 2018 00:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334123 - head/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netgraph X-SVN-Commit-Revision: 334123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 00:06:56 -0000 Author: jhb Date: Thu May 24 00:06:55 2018 New Revision: 334123 URL: https://svnweb.freebsd.org/changeset/base/334123 Log: Catch up two more places to the V_ifnet change to a CK_STAILQ. Modified: head/sys/netgraph/ng_ether.c head/sys/netgraph/ng_gif.c Modified: head/sys/netgraph/ng_ether.c ============================================================================== --- head/sys/netgraph/ng_ether.c Wed May 23 21:39:29 2018 (r334122) +++ head/sys/netgraph/ng_ether.c Thu May 24 00:06:55 2018 (r334123) @@ -868,7 +868,7 @@ vnet_ng_ether_init(const void *unused) /* Create nodes for any already-existing Ethernet interfaces. */ IFNET_RLOCK(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_type == IFT_ETHER || ifp->if_type == IFT_L2VLAN) ng_ether_attach(ifp); Modified: head/sys/netgraph/ng_gif.c ============================================================================== --- head/sys/netgraph/ng_gif.c Wed May 23 21:39:29 2018 (r334122) +++ head/sys/netgraph/ng_gif.c Thu May 24 00:06:55 2018 (r334123) @@ -558,7 +558,7 @@ ng_gif_mod_event(module_t mod, int event, void *data) IFNET_RLOCK(); VNET_FOREACH(vnet_iter) { CURVNET_SET_QUIET(vnet_iter); /* XXX revisit quiet */ - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_type == IFT_GIF) ng_gif_attach(ifp); } From owner-svn-src-head@freebsd.org Thu May 24 00:40:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03B27EEEE8B; Thu, 24 May 2018 00:40:46 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81543878B5; Thu, 24 May 2018 00:40:45 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wm0-f44.google.com with SMTP id w194-v6so399399wmf.2; Wed, 23 May 2018 17:40:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wxl4fsD/YDHIPKLTMtftqDBw+z7cjFaFjc9i369FEZQ=; b=GB4593g9hTNRyjdhmKL1NTKwBm3PeqTch3z8E9LVxiTUeeoyQ+BU1c8OOJbdv5WFjp rCqm/iM5NbXec7sG1/YghDLqScuDm3lQE2LF7VfO9ZuER/jHP4ShL79wOTUjrxtgrqXx g1EHMaF+HXr0MgBOqelWV14hbx0SbAfoVk8zLYK1dvLkFmLq3DG/mh2IoFZT9LW1NmZQ XirYEu1ZR0ksO5eaBGkT6xK4KfK7JvcvMYNuhayZmiyZJTh14Yc/HO0dnxwqtnXY6SzJ bK6EiN2EDxwbuCceu+2eYPQrVhOw3JM2ezLhf35wDBBPWJv8YK3f8VD06kd6sCo0FoCK oZkQ== X-Gm-Message-State: ALKqPwepCRAlROKMNmMI/2EJjylmh4fvyBaQu3qsi3xHAWBnZfGfQ+34 /+KtMgDEFU/pJLWjKP5gO8I0ASAE X-Google-Smtp-Source: AB8JxZovX1hTshcNAgHLDlR9XNIjH2C5N2iej6G03sXFZuowDpiLNlooy2ptESsfO/hZJWLnnr34wg== X-Received: by 2002:a50:921c:: with SMTP id i28-v6mr9333761eda.27.1527122438405; Wed, 23 May 2018 17:40:38 -0700 (PDT) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com. [74.125.82.54]) by smtp.gmail.com with ESMTPSA id g11-v6sm10917175edg.64.2018.05.23.17.40.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 17:40:38 -0700 (PDT) Received: by mail-wm0-f54.google.com with SMTP id q4-v6so5331580wmq.1; Wed, 23 May 2018 17:40:37 -0700 (PDT) X-Received: by 2002:a1c:170f:: with SMTP id 15-v6mr5662726wmx.90.1527122437786; Wed, 23 May 2018 17:40:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:c504:0:0:0:0:0 with HTTP; Wed, 23 May 2018 17:40:37 -0700 (PDT) In-Reply-To: References: <201805231700.w4NH05hs047395@repo.freebsd.org> <2281830.zrSQodBeDb@ralph.baldwin.cx> From: "Jonathan T. Looney" Date: Wed, 23 May 2018 20:40:37 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334104 - in head/sys: netinet sys To: Matthew Macy Cc: John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 00:40:46 -0000 On Wed, May 23, 2018 at 7:13 PM, Matthew Macy wrote: > > On Wed, May 23, 2018 at 11:52 AM, John Baldwin wrote: > > On Wednesday, May 23, 2018 05:00:05 PM Matt Macy wrote: > >> Author: mmacy > >> Date: Wed May 23 17:00:05 2018 > >> New Revision: 334104 > >> URL: https://svnweb.freebsd.org/changeset/base/334104 > >> > >> Log: > >> epoch: allow for conditionally asserting that the epoch context fields > >> are unused by zeroing on INVARIANTS builds > > > > Is M_ZERO really so bad that you need to make it conditional? > > In this case not at all. It's only exercised by sysctl handlers. I'm > mostly responding to an inquiry by jtl. However, gratuitous M_ZERO > usage does have a cumulative adverse performance impact. I appreciate you making this change. And, I do think it is worth avoiding M_ZERO where it is unnecessary, for the reason you state. > > I would probably have preferred something like 'M_ZERO_INVARIANTS' > > instead perhaps (or M_ZERO_EPOCH) that only controls M_ZERO and is > > still or'd with M_WAITOK or M_NOWAIT. > > Yes. I like that better too. Thanks. Yes, that does seem better. Thanks! Jonathan From owner-svn-src-head@freebsd.org Thu May 24 01:03:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D5F8EEF6D3; Thu, 24 May 2018 01:03:32 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E50368617; Thu, 24 May 2018 01:03:32 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E37C6298B; Thu, 24 May 2018 01:03:31 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O13VSY098474; Thu, 24 May 2018 01:03:31 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O13V8Y098473; Thu, 24 May 2018 01:03:31 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240103.w4O13V8Y098473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 01:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334124 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 334124 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 01:03:32 -0000 Author: mmacy Date: Thu May 24 01:03:31 2018 New Revision: 334124 URL: https://svnweb.freebsd.org/changeset/base/334124 Log: malloc: Add flag for conditionally zeroing for INVARIANTS builds Modified: head/sys/sys/malloc.h Modified: head/sys/sys/malloc.h ============================================================================== --- head/sys/sys/malloc.h Thu May 24 00:06:55 2018 (r334123) +++ head/sys/sys/malloc.h Thu May 24 01:03:31 2018 (r334124) @@ -59,6 +59,13 @@ #define M_MAGIC 877983977 /* time when first defined :-) */ +#ifdef INVARIANTS +#define M_ZERO_INVARIANTS M_ZERO +#else +#define M_ZERO_INVARIANTS 0 +#endif + + /* * Two malloc type structures are present: malloc_type, which is used by a * type owner to declare the type, and malloc_type_internal, which holds From owner-svn-src-head@freebsd.org Thu May 24 01:04:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C35FEEF765; Thu, 24 May 2018 01:04:58 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CEA09687AB; Thu, 24 May 2018 01:04:57 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF2C62990; Thu, 24 May 2018 01:04:57 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O14vRU098573; Thu, 24 May 2018 01:04:57 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O14uCH098568; Thu, 24 May 2018 01:04:56 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240104.w4O14uCH098568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 01:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334125 - in head/sys: netinet sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: netinet sys X-SVN-Commit-Revision: 334125 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 01:04:58 -0000 Author: mmacy Date: Thu May 24 01:04:56 2018 New Revision: 334125 URL: https://svnweb.freebsd.org/changeset/base/334125 Log: convert allocations to INVARIANTS M_ZERO Modified: head/sys/netinet/ip_divert.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_subr.c head/sys/netinet/udp_usrreq.c head/sys/sys/epoch.h Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Thu May 24 01:03:31 2018 (r334124) +++ head/sys/netinet/ip_divert.c Thu May 24 01:04:56 2018 (r334125) @@ -672,7 +672,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS) if (error) return error; - il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO_INVARIANTS); inp_list = il->il_inp_list; INP_INFO_RLOCK(&V_divcbinfo); Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Thu May 24 01:03:31 2018 (r334124) +++ head/sys/netinet/raw_ip.c Thu May 24 01:04:56 2018 (r334125) @@ -1056,7 +1056,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) if (error) return (error); - il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO_INVARIANTS); inp_list = il->il_inp_list; INP_INFO_RLOCK(&V_ripcbinfo); Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu May 24 01:03:31 2018 (r334124) +++ head/sys/netinet/tcp_subr.c Thu May 24 01:04:56 2018 (r334125) @@ -2151,7 +2151,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (error) return (error); - il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO_INVARIANTS); inp_list = il->il_inp_list; INP_INFO_WLOCK(&V_tcbinfo); Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Thu May 24 01:03:31 2018 (r334124) +++ head/sys/netinet/udp_usrreq.c Thu May 24 01:04:56 2018 (r334125) @@ -874,7 +874,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) error = SYSCTL_OUT(req, &xig, sizeof xig); if (error) return (error); - il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_EPOCH_CALL_WAITOK); + il = malloc(sizeof(struct in_pcblist) + n * sizeof(struct inpcb *), M_TEMP, M_WAITOK|M_ZERO_INVARIANTS); inp_list = il->il_inp_list; INP_INFO_RLOCK(&V_udbinfo); Modified: head/sys/sys/epoch.h ============================================================================== --- head/sys/sys/epoch.h Thu May 24 01:03:31 2018 (r334124) +++ head/sys/sys/epoch.h Thu May 24 01:04:56 2018 (r334125) @@ -64,14 +64,6 @@ int in_epoch(void); DPCPU_DECLARE(int, epoch_cb_count); DPCPU_DECLARE(struct grouptask, epoch_cb_task); -#ifdef INVARIANTS -#define M_EPOCH_CALL_NOWAIT (M_NOWAIT|M_ZERO) -#define M_EPOCH_CALL_WAITOK (M_WAITOK|M_ZERO) -#else -#define M_EPOCH_CALL_NOWAIT M_NOWAIT -#define M_EPOCH_CALL_WAITOK M_WAITOK -#endif - static __inline void epoch_enter_preempt(epoch_t epoch) { From owner-svn-src-head@freebsd.org Thu May 24 01:12:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F2BCEEFEEB; Thu, 24 May 2018 01:12:07 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1615268D2F; Thu, 24 May 2018 01:12:07 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB65C2B1C; Thu, 24 May 2018 01:12:06 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O1C60A000614; Thu, 24 May 2018 01:12:06 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O1C6K6000613; Thu, 24 May 2018 01:12:06 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240112.w4O1C6K6000613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 01:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334126 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 334126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 01:12:07 -0000 Author: mmacy Date: Thu May 24 01:12:06 2018 New Revision: 334126 URL: https://svnweb.freebsd.org/changeset/base/334126 Log: devd: drop WARNS back down to 3 until 6 actually works with GCC Modified: head/sbin/devd/Makefile Modified: head/sbin/devd/Makefile ============================================================================== --- head/sbin/devd/Makefile Thu May 24 01:04:56 2018 (r334125) +++ head/sbin/devd/Makefile Thu May 24 01:12:06 2018 (r334126) @@ -2,6 +2,7 @@ .include +WARNS?= 3 PACKAGE=runtime PROG_CXX=devd SRCS= devd.cc token.l parse.y y.tab.h From owner-svn-src-head@freebsd.org Wed May 23 22:32:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B402EEADB4; Wed, 23 May 2018 22:32:53 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A06F2829CA; Wed, 23 May 2018 22:32:52 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 92BC25A9F12; Wed, 23 May 2018 22:32:51 +0000 (UTC) Date: Wed, 23 May 2018 22:32:51 +0000 From: Brooks Davis To: Cy Schubert Cc: Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: Deorbiting i386 (was: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share) Message-ID: <20180523223251.GA77480@spindle.one-eyed-alien.net> References: <20180523202228.GC58848@spindle.one-eyed-alien.net> <201805232218.w4NMIxMA067892@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline In-Reply-To: <201805232218.w4NMIxMA067892@slippy.cwsent.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Mailman-Approved-At: Thu, 24 May 2018 01:20:50 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 22:32:53 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 23, 2018 at 03:18:59PM -0700, Cy Schubert wrote: > In message <20180523202228.GC58848@spindle.one-eyed-alien.net>, Brooks=20 > Davis wr > ites: > >=20 > > > > --QRj9sO5tAVLaXnSD > > Content-Type: text/plain; charset=3Dus-ascii > > Content-Disposition: inline > > Content-Transfer-Encoding: quoted-printable > > > > On Thu, May 24, 2018 at 02:53:16AM +0700, Eugene Grosbein wrote: > > > 24.05.2018 2:30, Cy Schubert wrote: > > >=3D20 > > > > Except for old computers and old software that segfaults on 64-bit,= how=3D > > many people still use i386? > > > >=3D20 > > > > Full disclosure: I'd like to see i386 deorbited before I retire. > > >=3D20 > > > Plese don't. I routinely use FreeBSD11/i386 for cheap VPS hosts havin= g le=3D > > ss than 2G memory > > > because amd64 has noticeable overhead. I even have ZFS-only i386 VPS,= her=3D > > e is live example with 1G only: > > >=3D20 > > > Mem: 10M Active, 69M Inact, 230M Wired, 685M Free > > > ARC: 75M Total, 1953K MFU, 31M MRU, 172K Anon, 592K Header, 42M Other > > > 3500K Compressed, 29M Uncompressed, 8.61:1 Ratio > > > Swap: 1024M Total, 1024M Free > > >=3D20 > > > The VPS has only 20G of disk space and ZFS compression gives > > > compressratio 2.22x for ports, 2.51x for src, 2.29x for obj > > > and 1.95x for installed i386 system plus other software and data. > > > > I think we're quite a ways from being ready to axe i386. > > > > For VPS applications, we should probably get x32 support in place which > > should give us the best of both worlds. > > > > That said, we either need to rev the i386 ABI to use a 64-bit time_t or > > kill it in the not to distant future or we risk embedded systems failing > > in place in 2038. If we assume a 15 year life for most equipment to > > fail electrically or mechanically that says FreeBSD 13 shouldn't support > > the current i386 ABI. >=20 > Rereading this, I'm confused. FreeBSD 13? 2023? Either works for me,=20 > though 2023 is more reasonable and gives people more than enough time=20 > to migrate. My guess is that FreeBSD 12 will be supported through 2023, maybe a little longer. I'd rather not provide *any* support to the current past 2023 which would imply we shouldn't support it in 13 which will extend beyond that. One could come up with a different and also reasonable timeline and that should probably be a job for core++. It's worth noting that we could just decide we're breaking the ABI early in the 13 cycle and not kill i386. -- Brooks --Dxnq1zWXvFF0Q93v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbBewSAAoJEKzQXbSebgfAKd4H/3esQvd1sNfVmf05gDo8wW1Y DpjputHcedUlPiCeh1aTaT/YAPCGL77o4lFDWNGR9QuHeKAnYjYIiiQPwxAY/dHU mgQenCJB6VMpcDcBSli1ESC/5AdX8AHnBFZl7XL+J75XuBqkkBCvI6HIsuInVJKB rEObeFr+5hM49IN+whaKJ/EWlPP4ElYhbNQfL4pwr137Lt+j2ETJxuR9iVL9gfFo 0eo0I3oRDCzjweNnlQRRR51VguGseaRS9gVO3qjInGPtbn6mAnxrtGcQwHt595xn 7ZaHYCGcNCrTQ+FczesUvbXLjZgzVTkWH7v32suHobg79Urn7mGCHYK3de8BW+c= =bj3T -----END PGP SIGNATURE----- --Dxnq1zWXvFF0Q93v-- From owner-svn-src-head@freebsd.org Thu May 24 01:19:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75821EF0568 for ; Thu, 24 May 2018 01:19:10 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x236.google.com (mail-yb0-x236.google.com [IPv6:2607:f8b0:4002:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E80B069307 for ; Thu, 24 May 2018 01:19:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x236.google.com with SMTP id l2-v6so7065651ybp.8 for ; Wed, 23 May 2018 18:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sJgWBvpgBYbU6Y26kofbFHtbCZfcWIwLh7KGlSZv7zU=; b=rImOWWq+/h79dFPQHxEFryhWUIrHLLKJR8OWZzHiNwO7RZ0eWJrlM0baNqneCJHcem vzm0IKG2sdIKDdkeacn2IdE7nwFW4u+GRqBo3g4fPDo4cS3Gw8o57tR1iF6YV3qvNdCu tr8c88WTOdJDmcyi3O1850Tv8CwBgNP2h15UQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sJgWBvpgBYbU6Y26kofbFHtbCZfcWIwLh7KGlSZv7zU=; b=Q1iEhC4rC30fza1ecN+jC9XK43HBhy/04q2+00qFx/vNfkdyGBEViZK49tRnovH0/3 jRQOCB0uHFKxNX7lD7ixdN40jH5re4o5rqS3XsWtLEL9Tav1dzjMA/j/SI3LGdfsQfR7 73K3fXRm9Uydls4cxLZdYVQKD6XQcd+BHxEyfwQAYojTpQROvVBIixGaQkjqWwiZKsyH bdKIgFvUkKe4dIldajPJO210cuX8c1SWoqyTqrhxUvFD7ixQHBSa44KJQJqbHs0FENmi LIPe6OSI8xSZ0JyBGTXGRLBPNK85LCRuytSPTq8K6qsGwftJm2jylcAg/FXZfTBN3e4O VUjw== X-Gm-Message-State: ALKqPwdGzpi9mEcEyo5LF6alQU69SSj7A+wRQwqiaeFhXjU1XCc8vtdA XeFlSA3jCfqyMGM8gkh9qEFNVScncbioWNElqqRjXw== X-Google-Smtp-Source: AB8JxZq4MFSiGpEUIBqPLZwoEFH6FK65zfCcn/GVecdknLSQX23v3v1Mo4EptWad+pUzq2JGET+bEfUr1aUtWYyVzPw= X-Received: by 2002:a25:2605:: with SMTP id m5-v6mr3008944ybm.89.1527124749369; Wed, 23 May 2018 18:19:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Wed, 23 May 2018 18:18:38 -0700 (PDT) In-Reply-To: References: <201805231700.w4NH05hs047395@repo.freebsd.org> <2281830.zrSQodBeDb@ralph.baldwin.cx> From: Eitan Adler Date: Wed, 23 May 2018 18:18:38 -0700 Message-ID: Subject: Re: svn commit: r334104 - in head/sys: netinet sys To: "Jonathan T. Looney" Cc: Matthew Macy , John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 01:19:10 -0000 On 23 May 2018 at 17:40, Jonathan T. Looney wrote: > On Wed, May 23, 2018 at 7:13 PM, Matthew Macy wrote: >> >> On Wed, May 23, 2018 at 11:52 AM, John Baldwin wrote: >> > On Wednesday, May 23, 2018 05:00:05 PM Matt Macy wrote: >> >> Author: mmacy >> >> Date: Wed May 23 17:00:05 2018 >> >> New Revision: 334104 >> >> URL: https://svnweb.freebsd.org/changeset/base/334104 >> >> >> >> Log: >> >> epoch: allow for conditionally asserting that the epoch context >> >> fields >> >> are unused by zeroing on INVARIANTS builds >> > >> > Is M_ZERO really so bad that you need to make it conditional? >> >> In this case not at all. It's only exercised by sysctl handlers. I'm >> mostly responding to an inquiry by jtl. However, gratuitous M_ZERO >> usage does have a cumulative adverse performance impact. > > I appreciate you making this change. And, I do think it is worth avoiding > M_ZERO where it is unnecessary, for the reason you state. > >> > I would probably have preferred something like 'M_ZERO_INVARIANTS' >> > instead perhaps (or M_ZERO_EPOCH) that only controls M_ZERO and is >> > still or'd with M_WAITOK or M_NOWAIT. >> >> Yes. I like that better too. Thanks. > > Yes, that does seem better. +1 to M_ZERO_INVARIANTS -- Eitan Adler From owner-svn-src-head@freebsd.org Thu May 24 01:52:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F8A9EF2E76; Thu, 24 May 2018 01:52:26 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12DF56B333; Thu, 24 May 2018 01:52:26 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x244.google.com with SMTP id c5-v6so15946337itj.1; Wed, 23 May 2018 18:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5NpJuBIj0JRBnTw6xT3sYJSNkuHEJphXKlTCz3E/GR8=; b=vVj/pNlju3MsgUkgFSbDdRnDyOS1+U5hIkoMrsYr9e0gHeLTKUeher3A1HtJodAw6P OnIpfxnNzhKASx5nzAWu6Kj6RYhvQjUvI5YlGTt4sPMwr1Yr/sM3D7WoHwqLZuh2F+En f4k3UHi9tqh6oZ36uZLPyMwHlMpYnx7S4mItXWm439QP/d3KP4AWvyAg3/O8g8m9EH69 hvoRttwPgmcVcdkkf6lRT9zS/C9mF/WFq7r2FdrDydblnGX8WIEVp/S+Ns5dC2rmXrTG g+aizazoAG3/f0pmZaP59dPm4qqZ1PfaZHD8ZDtMPKaDD0inS2ksQD2guLcpBp+xD3Xw UTAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=5NpJuBIj0JRBnTw6xT3sYJSNkuHEJphXKlTCz3E/GR8=; b=dE6+2tsYsOuL7VNC6F2BvStI4NkxskPLj7hpFvdiiuPInywJIHewr+r0GirNj9kps5 8SlKrbYbJk/oHqyWdzFFO3r5n4NCxGVpIyvFX/HAeT3n4kA2vEmoQQEmzykFOzRRjypR gJmxw7NDwcml5grJdNzEcmN/hf/JD0qtPUJSbBGlUvffvvMja3PVXfTHR2ovmgeKgTke eDb59S1MvonTAWV3MAjJlL6xJHU0NF/2l5iL0QBu8txcFIZyT7LlHgssddoCTX/6HI8X 0GQRNtUHJxWiYbI1H98ukWmq0uptoVbLn7fGa5L/8UfS1aB074HlbpEaWLHPDqGAt3aW CDSQ== X-Gm-Message-State: ALKqPwcjsuvwvI6GgPNopULgEzi7zOTlahzrK7q72JT5Hk3aMVrznb3c MAkWnSKJQRiOWSOHPWXvKgBcqzUkrbNuCBBLIwNgcL8H X-Google-Smtp-Source: ADUXVKK9t2VuiTdfaRlTSOdrDU38YhJGt4pXjVNa1oCrNAVk/Y75bxpPYCwsJM1WVNtrpomF1BrU1WL/Wq6HjVYbwlw= X-Received: by 2002:a24:3555:: with SMTP id k82-v6mr7265194ita.49.1527126745537; Wed, 23 May 2018 18:52:25 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:82a7:0:0:0:0:0 with HTTP; Wed, 23 May 2018 18:52:05 -0700 (PDT) In-Reply-To: References: <201805232126.w4NLQXrc084775@repo.freebsd.org> From: Ed Maste Date: Wed, 23 May 2018 21:52:05 -0400 X-Google-Sender-Auth: 2pMfjlRjnRgpJBZNQ1_lQjEjhww Message-ID: Subject: Re: svn commit: r334120 - head/share/mk To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 01:52:26 -0000 On 23 May 2018 at 21:28, Eitan Adler wrote: > On 23 May 2018 at 14:26, Ed Maste wrote: >> Author: emaste >> Date: Wed May 23 21:26:33 2018 >> New Revision: 334120 >> URL: https://svnweb.freebsd.org/changeset/base/334120 >> >> Log: >> Revert r334081 (-Wmain) as it broke the build on gcc architectures > > I tested this with "make universe". Can you give me an example build > log that failed? I saw it via https://ci.freebsd.org/tinderbox - an example log is here: https://ci.freebsd.org/job/FreeBSD-head-mips-build/2330/console cc1plus: warning: command line option "-Wmain" is valid for C/ObjC but not for C++ > Would CFLAGS.clang += -Wmain be okay? I suspect so. From owner-svn-src-head@freebsd.org Thu May 24 01:29:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EECCEF11C8 for ; Thu, 24 May 2018 01:29:11 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22f.google.com (mail-yb0-x22f.google.com [IPv6:2607:f8b0:4002:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C60FC69D08 for ; Thu, 24 May 2018 01:29:10 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22f.google.com with SMTP id o14-v6so948ybq.3 for ; Wed, 23 May 2018 18:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bL8FW5inijGve8gwreDLuj00RkVvDmeQLuHPBRe7hdg=; b=NEvQzr1o9eTkylwKCY048BqytmWrW3tCvlPlNCkiXVNAO18LHfHazoYA4UE42OSNGb +USdIh2IkWfKCqPety6RUhahqhcKovGGr2DBatm/Gsw9dhRitQJYy4XLrI/coX5hYcmd f8CLj2bhEEyYA+joS+xydyFtRsaIUgq5NIa9Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bL8FW5inijGve8gwreDLuj00RkVvDmeQLuHPBRe7hdg=; b=nZ3VK+z6yYXKZXVIal0b0TnAy4GmR0u/iIXO4IDaE2cbPtJxJte53/KioaCUl0TH8t vtj40ozsOZ6jYJVKv+1hwNyhXkFOh1xudnq56I1ifFZFAhBZLgrvYJQpu1+JNBpqBAju LVcjMOv/RjfIsbkhDFVkVgCfNkOYLdpcoY61csx1n07qv2oaO1f/hXkwDDltiNkF5sPY zGuhiHWCvMLdSDVh9WiVKXwbRy8E/DuUXeG/POpOjbtM93GuClfharPGpaWsQoTRhsYG H9Kzo9tV9y/ZF7O+m6uQUbpJHNZn+9Kb5ojOcUGKU6fjfPNxmGdHQ3z49txPhd9s4bvk /T4w== X-Gm-Message-State: ALKqPwfiSAjmj5vZA5vs2TxiNf/FWW/wtGCRgmdz4xVqCyT/ejRTTixA F54uTJ2PuV7YMwva3ct0C5a31sqpZ5Y6yOnA4F+xRQ== X-Google-Smtp-Source: AB8JxZqviNqEL7mTKMaBekZ+mndgI87p+3WLChpB9WUBuELPAGntip3pzvqSgilTi2S8VOkGH90tH43BGMsGsVNAf0Q= X-Received: by 2002:a25:786:: with SMTP id 128-v6mr3081092ybh.338.1527125350143; Wed, 23 May 2018 18:29:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Wed, 23 May 2018 18:28:39 -0700 (PDT) In-Reply-To: <201805232126.w4NLQXrc084775@repo.freebsd.org> References: <201805232126.w4NLQXrc084775@repo.freebsd.org> From: Eitan Adler Date: Wed, 23 May 2018 18:28:39 -0700 Message-ID: Subject: Re: svn commit: r334120 - head/share/mk To: Ed Maste Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 01:29:11 -0000 On 23 May 2018 at 14:26, Ed Maste wrote: > Author: emaste > Date: Wed May 23 21:26:33 2018 > New Revision: 334120 > URL: https://svnweb.freebsd.org/changeset/base/334120 > > Log: > Revert r334081 (-Wmain) as it broke the build on gcc architectures I tested this with "make universe". Can you give me an example build log that failed? Would CFLAGS.clang += -Wmain be okay? -- Eitan Adler From owner-svn-src-head@freebsd.org Thu May 24 02:56:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78E65EF70F3; Thu, 24 May 2018 02:56:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 164FF6E07E; Thu, 24 May 2018 02:56:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f43.google.com with SMTP id q4-v6so542402ite.3; Wed, 23 May 2018 19:56:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=fiZRpqT/afgpY5MYBbCNCoT0pyqXmXH2bS18h1KkBVc=; b=EtrcGSkCi6K6/s3nVO3NL+TVcTP6VSHpFLcbtUvaxCLUb4Q1R5QL0vTdN9lHv7ySGT DSoZ52tlmdjW79ctsjXPwle69zMuwpcGueg0PrJHupuCypmAJgcTPD+wF1lYrf5D3unB ZrgjlSnKTlUEvJfRtybl+UzeQ4SNCZcbENdPNHCH+aHy1dT97Vym/31fZTyo/+SiJ24R kYN6jNg2F+NEduGaHVsJOx1VqQfVkAnoAH525Q7pFuHDcOwa+RbYRwE9S1eezYi1vlDw 4qc3jVtm0y8p380i9rZHpT/YqCH+t/fX+fhE9R7+44Tfr8f7WZCBjTYv2mWh8uqtHuuh OR8w== X-Gm-Message-State: ALKqPwcsU/qRAW88vx56AjZSAORle+n3Y/qDGmScnGeCY70m+7C05lmN u4cZi8Qj90HCfYqtg/jFSViKnVNu X-Google-Smtp-Source: ADUXVKKiysaBgHB92434HDfxXSEPWXTgCQzm+qBGNLl054mc6mY1lhYZtnHDDTnHh+Pm8mjBe+j9Zw== X-Received: by 2002:a24:42c6:: with SMTP id i189-v6mr7481777itb.73.1527129061661; Wed, 23 May 2018 19:31:01 -0700 (PDT) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com. [209.85.223.171]) by smtp.gmail.com with ESMTPSA id i189-v6sm1807989itf.10.2018.05.23.19.31.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 19:31:01 -0700 (PDT) Received: by mail-io0-f171.google.com with SMTP id d11-v6so465959iof.11; Wed, 23 May 2018 19:31:01 -0700 (PDT) X-Received: by 2002:a6b:6a19:: with SMTP id x25-v6mr4888077iog.143.1527129061145; Wed, 23 May 2018 19:31:01 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:9696:0:0:0:0:0 with HTTP; Wed, 23 May 2018 19:31:00 -0700 (PDT) In-Reply-To: References: <201805232126.w4NLQXrc084775@repo.freebsd.org> From: Conrad Meyer Date: Wed, 23 May 2018 19:31:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334120 - head/share/mk To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 02:56:21 -0000 On Wed, May 23, 2018 at 6:28 PM, Eitan Adler wrote: > On 23 May 2018 at 14:26, Ed Maste wrote: >> Author: emaste >> Date: Wed May 23 21:26:33 2018 >> New Revision: 334120 >> URL: https://svnweb.freebsd.org/changeset/base/334120 >> >> Log: >> Revert r334081 (-Wmain) as it broke the build on gcc architectures > > I tested this with "make universe". Can you give me an example build > log that failed? In a just-previous revision (r334078), you mentioned testing with "make universe TARGETS='amd64 arm arm64 i386 sparc64'" and not "make universe" proper. The former is a subset and does not include MIPS, as Ed's tinderbox link shows. Conrad From owner-svn-src-head@freebsd.org Thu May 24 04:17:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF2E4EFAE70 for ; Thu, 24 May 2018 04:17:11 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0ABC5716C2 for ; Thu, 24 May 2018 04:17:11 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yw0-f175.google.com (mail-yw0-f175.google.com [209.85.161.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id C99B0D9C8 for ; Thu, 24 May 2018 04:17:10 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yw0-f175.google.com with SMTP id v68-v6so105306ywd.3 for ; Wed, 23 May 2018 21:17:10 -0700 (PDT) X-Gm-Message-State: ALKqPwex0EGiEjNj4/mcTZ8nM7EV+hngz/ctxofk+ONunlGF07tzvcku vl5xg0qNqBO+/PIv77xDPpra2DodGaahn6bjMGrFzA== X-Google-Smtp-Source: AB8JxZqXIn3Bf0Gb7LgPJJdWw8aPn/+yJzH0P710e7lM4HmrPQ6O7t85M5bdK/CXtLayzuyRk6s5Uf3GJg5+4DYXF/k= X-Received: by 2002:a81:8605:: with SMTP id w5-v6mr2919936ywf.162.1527135430415; Wed, 23 May 2018 21:17:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Wed, 23 May 2018 21:16:39 -0700 (PDT) In-Reply-To: References: <201805230739.w4N7d34c062450@repo.freebsd.org> From: Eitan Adler Date: Wed, 23 May 2018 21:16:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334077 - in head/sbin/devd: . tests To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:17:12 -0000 On 23 May 2018 at 13:09, Warner Losh wrote: > > > On Wed, May 23, 2018 at 1:39 AM, Eitan Adler wrote: >> >> Author: eadler >> Date: Wed May 23 07:39:02 2018 >> New Revision: 334077 >> URL: https://svnweb.freebsd.org/changeset/base/334077 >> >> Log: >> devd: correct two warnings >> >> - catching a polymorphic type by value >> - "output between 16 and 95 bytes into a destination of size 80" >> >> Modified: >> head/sbin/devd/devd.cc >> head/sbin/devd/tests/client_test.c >> >> Modified: head/sbin/devd/devd.cc >> >> ============================================================================== >> --- head/sbin/devd/devd.cc Wed May 23 07:39:00 2018 (r334076) >> +++ head/sbin/devd/devd.cc Wed May 23 07:39:02 2018 (r334077) >> @@ -1087,7 +1087,7 @@ event_loop(void) >> try { >> process_event(buffer); >> } >> - catch (std::length_error e) { >> + catch (const std::length_error& e) { >> devdlog(LOG_ERR, "Dropping event >> %s " >> "due to low memory", buffer); >> } >> >> Modified: head/sbin/devd/tests/client_test.c >> >> ============================================================================== >> --- head/sbin/devd/tests/client_test.c Wed May 23 07:39:00 2018 >> (r334076) >> +++ head/sbin/devd/tests/client_test.c Wed May 23 07:39:02 2018 >> (r334077) >> @@ -50,7 +50,7 @@ create_two_events(void) >> FILE *create_stdout; >> FILE *destroy_stdout; >> char mdname[80]; >> - char destroy_cmd[80]; >> + char destroy_cmd[95]; >> char *error; > > > I know it's just a test, but 95 seems equally as magical as 80... Agreed. I stole this number from the warning without too much thought. Tested that it still passed, and didn't do anything funky. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Thu May 24 04:31:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 285A2EFBFA1; Thu, 24 May 2018 04:31:54 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3C71726C9; Thu, 24 May 2018 04:31:53 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4FF056D3; Thu, 24 May 2018 04:31:53 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O4Vrlp004256; Thu, 24 May 2018 04:31:53 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O4Vrvv004255; Thu, 24 May 2018 04:31:53 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240431.w4O4Vrvv004255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 04:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334129 - head/sys/amd64/conf X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/amd64/conf X-SVN-Commit-Revision: 334129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:31:54 -0000 Author: mmacy Date: Thu May 24 04:31:53 2018 New Revision: 334129 URL: https://svnweb.freebsd.org/changeset/base/334129 Log: take NUMA out Modified: head/sys/amd64/conf/GENERIC-NODEBUG Modified: head/sys/amd64/conf/GENERIC-NODEBUG ============================================================================== --- head/sys/amd64/conf/GENERIC-NODEBUG Thu May 24 04:30:06 2018 (r334128) +++ head/sys/amd64/conf/GENERIC-NODEBUG Thu May 24 04:31:53 2018 (r334129) @@ -38,4 +38,3 @@ nooptions BUF_TRACKING nooptions DEADLKRES nooptions FULL_BUF_TRACKING -options NUMA From owner-svn-src-head@freebsd.org Thu May 24 04:30:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07CD6EFBD18; Thu, 24 May 2018 04:30:10 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACEF772372; Thu, 24 May 2018 04:30:09 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E543556E; Thu, 24 May 2018 04:30:09 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O4U9aj001149; Thu, 24 May 2018 04:30:09 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O4U6Js001134; Thu, 24 May 2018 04:30:06 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240430.w4O4U6Js001134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 04:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334128 - in head: . lib/libpmcstat lib/libpmcstat/pmu-events lib/libpmcstat/pmu-events/arch lib/libpmcstat/pmu-events/arch/arm64 lib/libpmcstat/pmu-events/arch/arm64/arm lib/libpmcstat... X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: . lib/libpmcstat lib/libpmcstat/pmu-events lib/libpmcstat/pmu-events/arch lib/libpmcstat/pmu-events/arch/arm64 lib/libpmcstat/pmu-events/arch/arm64/arm lib/libpmcstat/pmu-events/arch/arm64/ar... X-SVN-Commit-Revision: 334128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:30:10 -0000 Author: mmacy Date: Thu May 24 04:30:06 2018 New Revision: 334128 URL: https://svnweb.freebsd.org/changeset/base/334128 Log: libpmcstat: compile in events based on json description Added: head/lib/libpmcstat/libpmcstat_pmu_util.c (contents, props changed) head/lib/libpmcstat/pmu-events/ head/lib/libpmcstat/pmu-events/Makefile (contents, props changed) head/lib/libpmcstat/pmu-events/README (contents, props changed) head/lib/libpmcstat/pmu-events/arch/ head/lib/libpmcstat/pmu-events/arch/arm64/ head/lib/libpmcstat/pmu-events/arch/arm64/arm/ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/arm64/cavium/ head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/ head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/ head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/ head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/ head/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power8/ head/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power9/ head/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/ head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ head/lib/libpmcstat/pmu-events/arch/x86/bonnell/ head/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwell/ head/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/ head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/ head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmont/ head/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/ head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswell/ head/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/ head/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ head/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/ head/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/ head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/ head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/ head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/ head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/silvermont/ head/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylake/ head/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/ head/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/ head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/ head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereex/ head/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json (contents, props changed) head/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json (contents, props changed) head/lib/libpmcstat/pmu-events/jevents.c (contents, props changed) head/lib/libpmcstat/pmu-events/jevents.h (contents, props changed) head/lib/libpmcstat/pmu-events/jsmn.c (contents, props changed) head/lib/libpmcstat/pmu-events/jsmn.h (contents, props changed) head/lib/libpmcstat/pmu-events/json.c (contents, props changed) head/lib/libpmcstat/pmu-events/json.h (contents, props changed) head/lib/libpmcstat/pmu-events/list.h (contents, props changed) head/lib/libpmcstat/pmu-events/pmu-events.h (contents, props changed) Modified: head/Makefile head/Makefile.inc1 head/lib/libpmcstat/Makefile head/lib/libpmcstat/libpmcstat.h head/sys/amd64/conf/GENERIC-NODEBUG head/usr.sbin/pmcstat/pmcstat.c head/usr.sbin/pmcstat/pmcstat.h Modified: head/Makefile ============================================================================== --- head/Makefile Thu May 24 03:44:12 2018 (r334127) +++ head/Makefile Thu May 24 04:30:06 2018 (r334128) @@ -481,7 +481,8 @@ worlds: .PHONY # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) -TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 +TARGETS?=amd64 i386 powerpc arm64 +#riscv arm sparc64 mips _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= arm armeb armv6 armv7 TARGET_ARCHES_arm64?= aarch64 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu May 24 03:44:12 2018 (r334127) +++ head/Makefile.inc1 Thu May 24 04:30:06 2018 (r334128) @@ -2029,6 +2029,11 @@ _tcsh=bin/csh _libmagic=lib/libmagic .endif +.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "powerpc") +_jevents=lib/libpmcstat/pmu-events +.endif + # kernel-toolchain skips _cleanobj, so handle cleaning up previous # build-tools directories if needed. .if !defined(NO_CLEAN) && make(kernel-toolchain) @@ -2039,6 +2044,7 @@ _bt_clean= ${CLEANDIR} ${_tcsh} \ bin/sh \ ${LOCAL_TOOL_DIRS} \ + ${_jevents} \ lib/ncurses/ncurses \ lib/ncurses/ncursesw \ ${_rescue} \ Modified: head/lib/libpmcstat/Makefile ============================================================================== --- head/lib/libpmcstat/Makefile Thu May 24 03:44:12 2018 (r334127) +++ head/lib/libpmcstat/Makefile Thu May 24 04:30:06 2018 (r334128) @@ -1,5 +1,4 @@ # $FreeBSD$ - PACKAGE=lib${LIB} LIB= pmcstat INTERNALLIB= @@ -10,7 +9,31 @@ SRCS= \ libpmcstat_logging.c \ libpmcstat_process.c \ libpmcstat_string.c \ - libpmcstat_symbol.c + libpmcstat_symbol.c \ + libpmcstat_pmu_util.c INCS= libpmcstat.h + +CFLAGS+= -I${.CURDIR} + +.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "powerpc") +.if ${MACHINE_CPUARCH} == "aarch64" +EVENT_ARCH="arm64" +.elif ${MACHINE_CPUARCH} == "amd64" +EVENT_ARCH="x86" +.elif ${MACHINE_CPUARCH} == "powerpc" +EVENT_ARCH="powerpc" +.endif + +.if defined(HOST_OBJTOP) +JEVENTS= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents +.else +JEVENTS= pmu-events/jevents +.endif + +libpmcstat_events.c: ${JEVENTS} + ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c +SRCS+= libpmcstat_events.c +.endif .include Modified: head/lib/libpmcstat/libpmcstat.h ============================================================================== --- head/lib/libpmcstat/libpmcstat.h Thu May 24 03:44:12 2018 (r334127) +++ head/lib/libpmcstat/libpmcstat.h Thu May 24 04:30:06 2018 (r334128) @@ -53,6 +53,7 @@ #define PMCSTAT_NHASH 256 #define PMCSTAT_HASH_MASK 0xFF +#define DEFAULT_SAMPLE_COUNT 65536 typedef const void *pmcstat_interned_string; struct pmc_plugins; @@ -380,6 +381,9 @@ int pmcstat_analyze_log(struct pmcstat_args *args, int pmcstat_open_log(const char *_p, int _mode); int pmcstat_close_log(struct pmcstat_args *args); + +uint64_t pmcstat_pmu_sample_rate_get(const char *); + __END_DECLS #endif /* !_LIBPMCSTAT_H_ */ Added: head/lib/libpmcstat/libpmcstat_pmu_util.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,128 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018, Matthew Macy + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "pmu-events/pmu-events.h" + +#if defined(__amd64__) +struct pmu_event_desc { + uint32_t ped_umask; + uint32_t ped_event; + uint64_t ped_period; +}; + +static const struct pmu_events_map * +pmu_events_map_get(void) +{ + size_t s; + char buf[64]; + const struct pmu_events_map *pme; + + if (sysctlbyname("kern.hwpmc.cpuid", (void *)NULL, &s, + (void *)NULL, 0) == -1) + return (NULL); + if (sysctlbyname("kern.hwpmc.cpuid", buf, &s, + (void *)NULL, 0) == -1) + return (NULL); + for (pme = pmu_events_map; pme->cpuid != NULL; pme++) + if (strcmp(buf, pme->cpuid) == 0) + return (pme); + return (NULL); +} + +static const struct pmu_event * +pmu_event_get(const char *event_name) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + + if ((pme = pmu_events_map_get()) == NULL) + return (NULL); + for (pe = pme->table; pe->name != NULL; pe++) + if (strcmp(pe->name, event_name) == 0) + return (pe); + return (NULL); +} + +static int +pmu_parse_event(struct pmu_event_desc *ped, const char *eventin) +{ + char *event; + char *kvp, *key, *value; + + if ((event = strdup(eventin)) == NULL) + return (ENOMEM); + bzero(ped, sizeof(*ped)); + while ((kvp = strsep(&event, ",")) != NULL) { + key = strsep(&kvp, "="); + if (key == NULL) + abort(); + value = kvp; + if (strcmp(key, "umask") == 0) + ped->ped_umask = strtol(value, NULL, 16); + if (strcmp(key, "event") == 0) + ped->ped_event = strtol(value, NULL, 16); + if (strcmp(key, "period") == 0) + ped->ped_umask = strtol(value, NULL, 10); + } + free(event); + return (0); +} + +uint64_t +pmcstat_pmu_sample_rate_get(const char *event_name) +{ + const struct pmu_event *pe; + struct pmu_event_desc ped; + + if ((pe = pmu_event_get(event_name)) == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pe->alias && (pe = pmu_event_get(pe->alias)) == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pe->event == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pmu_parse_event(&ped, pe->event)) + return (DEFAULT_SAMPLE_COUNT); + return (ped.ped_period); +} + +#else +uint64_t pmcstat_pmu_sample_rate_get(void) { return (DEFAULT_SAMPLE_COUNT); } +#endif Added: head/lib/libpmcstat/pmu-events/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/pmu-events/Makefile Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +PROG=jevents +SRCS=jevents.c jsmn.c json.c +CFLAGS+= -Wno-cast-qual +.PATH: ${.CURDIR} +build-tools: jevents +MAN= +.include Added: head/lib/libpmcstat/pmu-events/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/pmu-events/README Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,152 @@ + +The contents of this directory allow users to specify PMU events in their +CPUs by their symbolic names rather than raw event codes (see example below). + +The main program in this directory, is the 'jevents', which is built and +executed _BEFORE_ the perf binary itself is built. + +The 'jevents' program tries to locate and process JSON files in the directory +tree tools/perf/pmu-events/arch/foo. + + - Regular files with '.json' extension in the name are assumed to be + JSON files, each of which describes a set of PMU events. + + - The CSV file that maps a specific CPU to its set of PMU events is to + be named 'mapfile.csv' (see below for mapfile format). + + - Directories are traversed, but all other files are ignored. + + - To reduce JSON event duplication per architecture, platform JSONs may + use "ArchStdEvent" keyword to dereference an "Architecture standard + events", defined in architecture standard JSONs. + Architecture standard JSONs must be located in the architecture root + folder. Matching is based on the "EventName" field. + +The PMU events supported by a CPU model are expected to grouped into topics +such as Pipelining, Cache, Memory, Floating-point etc. All events for a topic +should be placed in a separate JSON file - where the file name identifies +the topic. Eg: "Floating-point.json". + +All the topic JSON files for a CPU model/family should be in a separate +sub directory. Thus for the Silvermont X86 CPU: + + $ ls tools/perf/pmu-events/arch/x86/Silvermont_core + Cache.json Memory.json Virtual-Memory.json + Frontend.json Pipeline.json + +The JSONs folder for a CPU model/family may be placed in the root arch +folder, or may be placed in a vendor sub-folder under the arch folder +for instances where the arch and vendor are not the same. + +Using the JSON files and the mapfile, 'jevents' generates the C source file, +'pmu-events.c', which encodes the two sets of tables: + + - Set of 'PMU events tables' for all known CPUs in the architecture, + (one table like the following, per JSON file; table name 'pme_power8' + is derived from JSON file name, 'power8.json'). + + struct pmu_event pme_power8[] = { + + ... + + { + .name = "pm_1plus_ppc_cmpl", + .event = "event=0x100f2", + .desc = "1 or more ppc insts finished,", + }, + + ... + } + + - A 'mapping table' that maps each CPU of the architecture, to its + 'PMU events table' + + struct pmu_events_map pmu_events_map[] = { + { + .cpuid = "004b0000", + .version = "1", + .type = "core", + .table = pme_power8 + }, + ... + + }; + +After the 'pmu-events.c' is generated, it is compiled and the resulting +'pmu-events.o' is added to 'libperf.a' which is then used to build perf. + +NOTES: + 1. Several CPUs can support same set of events and hence use a common + JSON file. Hence several entries in the pmu_events_map[] could map + to a single 'PMU events table'. + + 2. The 'pmu-events.h' has an extern declaration for the mapping table + and the generated 'pmu-events.c' defines this table. + + 3. _All_ known CPU tables for architecture are included in the perf + binary. + +At run time, perf determines the actual CPU it is running on, finds the +matching events table and builds aliases for those events. This allows +users to specify events by their name: + + $ perf stat -e pm_1plus_ppc_cmpl sleep 1 + +where 'pm_1plus_ppc_cmpl' is a Power8 PMU event. + +However some errors in processing may cause the perf build to fail. + +Mapfile format +=============== + +The mapfile enables multiple CPU models to share a single set of PMU events. +It is required even if such mapping is 1:1. + +The mapfile.csv format is expected to be: + + Header line + CPUID,Version,Dir/path/name,Type + +where: + + Comma: + is the required field delimiter (i.e other fields cannot + have commas within them). + + Comments: + Lines in which the first character is either '\n' or '#' + are ignored. + + Header line + The header line is the first line in the file, which is + always _IGNORED_. It can empty. + + CPUID: + CPUID is an arch-specific char string, that can be used + to identify CPU (and associate it with a set of PMU events + it supports). Multiple CPUIDS can point to the same + File/path/name.json. + + Example: + CPUID == 'GenuineIntel-6-2E' (on x86). + CPUID == '004b0100' (PVR value in Powerpc) + Version: + is the Version of the mapfile. + + Dir/path/name: + is the pathname to the directory containing the CPU's JSON + files, relative to the directory containing the mapfile.csv + + Type: + indicates whether the events or "core" or "uncore" events. + + + Eg: + + $ grep Silvermont tools/perf/pmu-events/arch/x86/mapfile.csv + GenuineIntel-6-37,V13,Silvermont_core,core + GenuineIntel-6-4D,V13,Silvermont_core,core + GenuineIntel-6-4C,V13,Silvermont_core,core + + i.e the three CPU models use the JSON files (i.e PMU events) listed + in the directory 'tools/perf/pmu-events/arch/x86/Silvermont_core'. Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,25 @@ +[ + { + "ArchStdEvent": "BR_INDIRECT_SPEC", + }, + { + "EventCode": "0xC9", + "EventName": "BR_COND", + "BriefDescription": "Conditional branch executed" + }, + { + "EventCode": "0xCA", + "EventName": "BR_INDIRECT_MISPRED", + "BriefDescription": "Indirect branch mispredicted" + }, + { + "EventCode": "0xCB", + "EventName": "BR_INDIRECT_MISPRED_ADDR", + "BriefDescription": "Indirect branch mispredicted because of address miscompare" + }, + { + "EventCode": "0xCC", + "EventName": "BR_COND_MISPRED", + "BriefDescription": "Conditional branch mispredicted" + } +] Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,8 @@ +[ + { + "ArchStdEvent": "BUS_ACCESS_RD", + }, + { + "ArchStdEvent": "BUS_ACCESS_WR", + } +] Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,27 @@ +[ + { + "EventCode": "0xC2", + "EventName": "PREFETCH_LINEFILL", + "BriefDescription": "Linefill because of prefetch" + }, + { + "EventCode": "0xC3", + "EventName": "PREFETCH_LINEFILL_DROP", + "BriefDescription": "Instruction Cache Throttle occurred" + }, + { + "EventCode": "0xC4", + "EventName": "READ_ALLOC_ENTER", + "BriefDescription": "Entering read allocate mode" + }, + { + "EventCode": "0xC5", + "EventName": "READ_ALLOC", + "BriefDescription": "Read allocate mode" + }, + { + "EventCode": "0xC8", + "EventName": "EXT_SNOOP", + "BriefDescription": "SCU Snooped data from another CPU for this CPU" + } +] Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,12 @@ +[ + { + "EventCode": "0xC0", + "EventName": "EXT_MEM_REQ", + "BriefDescription": "External memory request" + }, + { + "EventCode": "0xC1", + "EventName": "EXT_MEM_REQ_NC", + "BriefDescription": "Non-cacheable external memory request" + } +] Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,28 @@ +[ + { + "ArchStdEvent": "EXC_IRQ", + }, + { + "ArchStdEvent": "EXC_FIQ", + }, + { + "EventCode": "0xC6", + "EventName": "PRE_DECODE_ERR", + "BriefDescription": "Pre-decode error" + }, + { + "EventCode": "0xD0", + "EventName": "L1I_CACHE_ERR", + "BriefDescription": "L1 Instruction Cache (data or tag) memory error" + }, + { + "EventCode": "0xD1", + "EventName": "L1D_CACHE_ERR", + "BriefDescription": "L1 Data Cache (data, tag or dirty) memory error, correctable or non-correctable" + }, + { + "EventCode": "0xD2", + "EventName": "TLB_ERR", + "BriefDescription": "TLB memory error" + } +] Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,52 @@ +[ + { + "EventCode": "0xC7", + "EventName": "STALL_SB_FULL", + "BriefDescription": "Data Write operation that stalls the pipeline because the store buffer is full" + }, + { + "EventCode": "0xE0", + "EventName": "OTHER_IQ_DEP_STALL", + "BriefDescription": "Cycles that the DPU IQ is empty and that is not because of a recent micro-TLB miss, instruction cache miss or pre-decode error" + }, + { + "EventCode": "0xE1", + "EventName": "IC_DEP_STALL", + "BriefDescription": "Cycles the DPU IQ is empty and there is an instruction cache miss being processed" + }, + { + "EventCode": "0xE2", + "EventName": "IUTLB_DEP_STALL", + "BriefDescription": "Cycles the DPU IQ is empty and there is an instruction micro-TLB miss being processed" + }, + { + "EventCode": "0xE3", + "EventName": "DECODE_DEP_STALL", + "BriefDescription": "Cycles the DPU IQ is empty and there is a pre-decode error being processed" + }, + { + "EventCode": "0xE4", + "EventName": "OTHER_INTERLOCK_STALL", + "BriefDescription": "Cycles there is an interlock other than Advanced SIMD/Floating-point instructions or load/store instruction" + }, + { + "EventCode": "0xE5", + "EventName": "AGU_DEP_STALL", + "BriefDescription": "Cycles there is an interlock for a load/store instruction waiting for data to calculate the address in the AGU" + }, + { + "EventCode": "0xE6", + "EventName": "SIMD_DEP_STALL", + "BriefDescription": "Cycles there is an interlock for an Advanced SIMD/Floating-point operation." + }, + { + "EventCode": "0xE7", + "EventName": "LD_DEP_STALL", + "BriefDescription": "Cycles there is a stall in the Wr stage because of a load miss" + }, + { + "EventCode": "0xE8", + "EventName": "ST_DEP_STALL", + "BriefDescription": "Cycles there is a stall in the Wr stage because of a store" + } +] Added: head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json Thu May 24 04:30:06 2018 (r334128) @@ -0,0 +1,452 @@ +[ + { + "PublicDescription": "Attributable Level 1 data cache access, read", + "EventCode": "0x40", + "EventName": "L1D_CACHE_RD", + "BriefDescription": "L1D cache access, read" + }, + { + "PublicDescription": "Attributable Level 1 data cache access, write", + "EventCode": "0x41", + "EventName": "L1D_CACHE_WR", + "BriefDescription": "L1D cache access, write" + }, + { + "PublicDescription": "Attributable Level 1 data cache refill, read", + "EventCode": "0x42", + "EventName": "L1D_CACHE_REFILL_RD", + "BriefDescription": "L1D cache refill, read" + }, + { + "PublicDescription": "Attributable Level 1 data cache refill, write", + "EventCode": "0x43", + "EventName": "L1D_CACHE_REFILL_WR", + "BriefDescription": "L1D cache refill, write" + }, + { + "PublicDescription": "Attributable Level 1 data cache refill, inner", + "EventCode": "0x44", + "EventName": "L1D_CACHE_REFILL_INNER", + "BriefDescription": "L1D cache refill, inner" + }, + { + "PublicDescription": "Attributable Level 1 data cache refill, outer", + "EventCode": "0x45", + "EventName": "L1D_CACHE_REFILL_OUTER", + "BriefDescription": "L1D cache refill, outer" + }, + { + "PublicDescription": "Attributable Level 1 data cache Write-Back, victim", + "EventCode": "0x46", + "EventName": "L1D_CACHE_WB_VICTIM", + "BriefDescription": "L1D cache Write-Back, victim" + }, + { + "PublicDescription": "Level 1 data cache Write-Back, cleaning and coherency", + "EventCode": "0x47", + "EventName": "L1D_CACHE_WB_CLEAN", + "BriefDescription": "L1D cache Write-Back, cleaning and coherency" + }, + { + "PublicDescription": "Attributable Level 1 data cache invalidate", + "EventCode": "0x48", + "EventName": "L1D_CACHE_INVAL", + "BriefDescription": "L1D cache invalidate" + }, + { + "PublicDescription": "Attributable Level 1 data TLB refill, read", + "EventCode": "0x4C", + "EventName": "L1D_TLB_REFILL_RD", + "BriefDescription": "L1D tlb refill, read" + }, + { + "PublicDescription": "Attributable Level 1 data TLB refill, write", + "EventCode": "0x4D", + "EventName": "L1D_TLB_REFILL_WR", + "BriefDescription": "L1D tlb refill, write" + }, + { + "PublicDescription": "Attributable Level 1 data or unified TLB access, read", + "EventCode": "0x4E", + "EventName": "L1D_TLB_RD", + "BriefDescription": "L1D tlb access, read" + }, + { + "PublicDescription": "Attributable Level 1 data or unified TLB access, write", + "EventCode": "0x4F", + "EventName": "L1D_TLB_WR", + "BriefDescription": "L1D tlb access, write" + }, + { + "PublicDescription": "Attributable Level 2 data cache access, read", + "EventCode": "0x50", + "EventName": "L2D_CACHE_RD", + "BriefDescription": "L2D cache access, read" + }, + { + "PublicDescription": "Attributable Level 2 data cache access, write", + "EventCode": "0x51", + "EventName": "L2D_CACHE_WR", + "BriefDescription": "L2D cache access, write" + }, + { + "PublicDescription": "Attributable Level 2 data cache refill, read", + "EventCode": "0x52", + "EventName": "L2D_CACHE_REFILL_RD", + "BriefDescription": "L2D cache refill, read" + }, + { + "PublicDescription": "Attributable Level 2 data cache refill, write", + "EventCode": "0x53", + "EventName": "L2D_CACHE_REFILL_WR", + "BriefDescription": "L2D cache refill, write" + }, + { + "PublicDescription": "Attributable Level 2 data cache Write-Back, victim", + "EventCode": "0x56", + "EventName": "L2D_CACHE_WB_VICTIM", + "BriefDescription": "L2D cache Write-Back, victim" + }, + { + "PublicDescription": "Level 2 data cache Write-Back, cleaning and coherency", + "EventCode": "0x57", + "EventName": "L2D_CACHE_WB_CLEAN", + "BriefDescription": "L2D cache Write-Back, cleaning and coherency" + }, + { + "PublicDescription": "Attributable Level 2 data cache invalidate", + "EventCode": "0x58", + "EventName": "L2D_CACHE_INVAL", + "BriefDescription": "L2D cache invalidate" + }, + { + "PublicDescription": "Attributable Level 2 data or unified TLB refill, read", + "EventCode": "0x5c", + "EventName": "L2D_TLB_REFILL_RD", + "BriefDescription": "L2D cache refill, read" + }, + { + "PublicDescription": "Attributable Level 2 data or unified TLB refill, write", + "EventCode": "0x5d", + "EventName": "L2D_TLB_REFILL_WR", + "BriefDescription": "L2D cache refill, write" + }, + { + "PublicDescription": "Attributable Level 2 data or unified TLB access, read", + "EventCode": "0x5e", + "EventName": "L2D_TLB_RD", + "BriefDescription": "L2D cache access, read" + }, + { + "PublicDescription": "Attributable Level 2 data or unified TLB access, write", + "EventCode": "0x5f", + "EventName": "L2D_TLB_WR", + "BriefDescription": "L2D cache access, write" + }, + { + "PublicDescription": "Bus access read", + "EventCode": "0x60", + "EventName": "BUS_ACCESS_RD", + "BriefDescription": "Bus access read" + }, + { + "PublicDescription": "Bus access write", + "EventCode": "0x61", + "EventName": "BUS_ACCESS_WR", + "BriefDescription": "Bus access write" + } + { + "PublicDescription": "Bus access, Normal, Cacheable, Shareable", + "EventCode": "0x62", + "EventName": "BUS_ACCESS_SHARED", + "BriefDescription": "Bus access, Normal, Cacheable, Shareable" + } + { + "PublicDescription": "Bus access, not Normal, Cacheable, Shareable", + "EventCode": "0x63", + "EventName": "BUS_ACCESS_NOT_SHARED", + "BriefDescription": "Bus access, not Normal, Cacheable, Shareable" + } + { + "PublicDescription": "Bus access, Normal", + "EventCode": "0x64", + "EventName": "BUS_ACCESS_NORMAL", + "BriefDescription": "Bus access, Normal" + } + { + "PublicDescription": "Bus access, peripheral", + "EventCode": "0x65", + "EventName": "BUS_ACCESS_PERIPH", + "BriefDescription": "Bus access, peripheral" + } + { + "PublicDescription": "Data memory access, read", + "EventCode": "0x66", + "EventName": "MEM_ACCESS_RD", + "BriefDescription": "Data memory access, read" + } + { + "PublicDescription": "Data memory access, write", + "EventCode": "0x67", + "EventName": "MEM_ACCESS_WR", + "BriefDescription": "Data memory access, write" + } + { + "PublicDescription": "Unaligned access, read", + "EventCode": "0x68", + "EventName": "UNALIGNED_LD_SPEC", + "BriefDescription": "Unaligned access, read" + } + { + "PublicDescription": "Unaligned access, write", + "EventCode": "0x69", + "EventName": "UNALIGNED_ST_SPEC", + "BriefDescription": "Unaligned access, write" + } + { + "PublicDescription": "Unaligned access", + "EventCode": "0x6a", + "EventName": "UNALIGNED_LDST_SPEC", + "BriefDescription": "Unaligned access" + } + { + "PublicDescription": "Exclusive operation speculatively executed, LDREX or LDX", + "EventCode": "0x6c", + "EventName": "LDREX_SPEC", + "BriefDescription": "Exclusive operation speculatively executed, LDREX or LDX" + } + { + "PublicDescription": "Exclusive operation speculatively executed, STREX or STX pass", + "EventCode": "0x6d", + "EventName": "STREX_PASS_SPEC", + "BriefDescription": "Exclusive operation speculatively executed, STREX or STX pass" + } + { + "PublicDescription": "Exclusive operation speculatively executed, STREX or STX fail", + "EventCode": "0x6e", + "EventName": "STREX_FAIL_SPEC", + "BriefDescription": "Exclusive operation speculatively executed, STREX or STX fail" + } + { + "PublicDescription": "Exclusive operation speculatively executed, STREX or STX", + "EventCode": "0x6f", + "EventName": "STREX_SPEC", + "BriefDescription": "Exclusive operation speculatively executed, STREX or STX" + } + { + "PublicDescription": "Operation speculatively executed, load", + "EventCode": "0x70", + "EventName": "LD_SPEC", + "BriefDescription": "Operation speculatively executed, load" + } + { + "PublicDescription": "Operation speculatively executed, store" + "EventCode": "0x71", + "EventName": "ST_SPEC", + "BriefDescription": "Operation speculatively executed, store" + } + { + "PublicDescription": "Operation speculatively executed, load or store", + "EventCode": "0x72", + "EventName": "LDST_SPEC", + "BriefDescription": "Operation speculatively executed, load or store" + } + { + "PublicDescription": "Operation speculatively executed, integer data processing", + "EventCode": "0x73", + "EventName": "DP_SPEC", + "BriefDescription": "Operation speculatively executed, integer data processing" + } + { + "PublicDescription": "Operation speculatively executed, Advanced SIMD instruction", + "EventCode": "0x74", + "EventName": "ASE_SPEC", + "BriefDescription": "Operation speculatively executed, Advanced SIMD instruction", + } + { + "PublicDescription": "Operation speculatively executed, floating-point instruction", + "EventCode": "0x75", + "EventName": "VFP_SPEC", + "BriefDescription": "Operation speculatively executed, floating-point instruction" + } + { + "PublicDescription": "Operation speculatively executed, software change of the PC", + "EventCode": "0x76", + "EventName": "PC_WRITE_SPEC", + "BriefDescription": "Operation speculatively executed, software change of the PC" + } + { + "PublicDescription": "Operation speculatively executed, Cryptographic instruction", + "EventCode": "0x77", + "EventName": "CRYPTO_SPEC", + "BriefDescription": "Operation speculatively executed, Cryptographic instruction" + } + { + "PublicDescription": "Branch speculatively executed, immediate branch" + "EventCode": "0x78", + "EventName": "BR_IMMED_SPEC", + "BriefDescription": "Branch speculatively executed, immediate branch" + } + { + "PublicDescription": "Branch speculatively executed, procedure return" + "EventCode": "0x79", + "EventName": "BR_RETURN_SPEC", + "BriefDescription": "Branch speculatively executed, procedure return" + } + { + "PublicDescription": "Branch speculatively executed, indirect branch" + "EventCode": "0x7a", + "EventName": "BR_INDIRECT_SPEC", + "BriefDescription": "Branch speculatively executed, indirect branch" + } + { + "PublicDescription": "Barrier speculatively executed, ISB" + "EventCode": "0x7c", + "EventName": "ISB_SPEC", + "BriefDescription": "Barrier speculatively executed, ISB" + } + { + "PublicDescription": "Barrier speculatively executed, DSB" + "EventCode": "0x7d", + "EventName": "DSB_SPEC", + "BriefDescription": "Barrier speculatively executed, DSB" + } + { + "PublicDescription": "Barrier speculatively executed, DMB" + "EventCode": "0x7e", + "EventName": "DMB_SPEC", + "BriefDescription": "Barrier speculatively executed, DMB" + } + { + "PublicDescription": "Exception taken, Other synchronous" + "EventCode": "0x81", + "EventName": "EXC_UNDEF", + "BriefDescription": "Exception taken, Other synchronous" + } + { + "PublicDescription": "Exception taken, Supervisor Call" + "EventCode": "0x82", + "EventName": "EXC_SVC", + "BriefDescription": "Exception taken, Supervisor Call" + } + { + "PublicDescription": "Exception taken, Instruction Abort" + "EventCode": "0x83", + "EventName": "EXC_PABORT", + "BriefDescription": "Exception taken, Instruction Abort" + } + { + "PublicDescription": "Exception taken, Data Abort and SError" + "EventCode": "0x84", + "EventName": "EXC_DABORT", + "BriefDescription": "Exception taken, Data Abort and SError" + } + { + "PublicDescription": "Exception taken, IRQ" + "EventCode": "0x86", + "EventName": "EXC_IRQ", + "BriefDescription": "Exception taken, IRQ" + } + { + "PublicDescription": "Exception taken, FIQ" + "EventCode": "0x87", + "EventName": "EXC_FIQ", + "BriefDescription": "Exception taken, FIQ" + } + { + "PublicDescription": "Exception taken, Secure Monitor Call" + "EventCode": "0x88", + "EventName": "EXC_SMC", + "BriefDescription": "Exception taken, Secure Monitor Call" + } + { + "PublicDescription": "Exception taken, Hypervisor Call" + "EventCode": "0x8a", + "EventName": "EXC_HVC", + "BriefDescription": "Exception taken, Hypervisor Call" + } + { + "PublicDescription": "Exception taken, Instruction Abort not taken locally" + "EventCode": "0x8b", + "EventName": "EXC_TRAP_PABORT", + "BriefDescription": "Exception taken, Instruction Abort not taken locally" + } + { + "PublicDescription": "Exception taken, Data Abort or SError not taken locally" + "EventCode": "0x8c", + "EventName": "EXC_TRAP_DABORT", + "BriefDescription": "Exception taken, Data Abort or SError not taken locally" + } + { + "PublicDescription": "Exception taken, Other traps not taken locally" + "EventCode": "0x8d", + "EventName": "EXC_TRAP_OTHER", + "BriefDescription": "Exception taken, Other traps not taken locally" + } + { + "PublicDescription": "Exception taken, IRQ not taken locally" + "EventCode": "0x8e", + "EventName": "EXC_TRAP_IRQ", + "BriefDescription": "Exception taken, IRQ not taken locally" + } + { + "PublicDescription": "Exception taken, FIQ not taken locally" + "EventCode": "0x8f", + "EventName": "EXC_TRAP_FIQ", + "BriefDescription": "Exception taken, FIQ not taken locally" + } + { + "PublicDescription": "Release consistency operation speculatively executed, Load-Acquire" + "EventCode": "0x90", + "EventName": "RC_LD_SPEC", + "BriefDescription": "Release consistency operation speculatively executed, Load-Acquire" + } + { + "PublicDescription": "Release consistency operation speculatively executed, Store-Release" + "EventCode": "0x91", + "EventName": "RC_ST_SPEC", + "BriefDescription": "Release consistency operation speculatively executed, Store-Release" + } + { + "PublicDescription": "Attributable Level 3 data or unified cache access, read" + "EventCode": "0xa0", + "EventName": "L3D_CACHE_RD", + "BriefDescription": "Attributable Level 3 data or unified cache access, read" + } + { + "PublicDescription": "Attributable Level 3 data or unified cache access, write" + "EventCode": "0xa1", + "EventName": "L3D_CACHE_WR", + "BriefDescription": "Attributable Level 3 data or unified cache access, write" + } + { + "PublicDescription": "Attributable Level 3 data or unified cache refill, read" + "EventCode": "0xa2", + "EventName": "L3D_CACHE_REFILL_RD", + "BriefDescription": "Attributable Level 3 data or unified cache refill, read" + } + { + "PublicDescription": "Attributable Level 3 data or unified cache refill, write" + "EventCode": "0xa3", + "EventName": "L3D_CACHE_REFILL_WR", + "BriefDescription": "Attributable Level 3 data or unified cache refill, write" + } + { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu May 24 04:43:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93983EFC85B; Thu, 24 May 2018 04:43:41 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34F4A73083; Thu, 24 May 2018 04:43:41 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1077A58C5; Thu, 24 May 2018 04:43:41 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O4henH010887; Thu, 24 May 2018 04:43:40 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O4hekA010886; Thu, 24 May 2018 04:43:40 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240443.w4O4hekA010886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 04:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334131 - head/usr.sbin/pmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/usr.sbin/pmcstat X-SVN-Commit-Revision: 334131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:43:41 -0000 Author: mmacy Date: Thu May 24 04:43:40 2018 New Revision: 334131 URL: https://svnweb.freebsd.org/changeset/base/334131 Log: pmcstat: don't compare signed and unsigned Modified: head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Thu May 24 04:38:17 2018 (r334130) +++ head/usr.sbin/pmcstat/pmcstat.c Thu May 24 04:43:40 2018 (r334131) @@ -425,7 +425,7 @@ main(int argc, char **argv) double interval; double duration; int option, npmc; - int c, check_driver_stats, current_sampling_count; + int c, check_driver_stats; int do_callchain, do_descendants, do_logproccsw, do_logprocexit; int do_print, do_read; size_t len; @@ -433,6 +433,7 @@ main(int argc, char **argv) int pipefd[2], rfd; int use_cumulative_counts; short cf, cb; + uint64_t current_sampling_count; char *end, *tmp; const char *errmsg, *graphfilename; enum pmcstat_state runstate; From owner-svn-src-head@freebsd.org Thu May 24 04:44:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEDA7EFC892; Thu, 24 May 2018 04:44:21 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x244.google.com (mail-qt0-x244.google.com [IPv6:2607:f8b0:400d:c0d::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 782E073164; Thu, 24 May 2018 04:44:21 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x244.google.com with SMTP id h2-v6so406821qtp.7; Wed, 23 May 2018 21:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=A/fb3ysf/Fsr65Eve1LVFb2srxQm+N+waaNmDKwf7hM=; b=UPWzptv6pOTPaovJqMaPog4QB4JGwCq1iYMuQuylB7PowD6aVjuSg/04hoWtPcV03W XF/Ovc+k+3VLwbcbRH2fqZc1r0RUQT9RTxYG3QzNDrtuNJerTjTZQGh6ssfQsBr3KpIB qvz+HNLolRYTIvJz2JWVOshM66wLACkU8dJyYHCi/Ds9Ij5fS23vNcCAql4/o4V4ZPh9 2graaylF1jZrYSyop2Wn/E/ckasxcsH5u888mv3OhuaT5ullLc6SSKx/EDKayR3Qncgt L1sxAklKOE53PRhK/Z7CWCzM3PDBq2f0NZ3trt2Mu+vOZeJ29qxX4c5P/COGYyH58ul+ O4Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=A/fb3ysf/Fsr65Eve1LVFb2srxQm+N+waaNmDKwf7hM=; b=QqVGtHBTe/7cAu66XcmzIFEZlI55AuZ8bcEdBGX6Sk9/YL87RjNtXNJHBAWOkXdKgx fddOUqF6/3195DSH7EFEXplhUlV6gXPBXqlRQfR+Vuo0yVf2o8rYSIhD457lwr8CfBeC OiIJj8n5SBbxsmT7AgLuooCvOuwqR1Fzxbv/v5SjHH9LetpMW04q6sKdec1ll87kEH+H cTeTz4dLSKZbhOo8NyB5wr/ItJv7XPOGeiDJGqlJq9/KImJbpnFZyH2qACmwn+If+fxH SO8bLKKdx1HiVuN6QroEbja70wzLEXYa5GLTHxyPUbQP+FYuQi05bCGga8Wd1X4APAw7 kWVQ== X-Gm-Message-State: ALKqPwdUhMID0rEN70LyQFIHMm0Whh2qkqzvrzLBKVXrKkgnksTFZKEE GZ4EQIqWGhcBWKKb9StAgmepNQBzyqm2ov7MHgU= X-Google-Smtp-Source: AB8JxZpYHBe/eReuMlYu+CoQUmS1vdRGj6bTHhogJ+SUibhvELdq47GlevAG0jaE9wn33QjRnDZdJbUscrX0G4eh7+w= X-Received: by 2002:ac8:1b59:: with SMTP id p25-v6mr5239960qtk.237.1527137060913; Wed, 23 May 2018 21:44:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:1c4e:0:0:0:0:0 with HTTP; Wed, 23 May 2018 21:44:20 -0700 (PDT) In-Reply-To: References: <201805231700.w4NH05hs047395@repo.freebsd.org> <2281830.zrSQodBeDb@ralph.baldwin.cx> From: Mateusz Guzik Date: Thu, 24 May 2018 06:44:20 +0200 Message-ID: Subject: Re: svn commit: r334104 - in head/sys: netinet sys To: "Jonathan T. Looney" Cc: Matthew Macy , John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:44:22 -0000 On Thu, May 24, 2018 at 2:40 AM, Jonathan T. Looney wrote: > On Wed, May 23, 2018 at 7:13 PM, Matthew Macy wrote: > > > > On Wed, May 23, 2018 at 11:52 AM, John Baldwin wrote: > > > On Wednesday, May 23, 2018 05:00:05 PM Matt Macy wrote: > > >> Author: mmacy > > >> Date: Wed May 23 17:00:05 2018 > > >> New Revision: 334104 > > >> URL: https://svnweb.freebsd.org/changeset/base/334104 > > >> > > >> Log: > > >> epoch: allow for conditionally asserting that the epoch context > fields > > >> are unused by zeroing on INVARIANTS builds > > > > > > Is M_ZERO really so bad that you need to make it conditional? > > > > In this case not at all. It's only exercised by sysctl handlers. I'm > > mostly responding to an inquiry by jtl. However, gratuitous M_ZERO > > usage does have a cumulative adverse performance impact. > > I appreciate you making this change. And, I do think it is worth avoiding > M_ZERO where it is unnecessary, for the reason you state. > > I agree that M_ZERO for no reason should be avoided, especially so with the current implementation of said zeroing (mandatory call to bzero, which is not fast either). > > > > I would probably have preferred something like 'M_ZERO_INVARIANTS' > > > instead perhaps (or M_ZERO_EPOCH) that only controls M_ZERO and is > > > still or'd with M_WAITOK or M_NOWAIT. > > > > Yes. I like that better too. Thanks. > > Yes, that does seem better. > > I fundamentally disagree with this part. If a known value of a given field is needed for assertion purposes, you can add (possibly conditional) code setting this specific value. It probably should not be zero if it can be helped. Conditional zeroing of the *whole* struct depending on invariants will *hide* uninitialized memory read bugs - production kernel will have whatever it happens to find, while *debug* kernel will guarantee to have all the values zeroed. In fact the flag actively combats redzoning. if the resulting allocation is zeroed, poisoning is actively neutered. But only if debug is enabled. That said, I find the change harmful. #define epoch_debug_init or similar can be used here instead. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Thu May 24 04:38:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB370EFC4B1; Thu, 24 May 2018 04:38:18 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DE2172B33; Thu, 24 May 2018 04:38:18 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F26B571A; Thu, 24 May 2018 04:38:18 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O4cI9P006166; Thu, 24 May 2018 04:38:18 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O4cINk006165; Thu, 24 May 2018 04:38:18 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240438.w4O4cINk006165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 04:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334130 - head/lib/libpmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/lib/libpmcstat X-SVN-Commit-Revision: 334130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:38:18 -0000 Author: mmacy Date: Thu May 24 04:38:17 2018 New Revision: 334130 URL: https://svnweb.freebsd.org/changeset/base/334130 Log: fix !amd64 signature for pmu_sample_rate_get Modified: head/lib/libpmcstat/libpmcstat_pmu_util.c Modified: head/lib/libpmcstat/libpmcstat_pmu_util.c ============================================================================== --- head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 04:31:53 2018 (r334129) +++ head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 04:38:17 2018 (r334130) @@ -124,5 +124,5 @@ pmcstat_pmu_sample_rate_get(const char *event_name) } #else -uint64_t pmcstat_pmu_sample_rate_get(void) { return (DEFAULT_SAMPLE_COUNT); } +uint64_t pmcstat_pmu_sample_rate_get(const char *event_name __unused) { return (DEFAULT_SAMPLE_COUNT); } #endif From owner-svn-src-head@freebsd.org Thu May 24 05:13:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA927EFDF9A; Thu, 24 May 2018 05:13:26 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 838DD74442; Thu, 24 May 2018 05:13:26 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 40C1ADFD2; Thu, 24 May 2018 05:13:26 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f177.google.com with SMTP id o185-v6so814691iod.0; Wed, 23 May 2018 22:13:26 -0700 (PDT) X-Gm-Message-State: ALKqPwdqqni40GN+N6KN8/EIlJzfo6fuk5DtE+fjVoYoIxZyhSFiWSk6 4yShJ4LNpzcVAu/hPfVih+oRYIqY+I1VQ9+j61Y= X-Google-Smtp-Source: AB8JxZo2uMwTVMaJ9lXOEc73L+WO2l+GgjRjrt6LXtpokSCdhzNLCE9SzV2YWYRHq/ZQXzf0vv2FxnGKgeDAuRUV6T4= X-Received: by 2002:a6b:a712:: with SMTP id q18-v6mr5145996ioe.237.1527138805531; Wed, 23 May 2018 22:13:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 22:13:25 -0700 (PDT) In-Reply-To: <20180524050717.GY71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <20180524050717.GY71675@FreeBSD.org> From: Matthew Macy Date: Wed, 23 May 2018 22:13:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Gleb Smirnoff Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 05:13:27 -0000 On Wed, May 23, 2018 at 10:07 PM, Gleb Smirnoff wrote: > Can you please explain the bug supposed to be fixed by r333860 QUESTION MARK Did I say it fixed a bug? Or are you saying we should just turn off compiler warnings because Gleb Smirnoff knows better? -M > On Wed, May 23, 2018 at 09:51:34PM -0700, Matthew Macy wrote: > M> Warnings find bugs PERIOD. Although most are not useful, I've found > M> quite a number of real issues from compiling with gcc8. > M> > M> If you want to _actually_ be helpful fix these: > M> https://people.freebsd.org/~mmacy/gcc8logs/GENERIC-NODEBUG.log > M> > M> https://people.freebsd.org/~mmacy/gcc8logs/GENERIC.log > M> > M> On Wed, May 23, 2018 at 9:42 PM, Gleb Smirnoff wrote: > M> > Let me repeat again. The warning is a false positive, and thus assignment > M> > isn't useful. I'm not worried about a single instruction, more about > M> > polluting the code. > M> > > M> > If the warning was escalated to build error, and we did carry about > M> > building with gcc8, in this case the assignment should be added with > M> > a comment /* pacify gcc */. > M> > > M> > On Wed, May 23, 2018 at 03:59:33PM -0700, Matthew Macy wrote: > M> > M> On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff wrote: > M> > M> > The initialization isn't useful. > M> > M> > M> > M> It silences a gcc warning. So yes it is. It's this exchange which is not useful. > M> > M> > M> > M> -M > M> > M> > M> > M> > M> > M> > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: > M> > M> > M> Talk to the gcc devs. The warning is useful even if there are false positives. > M> > M> > M> > M> > M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: > M> > M> > M> > Hi, > M> > M> > M> > > M> > M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: > M> > M> > M> > M> Author: mmacy > M> > M> > M> > M> Date: Sat May 19 05:10:51 2018 > M> > M> > M> > M> New Revision: 333860 > M> > M> > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 > M> > M> > M> > M> > M> > M> > M> > M> Log: > M> > M> > M> > M> sendfile: annotate unused value and ensure that npages is actually initialized > M> > M> > M> > M> > M> > M> > M> > M> Modified: > M> > M> > M> > M> head/sys/kern/kern_sendfile.c > M> > M> > M> > M> > M> > M> > M> > M> Modified: head/sys/kern/kern_sendfile.c > M> > M> > M> > M> ============================================================================== > M> > M> > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) > M> > M> > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) > M> > M> > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o > M> > M> > M> > M> } > M> > M> > M> > M> > M> > M> > M> > M> for (int i = 0; i < npages;) { > M> > M> > M> > M> - int j, a, count, rv; > M> > M> > M> > M> + int j, a, count, rv __unused; > M> > M> > M> > M> > M> > M> > M> > M> /* Skip valid pages. */ > M> > M> > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, > M> > M> > M> > M> @@ -688,6 +688,7 @@ retry_space: > M> > M> > M> > M> if (space == 0) { > M> > M> > M> > M> sfio = NULL; > M> > M> > M> > M> nios = 0; > M> > M> > M> > M> + npages = 0; > M> > M> > M> > M> goto prepend_header; > M> > M> > M> > M> } > M> > M> > M> > M> hdr_uio = NULL; > M> > M> > M> > > M> > M> > M> > This initialization is redundant and a compiler warning if exists is wrong. > M> > M> > M> > > M> > M> > M> > If we jump down to prepend_header with nios == 0, we won't ever use npages. > M> > M> > M> > > M> > M> > M> > -- > M> > M> > M> > Gleb Smirnoff > M> > M> > > M> > M> > -- > M> > M> > Gleb Smirnoff > M> > > M> > -- > M> > Gleb Smirnoff > > -- > Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu May 24 04:47:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BFE6EFCCAA; Thu, 24 May 2018 04:47:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DD48473500; Thu, 24 May 2018 04:47:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w4O4lk1G086998 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 May 2018 21:47:47 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w4O4lkvI086997; Wed, 23 May 2018 21:47:46 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 23 May 2018 21:47:46 -0700 From: Gleb Smirnoff To: Mateusz Guzik Cc: "Jonathan T. Looney" , Matthew Macy , John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334104 - in head/sys: netinet sys Message-ID: <20180524044746.GX71675@FreeBSD.org> References: <201805231700.w4NH05hs047395@repo.freebsd.org> <2281830.zrSQodBeDb@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:47:49 -0000 On Thu, May 24, 2018 at 06:44:20AM +0200, Mateusz Guzik wrote: M> I fundamentally disagree with this part. M> M> If a known value of a given field is needed for assertion purposes, you M> can add (possibly conditional) code setting this specific value. It M> probably should not be zero if it can be helped. M> M> Conditional zeroing of the *whole* struct depending on invariants will M> *hide* uninitialized memory read bugs - production kernel will have M> whatever it happens to find, while *debug* kernel will guarantee to M> have all the values zeroed. In fact the flag actively combats redzoning. M> if the resulting allocation is zeroed, poisoning is actively neutered. M> But only if debug is enabled. M> M> That said, I find the change harmful. +1 on fundamentally disagree with M_ZERO_INVARIANTS. It makes the INVARIANTS-enabled kernels to crash _later_ than production kernels, since instead of uma_junk it places clean zeroes. May be changes like that deserve more than a 30 minute time frame for review? -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu May 24 05:36:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 091A8EFF131; Thu, 24 May 2018 05:36:25 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A681575940; Thu, 24 May 2018 05:36:24 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 6A652E1C8; Thu, 24 May 2018 05:36:24 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f173.google.com with SMTP id a10-v6so841116ioc.9; Wed, 23 May 2018 22:36:24 -0700 (PDT) X-Gm-Message-State: ALKqPwcy1Q5Rqhgs7NhhPYN7y3/XvAn0s7NNI6wXbS5dst+AbfaPmU+m /U7A/+ImHLQPvhbixxoeg9bZ8VVB0j928GFuqNY= X-Google-Smtp-Source: ADUXVKIqi2zsN6TL3uFPAp4pBfqnx6vNdhVw6UwIe0SuofRg1fbZztVP+Wa5ilTLwOIKwDtQ0opIuG9h7r9ejGAW9v0= X-Received: by 2002:a6b:6707:: with SMTP id b7-v6mr48034ioc.132.1527140183893; Wed, 23 May 2018 22:36:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 22:36:23 -0700 (PDT) In-Reply-To: References: <201805240431.w4O4Vrvv004255@repo.freebsd.org> From: Matthew Macy Date: Wed, 23 May 2018 22:36:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334129 - head/sys/amd64/conf To: Ravi Pokala Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 05:36:25 -0000 On Wed, May 23, 2018 at 10:32 PM, Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Matt Macy > Date: 2018-05-23, Wednesday at 21:31 > To: , , > Subject: svn commit: r334129 - head/sys/amd64/conf > >> Author: mmacy >> Date: Thu May 24 04:31:53 2018 >> New Revision: 334129 >> URL: https://svnweb.freebsd.org/changeset/base/334129 >> >> Log: >> take NUMA out >> >> Modified: >> head/sys/amd64/conf/GENERIC-NODEBUG >> >> Modified: head/sys/amd64/conf/GENERIC-NODEBUG >> ============================================================================== >> --- head/sys/amd64/conf/GENERIC-NODEBUG Thu May 24 04:30:06 2018 (r334128) >> +++ head/sys/amd64/conf/GENERIC-NODEBUG Thu May 24 04:31:53 2018 (r334129) >> @@ -38,4 +38,3 @@ nooptions BUF_TRACKING >> nooptions DEADLKRES >> nooptions FULL_BUF_TRACKING >> >> -options NUMA > > Why? I ^C'd the prior commit too late. -M From owner-svn-src-head@freebsd.org Thu May 24 04:42:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FA8EEFC82B; Thu, 24 May 2018 04:42:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A76A872F8E; Thu, 24 May 2018 04:42:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w4O4gqmd086965 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 May 2018 21:42:52 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w4O4gqh1086964; Wed, 23 May 2018 21:42:52 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 23 May 2018 21:42:52 -0700 From: Gleb Smirnoff To: Matthew Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333860 - head/sys/kern Message-ID: <20180524044252.GW71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:42:55 -0000 Let me repeat again. The warning is a false positive, and thus assignment isn't useful. I'm not worried about a single instruction, more about polluting the code. If the warning was escalated to build error, and we did carry about building with gcc8, in this case the assignment should be added with a comment /* pacify gcc */. On Wed, May 23, 2018 at 03:59:33PM -0700, Matthew Macy wrote: M> On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff wrote: M> > The initialization isn't useful. M> M> It silences a gcc warning. So yes it is. It's this exchange which is not useful. M> M> -M M> M> M> > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: M> > M> Talk to the gcc devs. The warning is useful even if there are false positives. M> > M> M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: M> > M> > Hi, M> > M> > M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: M> > M> > M> Author: mmacy M> > M> > M> Date: Sat May 19 05:10:51 2018 M> > M> > M> New Revision: 333860 M> > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 M> > M> > M> M> > M> > M> Log: M> > M> > M> sendfile: annotate unused value and ensure that npages is actually initialized M> > M> > M> M> > M> > M> Modified: M> > M> > M> head/sys/kern/kern_sendfile.c M> > M> > M> M> > M> > M> Modified: head/sys/kern/kern_sendfile.c M> > M> > M> ============================================================================== M> > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) M> > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) M> > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o M> > M> > M> } M> > M> > M> M> > M> > M> for (int i = 0; i < npages;) { M> > M> > M> - int j, a, count, rv; M> > M> > M> + int j, a, count, rv __unused; M> > M> > M> M> > M> > M> /* Skip valid pages. */ M> > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, M> > M> > M> @@ -688,6 +688,7 @@ retry_space: M> > M> > M> if (space == 0) { M> > M> > M> sfio = NULL; M> > M> > M> nios = 0; M> > M> > M> + npages = 0; M> > M> > M> goto prepend_header; M> > M> > M> } M> > M> > M> hdr_uio = NULL; M> > M> > M> > M> > This initialization is redundant and a compiler warning if exists is wrong. M> > M> > M> > M> > If we jump down to prepend_header with nios == 0, we won't ever use npages. M> > M> > M> > M> > -- M> > M> > Gleb Smirnoff M> > M> > -- M> > Gleb Smirnoff -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu May 24 04:51:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C13DEFCFC7; Thu, 24 May 2018 04:51:36 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1550B73875; Thu, 24 May 2018 04:51:36 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id D26AFDDC9; Thu, 24 May 2018 04:51:35 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f44.google.com with SMTP id e185-v6so16225334ita.0; Wed, 23 May 2018 21:51:35 -0700 (PDT) X-Gm-Message-State: ALKqPwfo+XD4VUjdmqwKpPrleLFecClyL762DK9ZOHcwX0BAX/lbiUkJ cIdB4l2ZXDFuDDx2xjw9Y87PLo7hfUk/D1lifbo= X-Google-Smtp-Source: AB8JxZqnvzUZLU/uNkrobLC3lSLEyAnJg/f4fpnwUL0Mdu7p0kely7epr6UDvA6Egf+8y2D8qD9//tzUzeARx72BxCs= X-Received: by 2002:a24:5b54:: with SMTP id g81-v6mr7646830itb.7.1527137495268; Wed, 23 May 2018 21:51:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 21:51:34 -0700 (PDT) In-Reply-To: <20180524044252.GW71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> From: Matthew Macy Date: Wed, 23 May 2018 21:51:34 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Gleb Smirnoff Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 04:51:36 -0000 Warnings find bugs PERIOD. Although most are not useful, I've found quite a number of real issues from compiling with gcc8. If you want to _actually_ be helpful fix these: https://people.freebsd.org/~mmacy/gcc8logs/GENERIC-NODEBUG.log https://people.freebsd.org/~mmacy/gcc8logs/GENERIC.log On Wed, May 23, 2018 at 9:42 PM, Gleb Smirnoff wrote: > Let me repeat again. The warning is a false positive, and thus assignment > isn't useful. I'm not worried about a single instruction, more about > polluting the code. > > If the warning was escalated to build error, and we did carry about > building with gcc8, in this case the assignment should be added with > a comment /* pacify gcc */. > > On Wed, May 23, 2018 at 03:59:33PM -0700, Matthew Macy wrote: > M> On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff wrote: > M> > The initialization isn't useful. > M> > M> It silences a gcc warning. So yes it is. It's this exchange which is not useful. > M> > M> -M > M> > M> > M> > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: > M> > M> Talk to the gcc devs. The warning is useful even if there are false positives. > M> > M> > M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: > M> > M> > Hi, > M> > M> > > M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: > M> > M> > M> Author: mmacy > M> > M> > M> Date: Sat May 19 05:10:51 2018 > M> > M> > M> New Revision: 333860 > M> > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 > M> > M> > M> > M> > M> > M> Log: > M> > M> > M> sendfile: annotate unused value and ensure that npages is actually initialized > M> > M> > M> > M> > M> > M> Modified: > M> > M> > M> head/sys/kern/kern_sendfile.c > M> > M> > M> > M> > M> > M> Modified: head/sys/kern/kern_sendfile.c > M> > M> > M> ============================================================================== > M> > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) > M> > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) > M> > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o > M> > M> > M> } > M> > M> > M> > M> > M> > M> for (int i = 0; i < npages;) { > M> > M> > M> - int j, a, count, rv; > M> > M> > M> + int j, a, count, rv __unused; > M> > M> > M> > M> > M> > M> /* Skip valid pages. */ > M> > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, > M> > M> > M> @@ -688,6 +688,7 @@ retry_space: > M> > M> > M> if (space == 0) { > M> > M> > M> sfio = NULL; > M> > M> > M> nios = 0; > M> > M> > M> + npages = 0; > M> > M> > M> goto prepend_header; > M> > M> > M> } > M> > M> > M> hdr_uio = NULL; > M> > M> > > M> > M> > This initialization is redundant and a compiler warning if exists is wrong. > M> > M> > > M> > M> > If we jump down to prepend_header with nios == 0, we won't ever use npages. > M> > M> > > M> > M> > -- > M> > M> > Gleb Smirnoff > M> > > M> > -- > M> > Gleb Smirnoff > > -- > Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu May 24 05:07:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6465DEFDB51; Thu, 24 May 2018 05:07:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EFA7F7400A; Thu, 24 May 2018 05:07:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w4O57Ikg087062 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 May 2018 22:07:18 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w4O57HGW087061; Wed, 23 May 2018 22:07:17 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 23 May 2018 22:07:17 -0700 From: Gleb Smirnoff To: Matthew Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333860 - head/sys/kern Message-ID: <20180524050717.GY71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 05:07:20 -0000 Can you please explain the bug supposed to be fixed by r333860 QUESTION MARK On Wed, May 23, 2018 at 09:51:34PM -0700, Matthew Macy wrote: M> Warnings find bugs PERIOD. Although most are not useful, I've found M> quite a number of real issues from compiling with gcc8. M> M> If you want to _actually_ be helpful fix these: M> https://people.freebsd.org/~mmacy/gcc8logs/GENERIC-NODEBUG.log M> M> https://people.freebsd.org/~mmacy/gcc8logs/GENERIC.log M> M> On Wed, May 23, 2018 at 9:42 PM, Gleb Smirnoff wrote: M> > Let me repeat again. The warning is a false positive, and thus assignment M> > isn't useful. I'm not worried about a single instruction, more about M> > polluting the code. M> > M> > If the warning was escalated to build error, and we did carry about M> > building with gcc8, in this case the assignment should be added with M> > a comment /* pacify gcc */. M> > M> > On Wed, May 23, 2018 at 03:59:33PM -0700, Matthew Macy wrote: M> > M> On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff wrote: M> > M> > The initialization isn't useful. M> > M> M> > M> It silences a gcc warning. So yes it is. It's this exchange which is not useful. M> > M> M> > M> -M M> > M> M> > M> M> > M> > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: M> > M> > M> Talk to the gcc devs. The warning is useful even if there are false positives. M> > M> > M> M> > M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: M> > M> > M> > Hi, M> > M> > M> > M> > M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: M> > M> > M> > M> Author: mmacy M> > M> > M> > M> Date: Sat May 19 05:10:51 2018 M> > M> > M> > M> New Revision: 333860 M> > M> > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 M> > M> > M> > M> M> > M> > M> > M> Log: M> > M> > M> > M> sendfile: annotate unused value and ensure that npages is actually initialized M> > M> > M> > M> M> > M> > M> > M> Modified: M> > M> > M> > M> head/sys/kern/kern_sendfile.c M> > M> > M> > M> M> > M> > M> > M> Modified: head/sys/kern/kern_sendfile.c M> > M> > M> > M> ============================================================================== M> > M> > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) M> > M> > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) M> > M> > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o M> > M> > M> > M> } M> > M> > M> > M> M> > M> > M> > M> for (int i = 0; i < npages;) { M> > M> > M> > M> - int j, a, count, rv; M> > M> > M> > M> + int j, a, count, rv __unused; M> > M> > M> > M> M> > M> > M> > M> /* Skip valid pages. */ M> > M> > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, M> > M> > M> > M> @@ -688,6 +688,7 @@ retry_space: M> > M> > M> > M> if (space == 0) { M> > M> > M> > M> sfio = NULL; M> > M> > M> > M> nios = 0; M> > M> > M> > M> + npages = 0; M> > M> > M> > M> goto prepend_header; M> > M> > M> > M> } M> > M> > M> > M> hdr_uio = NULL; M> > M> > M> > M> > M> > M> > This initialization is redundant and a compiler warning if exists is wrong. M> > M> > M> > M> > M> > M> > If we jump down to prepend_header with nios == 0, we won't ever use npages. M> > M> > M> > M> > M> > M> > -- M> > M> > M> > Gleb Smirnoff M> > M> > M> > M> > -- M> > M> > Gleb Smirnoff M> > M> > -- M> > Gleb Smirnoff -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu May 24 05:25:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 458F3EFE99F; Thu, 24 May 2018 05:25:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id ADF2774D39; Thu, 24 May 2018 05:25:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w4O5PKxN087117 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 May 2018 22:25:20 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w4O5PKXi087116; Wed, 23 May 2018 22:25:20 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 23 May 2018 22:25:20 -0700 From: Gleb Smirnoff To: Matthew Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333860 - head/sys/kern Message-ID: <20180524052520.GZ71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <20180524050717.GY71675@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 05:25:23 -0000 On Wed, May 23, 2018 at 10:13:25PM -0700, Matthew Macy wrote: M> On Wed, May 23, 2018 at 10:07 PM, Gleb Smirnoff wrote: M> > Can you please explain the bug supposed to be fixed by r333860 QUESTION MARK M> M> Did I say it fixed a bug? Or are you saying we should just turn off M> compiler warnings because Gleb Smirnoff knows better? You just did say "Warnings find bugs PERIOD." This implicitly claimed that shutting this one fixed a bug. Indeed, I am saying that in this particular case Gleb Smirnoff knows better than gcc8 does. However, I'm not saying to turn off compiler warnings. Never said that. I am saying (several times already) not to insert redundant code to shut up a warning that is false. -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu May 24 06:36:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D388F59394; Thu, 24 May 2018 06:36:43 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2D0378A82; Thu, 24 May 2018 06:36:42 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id B6384E7CE; Thu, 24 May 2018 06:36:42 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f48.google.com with SMTP id d10-v6so1010815itj.1; Wed, 23 May 2018 23:36:42 -0700 (PDT) X-Gm-Message-State: ALKqPwfY8CpUFbX2BR2OIJ9FPhK9moo2njfg5yiaCiZueTn3XeoYhLw8 Dhi5Ln9lsk6vRpOYht6cH6rzSI7WrrjxMT32U7Y= X-Google-Smtp-Source: AB8JxZqTkqBK5Bf+IGeihjlAe9m7Dp1sEGg/HpO9qDNmDMYcOBK1wZZvtLme9WLa/It/SQkYd9V7KNDhr5Qi5191XE0= X-Received: by 2002:a24:5b54:: with SMTP id g81-v6mr7865494itb.7.1527143802111; Wed, 23 May 2018 23:36:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 23:36:41 -0700 (PDT) In-Reply-To: <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> From: Matthew Macy Date: Wed, 23 May 2018 23:36:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Michael Tuexen Cc: Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 06:36:43 -0000 On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen wrote: >> On 24. May 2018, at 06:51, Matthew Macy wrote: >> >> Warnings find bugs PERIOD. Although most are not useful, I've found > Some warnings indicate bugs, some warnings are just wrong. If you > have a "may be used uninitialized" warning being a false positive, you > may silences the warning by just set it to zero in the declaration and > you silence it. Other compilers might then correctly report an > assignment without affect... I have yet to see a double assignment be flagged as assignment without effect. If it _does_ occur then we have to disable the warning on the compiler that we have less faith in. -M > > Best regards > Michael >> quite a number of real issues from compiling with gcc8. >> >> If you want to _actually_ be helpful fix these: >> https://people.freebsd.org/~mmacy/gcc8logs/GENERIC-NODEBUG.log >> >> https://people.freebsd.org/~mmacy/gcc8logs/GENERIC.log >> >> On Wed, May 23, 2018 at 9:42 PM, Gleb Smirnoff wrote: >>> Let me repeat again. The warning is a false positive, and thus assignment >>> isn't useful. I'm not worried about a single instruction, more about >>> polluting the code. >>> >>> If the warning was escalated to build error, and we did carry about >>> building with gcc8, in this case the assignment should be added with >>> a comment /* pacify gcc */. >>> >>> On Wed, May 23, 2018 at 03:59:33PM -0700, Matthew Macy wrote: >>> M> On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff wrote: >>> M> > The initialization isn't useful. >>> M> >>> M> It silences a gcc warning. So yes it is. It's this exchange which is not useful. >>> M> >>> M> -M >>> M> >>> M> >>> M> > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: >>> M> > M> Talk to the gcc devs. The warning is useful even if there are false positives. >>> M> > M> >>> M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: >>> M> > M> > Hi, >>> M> > M> > >>> M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: >>> M> > M> > M> Author: mmacy >>> M> > M> > M> Date: Sat May 19 05:10:51 2018 >>> M> > M> > M> New Revision: 333860 >>> M> > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 >>> M> > M> > M> >>> M> > M> > M> Log: >>> M> > M> > M> sendfile: annotate unused value and ensure that npages is actually initialized >>> M> > M> > M> >>> M> > M> > M> Modified: >>> M> > M> > M> head/sys/kern/kern_sendfile.c >>> M> > M> > M> >>> M> > M> > M> Modified: head/sys/kern/kern_sendfile.c >>> M> > M> > M> ============================================================================== >>> M> > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) >>> M> > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) >>> M> > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o >>> M> > M> > M> } >>> M> > M> > M> >>> M> > M> > M> for (int i = 0; i < npages;) { >>> M> > M> > M> - int j, a, count, rv; >>> M> > M> > M> + int j, a, count, rv __unused; >>> M> > M> > M> >>> M> > M> > M> /* Skip valid pages. */ >>> M> > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, >>> M> > M> > M> @@ -688,6 +688,7 @@ retry_space: >>> M> > M> > M> if (space == 0) { >>> M> > M> > M> sfio = NULL; >>> M> > M> > M> nios = 0; >>> M> > M> > M> + npages = 0; >>> M> > M> > M> goto prepend_header; >>> M> > M> > M> } >>> M> > M> > M> hdr_uio = NULL; >>> M> > M> > >>> M> > M> > This initialization is redundant and a compiler warning if exists is wrong. >>> M> > M> > >>> M> > M> > If we jump down to prepend_header with nios == 0, we won't ever use npages. >>> M> > M> > >>> M> > M> > -- >>> M> > M> > Gleb Smirnoff >>> M> > >>> M> > -- >>> M> > Gleb Smirnoff >>> >>> -- >>> Gleb Smirnoff >> > From owner-svn-src-head@freebsd.org Thu May 24 05:32:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E727EFEF95; Thu, 24 May 2018 05:32:06 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36776753E3; Thu, 24 May 2018 05:32:06 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.4] (c-73-241-240-124.hsd1.ca.comcast.net [73.241.240.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 8CBB4E1C6; Thu, 24 May 2018 05:32:05 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.d.0.180513 Date: Wed, 23 May 2018 22:32:02 -0700 Subject: Re: svn commit: r334129 - head/sys/amd64/conf From: Ravi Pokala To: Matt Macy , , , Message-ID: Thread-Topic: svn commit: r334129 - head/sys/amd64/conf References: <201805240431.w4O4Vrvv004255@repo.freebsd.org> In-Reply-To: <201805240431.w4O4Vrvv004255@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 05:32:06 -0000 -----Original Message----- From: on behalf of Matt Macy Date: 2018-05-23, Wednesday at 21:31 To: , , Subject: svn commit: r334129 - head/sys/amd64/conf > Author: mmacy > Date: Thu May 24 04:31:53 2018 > New Revision: 334129 > URL: https://svnweb.freebsd.org/changeset/base/334129 > > Log: > take NUMA out > > Modified: > head/sys/amd64/conf/GENERIC-NODEBUG > > Modified: head/sys/amd64/conf/GENERIC-NODEBUG > ============================================================================== > --- head/sys/amd64/conf/GENERIC-NODEBUG Thu May 24 04:30:06 2018 (r334128) > +++ head/sys/amd64/conf/GENERIC-NODEBUG Thu May 24 04:31:53 2018 (r334129) > @@ -38,4 +38,3 @@ nooptions BUF_TRACKING > nooptions DEADLKRES > nooptions FULL_BUF_TRACKING > > -options NUMA Why? -Ravi (rpokala@) From owner-svn-src-head@freebsd.org Thu May 24 05:33:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23D96EFEFF8; Thu, 24 May 2018 05:33:15 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0285755D6; Thu, 24 May 2018 05:33:13 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id F0624E1C7; Thu, 24 May 2018 05:33:11 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f42.google.com with SMTP id d10-v6so862272itj.1; Wed, 23 May 2018 22:33:11 -0700 (PDT) X-Gm-Message-State: ALKqPwdDpLqNY18i+xdGm7i6OygGz5dKG/jH8pvylFXVpAS7G/CSxGDp yWR8lbIIskEdAn97ywQz/mh+nrSWlpHLmNZkM0A= X-Google-Smtp-Source: AB8JxZryRZI7Ypmst9S3NJ5a/fiHwOjMj4sCarH5dzKQnZSTU7pROgq2dHV67z5eW4g9AUAl5P6j6Kg2a0BHmwkOdrg= X-Received: by 2002:a24:ddcc:: with SMTP id t195-v6mr7841947itf.77.1527139990828; Wed, 23 May 2018 22:33:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 22:33:10 -0700 (PDT) In-Reply-To: <20180524052520.GZ71675@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <20180524050717.GY71675@FreeBSD.org> <20180524052520.GZ71675@FreeBSD.org> From: Matthew Macy Date: Wed, 23 May 2018 22:33:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Gleb Smirnoff Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 05:33:15 -0000 On Wed, May 23, 2018 at 10:25 PM, Gleb Smirnoff wrote: > On Wed, May 23, 2018 at 10:13:25PM -0700, Matthew Macy wrote: > M> On Wed, May 23, 2018 at 10:07 PM, Gleb Smirnoff wrote: > M> > Can you please explain the bug supposed to be fixed by r333860 QUESTION MARK > M> > M> Did I say it fixed a bug? Or are you saying we should just turn off > M> compiler warnings because Gleb Smirnoff knows better? > > You just did say "Warnings find bugs PERIOD." This implicitly claimed > that shutting this one fixed a bug. > > Indeed, I am saying that in this particular case Gleb Smirnoff knows > better than gcc8 does. However, I'm not saying to turn off compiler warnings. > Never said that. I am saying (several times already) not to insert redundant > code to shut up a warning that is false. I'm not saying you're right or wrong. On initial inspection it appeared uninitialized. I may be wrong. I never asserted that you were wrong. What I'm trying to understand is what your desired policy with respect to warnings is. If the author knows that a warning is false he should a) Disable that warning for the entire build because it is wrong in one case? b) Edit the Makefile to disable the warning for that file? c) Leave the warning enabled and just permit a noisy build where the warning potentially drowns out real issues? Right now you're discussing a single line in a single file when in fact this is a kernel wide policy issue. All three of these choices seem less desirable than selectively placating the compiler as I have en masse for much of the tree. -M From owner-svn-src-head@freebsd.org Thu May 24 05:33:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 111B1EFF01D; Thu, 24 May 2018 05:33:41 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A44B275708; Thu, 24 May 2018 05:33:40 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qk0-x22f.google.com with SMTP id c198-v6so311399qkg.12; Wed, 23 May 2018 22:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SrvdCjxyTcBUs5NR5WlmbZ9K+hxV16fbbHFsfzwlP/U=; b=cUtXyB549+Ws9ZQVPoLfoqspH+qX4GeYa12FEgbrVsLS9pXME/yGddK0dO1V5VkQe3 Lt/oVrdJIHgXWX8j/p77D0gzAAGH20+ryDn3bSFbMzYz/B+b+NzmMs24zGP/64rvO7TR QbPNAEaxZLJewdeeCHmj3LdaIr7DIqyXTzdfo1mstj66jxOssx0JifWsm0FnGPdQMhzF O+WcCau8gDFA68Ome3goViO8zkvFo7vmHo7kTIId3LrA7B755WQX9TI98uppmaGCq0Et 2eYs59fCcb7WMB7TgmZajcUUQFTShYQ2xxJM9e1i8+5CY90+1tIT75ydCFTow2T6V/UU nXWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SrvdCjxyTcBUs5NR5WlmbZ9K+hxV16fbbHFsfzwlP/U=; b=eqmlLqE7OHRlkdl2pAIBM8RriTzT3FRylRIm4GVuJICrQUrHqhxIO8EcTGEE9qC1EY u7XM4PVev2fpsOFg1H9suxfqIXfcRu3YY58MiyVzvCu86n0otXkrmSmdTWFl/F99EfD8 hPYh831t3/pz9wsrE+fZLryOj58u/g+OBEUIo5F7K7l9K4B6OSxrjRoljOoYkeqXlISa LfTFJhLi6OHweGPsWpWTr0oppmntLbgoT19yaD2zOT2cFqCywhaz3fpkPHbXkhLllUY4 +KLAzFd0aHDYMEcQ3JpaDo4wLSGo3JjOyhQnNkg/OPNpwPfBr7Lwo0n6cEYQHSp3eI0V Pkhg== X-Gm-Message-State: ALKqPwdzN2+kuAAzB+5PiUKty8orALezVtpICKnvSjlwrd4+jkNtgjR5 PRpLudTV7LHsQT1kkiChcx93Jss/JqVyExWkMrQ= X-Google-Smtp-Source: ADUXVKKkGwW0J0/9Qx7tVb6FStg0ir0oAkuxpTLK1FrJdJsrRrWF8QqWBpNp514VDuo76mm845Fj0xiPYnixylt+qzs= X-Received: by 2002:a37:7dc1:: with SMTP id y184-v6mr5042416qkc.311.1527140020089; Wed, 23 May 2018 22:33:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:1c4e:0:0:0:0:0 with HTTP; Wed, 23 May 2018 22:33:39 -0700 (PDT) In-Reply-To: References: <201805240431.w4O4Vrvv004255@repo.freebsd.org> From: Mateusz Guzik Date: Thu, 24 May 2018 07:33:39 +0200 Message-ID: Subject: Re: svn commit: r334129 - head/sys/amd64/conf To: Ravi Pokala Cc: Matt Macy , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 05:33:41 -0000 it clearly crept in by acccident from unrelated local changes. if numa was to be enabled, it would be in GENERIC. i was pastering jeff to enable it for quite some time now, maybe a survey will help On Thu, May 24, 2018 at 7:32 AM, Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Matt Macy > > Date: 2018-05-23, Wednesday at 21:31 > To: , , < > svn-src-head@freebsd.org> > Subject: svn commit: r334129 - head/sys/amd64/conf > > > Author: mmacy > > Date: Thu May 24 04:31:53 2018 > > New Revision: 334129 > > URL: https://svnweb.freebsd.org/changeset/base/334129 > > > > Log: > > take NUMA out > > > > Modified: > > head/sys/amd64/conf/GENERIC-NODEBUG > > > > Modified: head/sys/amd64/conf/GENERIC-NODEBUG > > ============================================================ > ================== > > --- head/sys/amd64/conf/GENERIC-NODEBUG Thu May 24 04:30:06 2018 > (r334128) > > +++ head/sys/amd64/conf/GENERIC-NODEBUG Thu May 24 04:31:53 2018 > (r334129) > > @@ -38,4 +38,3 @@ nooptions BUF_TRACKING > > nooptions DEADLKRES > > nooptions FULL_BUF_TRACKING > > > > -options NUMA > > Why? > > -Ravi (rpokala@) > > > > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Thu May 24 06:34:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BDECF5903E; Thu, 24 May 2018 06:34:53 +0000 (UTC) (envelope-from Michael.Tuexen@macmic.franken.de) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DFD8788A1; Thu, 24 May 2018 06:34:52 +0000 (UTC) (envelope-from Michael.Tuexen@macmic.franken.de) Received: from [IPv6:2a02:c6a0:3061:5015:d5fd:469e:8c1d:2921] (unknown [IPv6:2a02:c6a0:3061:5015:d5fd:469e:8c1d:2921]) (Authenticated sender: macmic) by drew.franken.de (Postfix) with ESMTPSA id 75346721E280C; Thu, 24 May 2018 08:34:48 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: svn commit: r333860 - head/sys/kern From: Michael Tuexen In-Reply-To: Date: Thu, 24 May 2018 08:35:30 +0200 Cc: Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> To: Matthew Macy X-Mailer: Apple Mail (2.3445.6.18) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 06:34:53 -0000 > On 24. May 2018, at 06:51, Matthew Macy wrote: >=20 > Warnings find bugs PERIOD. Although most are not useful, I've found Some warnings indicate bugs, some warnings are just wrong. If you have a "may be used uninitialized" warning being a false positive, you may silences the warning by just set it to zero in the declaration and you silence it. Other compilers might then correctly report an assignment without affect... Best regards Michael > quite a number of real issues from compiling with gcc8. >=20 > If you want to _actually_ be helpful fix these: > https://people.freebsd.org/~mmacy/gcc8logs/GENERIC-NODEBUG.log >=20 > https://people.freebsd.org/~mmacy/gcc8logs/GENERIC.log >=20 > On Wed, May 23, 2018 at 9:42 PM, Gleb Smirnoff = wrote: >> Let me repeat again. The warning is a false positive, and thus = assignment >> isn't useful. I'm not worried about a single instruction, more about >> polluting the code. >>=20 >> If the warning was escalated to build error, and we did carry about >> building with gcc8, in this case the assignment should be added with >> a comment /* pacify gcc */. >>=20 >> On Wed, May 23, 2018 at 03:59:33PM -0700, Matthew Macy wrote: >> M> On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff = wrote: >> M> > The initialization isn't useful. >> M> >> M> It silences a gcc warning. So yes it is. It's this exchange which = is not useful. >> M> >> M> -M >> M> >> M> >> M> > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: >> M> > M> Talk to the gcc devs. The warning is useful even if there are = false positives. >> M> > M> >> M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff = wrote: >> M> > M> > Hi, >> M> > M> > >> M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: >> M> > M> > M> Author: mmacy >> M> > M> > M> Date: Sat May 19 05:10:51 2018 >> M> > M> > M> New Revision: 333860 >> M> > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 >> M> > M> > M> >> M> > M> > M> Log: >> M> > M> > M> sendfile: annotate unused value and ensure that npages = is actually initialized >> M> > M> > M> >> M> > M> > M> Modified: >> M> > M> > M> head/sys/kern/kern_sendfile.c >> M> > M> > M> >> M> > M> > M> Modified: head/sys/kern/kern_sendfile.c >> M> > M> > M> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> M> > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 = 2018 (r333859) >> M> > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 = 2018 (r333860) >> M> > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, = struct sf_io *sfio, o >> M> > M> > M> } >> M> > M> > M> >> M> > M> > M> for (int i =3D 0; i < npages;) { >> M> > M> > M> - int j, a, count, rv; >> M> > M> > M> + int j, a, count, rv __unused; >> M> > M> > M> >> M> > M> > M> /* Skip valid pages. */ >> M> > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & = PAGE_MASK, >> M> > M> > M> @@ -688,6 +688,7 @@ retry_space: >> M> > M> > M> if (space =3D=3D 0) { >> M> > M> > M> sfio =3D NULL; >> M> > M> > M> nios =3D 0; >> M> > M> > M> + npages =3D 0; >> M> > M> > M> goto prepend_header; >> M> > M> > M> } >> M> > M> > M> hdr_uio =3D NULL; >> M> > M> > >> M> > M> > This initialization is redundant and a compiler warning if = exists is wrong. >> M> > M> > >> M> > M> > If we jump down to prepend_header with nios =3D=3D 0, we = won't ever use npages. >> M> > M> > >> M> > M> > -- >> M> > M> > Gleb Smirnoff >> M> > >> M> > -- >> M> > Gleb Smirnoff >>=20 >> -- >> Gleb Smirnoff >=20 From owner-svn-src-head@freebsd.org Thu May 24 06:41:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 519D0F59E3A; Thu, 24 May 2018 06:41:46 +0000 (UTC) (envelope-from Michael.Tuexen@macmic.franken.de) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9ED8791CF; Thu, 24 May 2018 06:41:45 +0000 (UTC) (envelope-from Michael.Tuexen@macmic.franken.de) Received: from [IPv6:2a02:c6a0:3061:5015:d5fd:469e:8c1d:2921] (unknown [IPv6:2a02:c6a0:3061:5015:d5fd:469e:8c1d:2921]) (Authenticated sender: macmic) by drew.franken.de (Postfix) with ESMTPSA id BDCA0721E280C; Thu, 24 May 2018 08:41:36 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: svn commit: r333860 - head/sys/kern From: Michael Tuexen In-Reply-To: Date: Thu, 24 May 2018 08:42:18 +0200 Cc: Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> To: Matthew Macy X-Mailer: Apple Mail (2.3445.6.18) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 06:41:46 -0000 > On 24. May 2018, at 08:36, Matthew Macy wrote: >=20 > On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen > wrote: >>> On 24. May 2018, at 06:51, Matthew Macy wrote: >>>=20 >>> Warnings find bugs PERIOD. Although most are not useful, I've found >> Some warnings indicate bugs, some warnings are just wrong. If you >> have a "may be used uninitialized" warning being a false positive, = you >> may silences the warning by just set it to zero in the declaration = and >> you silence it. Other compilers might then correctly report an >> assignment without affect... >=20 > I have yet to see a double assignment be flagged as assignment without > effect. If it _does_ occur then we have to disable the warning on the > compiler that we have less faith in. Have seen it in the past in a difference project... But you miss my = point: Not all warnings indicate bugs PERIOD. Some warning are just wrong... Best regards Michael > -M >=20 >=20 >>=20 >> Best regards >> Michael >>> quite a number of real issues from compiling with gcc8. >>>=20 >>> If you want to _actually_ be helpful fix these: >>> https://people.freebsd.org/~mmacy/gcc8logs/GENERIC-NODEBUG.log >>>=20 >>> https://people.freebsd.org/~mmacy/gcc8logs/GENERIC.log >>>=20 >>> On Wed, May 23, 2018 at 9:42 PM, Gleb Smirnoff = wrote: >>>> Let me repeat again. The warning is a false positive, and thus = assignment >>>> isn't useful. I'm not worried about a single instruction, more = about >>>> polluting the code. >>>>=20 >>>> If the warning was escalated to build error, and we did carry about >>>> building with gcc8, in this case the assignment should be added = with >>>> a comment /* pacify gcc */. >>>>=20 >>>> On Wed, May 23, 2018 at 03:59:33PM -0700, Matthew Macy wrote: >>>> M> On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff = wrote: >>>> M> > The initialization isn't useful. >>>> M> >>>> M> It silences a gcc warning. So yes it is. It's this exchange = which is not useful. >>>> M> >>>> M> -M >>>> M> >>>> M> >>>> M> > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: >>>> M> > M> Talk to the gcc devs. The warning is useful even if there = are false positives. >>>> M> > M> >>>> M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff = wrote: >>>> M> > M> > Hi, >>>> M> > M> > >>>> M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy = wrote: >>>> M> > M> > M> Author: mmacy >>>> M> > M> > M> Date: Sat May 19 05:10:51 2018 >>>> M> > M> > M> New Revision: 333860 >>>> M> > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 >>>> M> > M> > M> >>>> M> > M> > M> Log: >>>> M> > M> > M> sendfile: annotate unused value and ensure that = npages is actually initialized >>>> M> > M> > M> >>>> M> > M> > M> Modified: >>>> M> > M> > M> head/sys/kern/kern_sendfile.c >>>> M> > M> > M> >>>> M> > M> > M> Modified: head/sys/kern/kern_sendfile.c >>>> M> > M> > M> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>> M> > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 = 05:09:10 2018 (r333859) >>>> M> > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 = 05:10:51 2018 (r333860) >>>> M> > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, = struct sf_io *sfio, o >>>> M> > M> > M> } >>>> M> > M> > M> >>>> M> > M> > M> for (int i =3D 0; i < npages;) { >>>> M> > M> > M> - int j, a, count, rv; >>>> M> > M> > M> + int j, a, count, rv __unused; >>>> M> > M> > M> >>>> M> > M> > M> /* Skip valid pages. */ >>>> M> > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) = & PAGE_MASK, >>>> M> > M> > M> @@ -688,6 +688,7 @@ retry_space: >>>> M> > M> > M> if (space =3D=3D 0) { >>>> M> > M> > M> sfio =3D NULL; >>>> M> > M> > M> nios =3D 0; >>>> M> > M> > M> + npages =3D 0; >>>> M> > M> > M> goto prepend_header; >>>> M> > M> > M> } >>>> M> > M> > M> hdr_uio =3D NULL; >>>> M> > M> > >>>> M> > M> > This initialization is redundant and a compiler warning = if exists is wrong. >>>> M> > M> > >>>> M> > M> > If we jump down to prepend_header with nios =3D=3D 0, we = won't ever use npages. >>>> M> > M> > >>>> M> > M> > -- >>>> M> > M> > Gleb Smirnoff >>>> M> > >>>> M> > -- >>>> M> > Gleb Smirnoff >>>>=20 >>>> -- >>>> Gleb Smirnoff >>>=20 >>=20 From owner-svn-src-head@freebsd.org Thu May 24 06:44:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3137F5D08B; Thu, 24 May 2018 06:44:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 530EB79453; Thu, 24 May 2018 06:44:07 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 341C56C5D; Thu, 24 May 2018 06:44:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O6i6uv070830; Thu, 24 May 2018 06:44:06 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O6i6IF070829; Thu, 24 May 2018 06:44:06 GMT (envelope-from np@FreeBSD.org) Message-Id: <201805240644.w4O6i6IF070829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 24 May 2018 06:44:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334132 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 334132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 06:44:07 -0000 Author: np Date: Thu May 24 06:44:06 2018 New Revision: 334132 URL: https://svnweb.freebsd.org/changeset/base/334132 Log: cxgbe(4): Make sure that the egress queue's cidx is updated periodically when the driver is writing WRs using start_wrq_wr/commit_wrq_wr all the time. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu May 24 04:43:40 2018 (r334131) +++ head/sys/dev/cxgbe/t4_sge.c Thu May 24 06:44:06 2018 (r334132) @@ -2367,9 +2367,29 @@ commit_wrq_wr(struct sge_wrq *wrq, void *w, struct wrq next = TAILQ_NEXT(cookie, link); if (prev == NULL) { MPASS(pidx == eq->dbidx); - if (next == NULL || ndesc >= 16) + if (next == NULL || ndesc >= 16) { + int available; + struct fw_eth_tx_pkt_wr *dst; /* any fw WR struct will do */ + + /* + * Note that the WR via which we'll request tx updates + * is at pidx and not eq->pidx, which has moved on + * already. + */ + dst = (void *)&eq->desc[pidx]; + available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; + if (available < eq->sidx / 4 && + atomic_cmpset_int(&eq->equiq, 0, 1)) { + dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUIQ | + F_FW_WR_EQUEQ); + eq->equeqidx = pidx; + } else if (IDXDIFF(eq->pidx, eq->equeqidx, eq->sidx) >= 32) { + dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); + eq->equeqidx = pidx; + } + ring_eq_db(wrq->adapter, eq, ndesc); - else { + } else { MPASS(IDXDIFF(next->pidx, pidx, eq->sidx) == ndesc); next->pidx = pidx; next->ndesc += ndesc; From owner-svn-src-head@freebsd.org Thu May 24 06:47:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D5E2F5D213; Thu, 24 May 2018 06:47:05 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E911C7966C; Thu, 24 May 2018 06:47:04 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE8076C5F; Thu, 24 May 2018 06:47:04 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O6l4ex070981; Thu, 24 May 2018 06:47:04 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O6l4sC070980; Thu, 24 May 2018 06:47:04 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240647.w4O6l4sC070980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 06:47:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334133 - head/usr.sbin/pmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/usr.sbin/pmcstat X-SVN-Commit-Revision: 334133 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 06:47:05 -0000 Author: mmacy Date: Thu May 24 06:47:04 2018 New Revision: 334133 URL: https://svnweb.freebsd.org/changeset/base/334133 Log: pmcstat top mode + -I - use fully qualified address Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_callgraph.c Thu May 24 06:44:06 2018 (r334132) +++ head/usr.sbin/pmcstat/pmcpl_callgraph.c Thu May 24 06:47:04 2018 (r334133) @@ -495,7 +495,7 @@ pmcstat_cgnode_topprint(struct pmcstat_cgnode *cg, pmcstat_string_unintern(sym->ps_name)); } else snprintf(ns, sizeof(ns), "%p", - (void *)cg->pcg_func); + (void *)(cg->pcg_image->pi_vaddr + cg->pcg_func)); PMCSTAT_ATTRON(v_attrs); PMCSTAT_PRINTW("%5.5s", vs); From owner-svn-src-head@freebsd.org Thu May 24 06:47:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BCC1F5D260; Thu, 24 May 2018 06:47:41 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C5C12797AD; Thu, 24 May 2018 06:47:40 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E3C96C61; Thu, 24 May 2018 06:47:40 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O6leAK071042; Thu, 24 May 2018 06:47:40 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O6lesD071041; Thu, 24 May 2018 06:47:40 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240647.w4O6lesD071041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 06:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334134 - head/lib/libpmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/lib/libpmcstat X-SVN-Commit-Revision: 334134 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 06:47:41 -0000 Author: mmacy Date: Thu May 24 06:47:40 2018 New Revision: 334134 URL: https://svnweb.freebsd.org/changeset/base/334134 Log: libpmcstat: import aliases table and bug fixes Modified: head/lib/libpmcstat/libpmcstat_pmu_util.c Modified: head/lib/libpmcstat/libpmcstat_pmu_util.c ============================================================================== --- head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 06:47:04 2018 (r334133) +++ head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 06:47:40 2018 (r334134) @@ -42,6 +42,39 @@ #include "pmu-events/pmu-events.h" #if defined(__amd64__) +struct pmu_alias { + const char *pa_alias; + const char *pa_name; +}; +static struct pmu_alias pmu_alias_table[] = { + { "UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, + { "UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, + { "LLC_MISSES", "LONGEST_LAT_CACHE.MISS"}, + { "LLC-MISSES", "LONGEST_LAT_CACHE.MISS"}, + { "LLC_REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, + { "LLC-REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, + { "LLC_MISS_RHITM", "mem_load_l3_miss_retired.remote_hitm"}, + { "LLC-MISS-RHITM", "mem_load_l3_miss_retired.remote_hitm"}, + { "RESOURCE_STALL", "RESOURCE_STALLS.ANY"}, + { "RESOURCE_STALLS_ANY", "RESOURCE_STALLS.ANY"}, + { "BRANCH_INSTRUCTION_RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, + { "BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, + { "BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, + { "BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, + { NULL, NULL }, +}; + +static const char * +pmu_alias_get(const char *name) +{ + struct pmu_alias *pa; + + for (pa = pmu_alias_table; pa->pa_alias != NULL; pa++) + if (strcasecmp(name, pa->pa_alias) == 0) + return (pa->pa_name); + return (name); +} + struct pmu_event_desc { uint32_t ped_umask; uint32_t ped_event; @@ -75,9 +108,12 @@ pmu_event_get(const char *event_name) if ((pme = pmu_events_map_get()) == NULL) return (NULL); - for (pe = pme->table; pe->name != NULL; pe++) - if (strcmp(pe->name, event_name) == 0) + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { + if (pe->name == NULL) + continue; + if (strcasecmp(pe->name, event_name) == 0) return (pe); + } return (NULL); } @@ -100,7 +136,7 @@ pmu_parse_event(struct pmu_event_desc *ped, const char if (strcmp(key, "event") == 0) ped->ped_event = strtol(value, NULL, 16); if (strcmp(key, "period") == 0) - ped->ped_umask = strtol(value, NULL, 10); + ped->ped_period = strtol(value, NULL, 10); } free(event); return (0); @@ -112,6 +148,7 @@ pmcstat_pmu_sample_rate_get(const char *event_name) const struct pmu_event *pe; struct pmu_event_desc ped; + event_name = pmu_alias_get(event_name); if ((pe = pmu_event_get(event_name)) == NULL) return (DEFAULT_SAMPLE_COUNT); if (pe->alias && (pe = pmu_event_get(pe->alias)) == NULL) From owner-svn-src-head@freebsd.org Thu May 24 06:50:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46A61F5D3B0; Thu, 24 May 2018 06:50:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA3E79A87; Thu, 24 May 2018 06:50:33 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id Lk4zfGi75vB5RLk50fyFYV; Thu, 24 May 2018 00:50:31 -0600 X-Authority-Analysis: v=2.3 cv=PvS9kTE3 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=4XXRiJT-kNww1N-uVO8A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id B556E8C6; Wed, 23 May 2018 23:50:28 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4O6oSMk003789; Wed, 23 May 2018 23:50:28 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4O6oSLw003786; Wed, 23 May 2018 23:50:28 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805240650.w4O6oSLw003786@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Matt Macy cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334134 - head/lib/libpmcstat In-Reply-To: Message from Matt Macy of "Thu, 24 May 2018 06:47:40 -0000." <201805240647.w4O6lesD071041@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 23 May 2018 23:50:28 -0700 X-CMAE-Envelope: MS4wfEbrUFsRjBF+wlMPF+WEcwvmeApPIwAJm5TiUAW1P6/jhjD0xdM+/omTKWocj16IzM9OneVJ9RPr7BlmwWfFfWajglnko/Ka4BEbfkU/8gUjiBvB4HHu b26OSK+AgfM6UYIOh0PdWA4btXGqKc1WTX9Shro3rQ6RZxV+W6HmNLo4lfPOeAgdO/fzmRqbceHYi1wGPtTuZGmUEOWH7XuHAbZxBc+lh1U+rg+f2Rq6IRZM KYjKcB+DaDK33EFSWzTTUGdcVmgortefU4medUZPvCg+lpEOIgYqQirGdfxo9ZC0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 06:50:34 -0000 In message <201805240647.w4O6lesD071041@repo.freebsd.org>, Matt Macy writes: > Author: mmacy > Date: Thu May 24 06:47:40 2018 > New Revision: 334134 > URL: https://svnweb.freebsd.org/changeset/base/334134 > > Log: > libpmcstat: import aliases table and bug fixes Which bugs? > > Modified: > head/lib/libpmcstat/libpmcstat_pmu_util.c > > Modified: head/lib/libpmcstat/libpmcstat_pmu_util.c > ============================================================================= > = > --- head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 06:47:04 2018 > (r334133) > +++ head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 06:47:40 2018 > (r334134) > @@ -42,6 +42,39 @@ > #include "pmu-events/pmu-events.h" > > #if defined(__amd64__) > +struct pmu_alias { > + const char *pa_alias; > + const char *pa_name; > +}; > +static struct pmu_alias pmu_alias_table[] = { > + { "UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, > + { "UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, > + { "LLC_MISSES", "LONGEST_LAT_CACHE.MISS"}, > + { "LLC-MISSES", "LONGEST_LAT_CACHE.MISS"}, > + { "LLC_REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, > + { "LLC-REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, > + { "LLC_MISS_RHITM", "mem_load_l3_miss_retired.remote_hitm"}, > + { "LLC-MISS-RHITM", "mem_load_l3_miss_retired.remote_hitm"}, > + { "RESOURCE_STALL", "RESOURCE_STALLS.ANY"}, > + { "RESOURCE_STALLS_ANY", "RESOURCE_STALLS.ANY"}, > + { "BRANCH_INSTRUCTION_RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, > + { "BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, > + { "BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, > + { "BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, > + { NULL, NULL }, > +}; > + > +static const char * > +pmu_alias_get(const char *name) > +{ > + struct pmu_alias *pa; > + > + for (pa = pmu_alias_table; pa->pa_alias != NULL; pa++) > + if (strcasecmp(name, pa->pa_alias) == 0) > + return (pa->pa_name); > + return (name); > +} > + > struct pmu_event_desc { > uint32_t ped_umask; > uint32_t ped_event; > @@ -75,9 +108,12 @@ pmu_event_get(const char *event_name) > > if ((pme = pmu_events_map_get()) == NULL) > return (NULL); > - for (pe = pme->table; pe->name != NULL; pe++) > - if (strcmp(pe->name, event_name) == 0) > + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { > + if (pe->name == NULL) > + continue; > + if (strcasecmp(pe->name, event_name) == 0) > return (pe); > + } > return (NULL); > } > > @@ -100,7 +136,7 @@ pmu_parse_event(struct pmu_event_desc *ped, const char > if (strcmp(key, "event") == 0) > ped->ped_event = strtol(value, NULL, 16); > if (strcmp(key, "period") == 0) > - ped->ped_umask = strtol(value, NULL, 10); > + ped->ped_period = strtol(value, NULL, 10); > } > free(event); > return (0); > @@ -112,6 +148,7 @@ pmcstat_pmu_sample_rate_get(const char *event_name) > const struct pmu_event *pe; > struct pmu_event_desc ped; > > + event_name = pmu_alias_get(event_name); > if ((pe = pmu_event_get(event_name)) == NULL) > return (DEFAULT_SAMPLE_COUNT); > if (pe->alias && (pe = pmu_event_get(pe->alias)) == NULL) > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Thu May 24 06:53:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50E90F5D631; Thu, 24 May 2018 06:53:44 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1FD779EDB; Thu, 24 May 2018 06:53:43 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id B7823E9D7; Thu, 24 May 2018 06:53:43 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f172.google.com with SMTP id d11-v6so1017337iof.11; Wed, 23 May 2018 23:53:43 -0700 (PDT) X-Gm-Message-State: ALKqPwcuslqtWsSk0hn3BbmuuJr5uIvv4uHxOgq7kaPUvdrWsQwXgewa H5ylUN9VFYb9SJPw05FqysR4v4EwDq3+wzLSIwI= X-Google-Smtp-Source: ADUXVKLvegGA8Pci8zbyxBrSY4ZDeaCm+zVjEOhhYaaKVhcJsd+WWMidQwXF2pdPPj8IsDhK8q6FyBYHGjzyDNTGghs= X-Received: by 2002:a6b:6707:: with SMTP id b7-v6mr225781ioc.132.1527144823164; Wed, 23 May 2018 23:53:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 23:53:42 -0700 (PDT) In-Reply-To: References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> From: Matthew Macy Date: Wed, 23 May 2018 23:53:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Michael Tuexen Cc: Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 06:53:44 -0000 On Wed, May 23, 2018 at 11:42 PM, Michael Tuexen wrote: >> On 24. May 2018, at 08:36, Matthew Macy wrote: >> >> On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen >> wrote: >>>> On 24. May 2018, at 06:51, Matthew Macy wrote: >>>> >>>> Warnings find bugs PERIOD. Although most are not useful, I've found >>> Some warnings indicate bugs, some warnings are just wrong. If you >>> have a "may be used uninitialized" warning being a false positive, you >>> may silences the warning by just set it to zero in the declaration and >>> you silence it. Other compilers might then correctly report an >>> assignment without affect... >> >> I have yet to see a double assignment be flagged as assignment without >> effect. If it _does_ occur then we have to disable the warning on the >> compiler that we have less faith in. > Have seen it in the past in a difference project... But you miss my point: > > Not all warnings indicate bugs PERIOD. Some warning are just wrong... Have you read my follow up? _Many_ Many warnings are wrong. Please respond to that on what the global policy should be. The value of any one particular instance of a warning does not merit discussion. -M , in this case the assignment should be added with >>>>> a comment /* pacify gcc */. >>>>> >>>>> On Wed, May 23, 2018 at 03:59:33PM -0700, Matthew Macy wrote: >>>>> M> On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff wrote: >>>>> M> > The initialization isn't useful. >>>>> M> >>>>> M> It silences a gcc warning. So yes it is. It's this exchange which is not useful. >>>>> M> >>>>> M> -M >>>>> M> >>>>> M> >>>>> M> > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: >>>>> M> > M> Talk to the gcc devs. The warning is useful even if there are false positives. >>>>> M> > M> >>>>> M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: >>>>> M> > M> > Hi, >>>>> M> > M> > >>>>> M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: >>>>> M> > M> > M> Author: mmacy >>>>> M> > M> > M> Date: Sat May 19 05:10:51 2018 >>>>> M> > M> > M> New Revision: 333860 >>>>> M> > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 >>>>> M> > M> > M> >>>>> M> > M> > M> Log: >>>>> M> > M> > M> sendfile: annotate unused value and ensure that npages is actually initialized >>>>> M> > M> > M> >>>>> M> > M> > M> Modified: >>>>> M> > M> > M> head/sys/kern/kern_sendfile.c >>>>> M> > M> > M> >>>>> M> > M> > M> Modified: head/sys/kern/kern_sendfile.c >>>>> M> > M> > M> ============================================================================== >>>>> M> > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 05:09:10 2018 (r333859) >>>>> M> > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 05:10:51 2018 (r333860) >>>>> M> > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, o >>>>> M> > M> > M> } >>>>> M> > M> > M> >>>>> M> > M> > M> for (int i = 0; i < npages;) { >>>>> M> > M> > M> - int j, a, count, rv; >>>>> M> > M> > M> + int j, a, count, rv __unused; >>>>> M> > M> > M> >>>>> M> > M> > M> /* Skip valid pages. */ >>>>> M> > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, >>>>> M> > M> > M> @@ -688,6 +688,7 @@ retry_space: >>>>> M> > M> > M> if (space == 0) { >>>>> M> > M> > M> sfio = NULL; >>>>> M> > M> > M> nios = 0; >>>>> M> > M> > M> + npages = 0; >>>>> M> > M> > M> goto prepend_header; >>>>> M> > M> > M> } >>>>> M> > M> > M> hdr_uio = NULL; >>>>> M> > M> > >>>>> M> > M> > This initialization is redundant and a compiler warning if exists is wrong. >>>>> M> > M> > >>>>> M> > M> > If we jump down to prepend_header with nios == 0, we won't ever use npages. >>>>> M> > M> > >>>>> M> > M> > -- >>>>> M> > M> > Gleb Smirnoff >>>>> M> > >>>>> M> > -- >>>>> M> > Gleb Smirnoff >>>>> >>>>> -- >>>>> Gleb Smirnoff >>>> >>> > From owner-svn-src-head@freebsd.org Thu May 24 06:54:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96007F5D6C9; Thu, 24 May 2018 06:54:32 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED0C67A09B; Thu, 24 May 2018 06:54:31 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id B6C58E9D9; Thu, 24 May 2018 06:54:31 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f169.google.com with SMTP id c9-v6so1014587iob.12; Wed, 23 May 2018 23:54:31 -0700 (PDT) X-Gm-Message-State: ALKqPwfxKn+G8eH2+7hyzgzDCy3J+C2oYaFWRx9HdnciDpiPxD+F2DtZ KKCdPfgOviU4Djjrujv9gQOVBg4KUtLErVb0gpk= X-Google-Smtp-Source: ADUXVKKzyv5nn4bMxWPCguA7kxUki9OXKSHZPLpw6QjlwIOGlBE5Ni18Azdi/Xg6M+3hhuyI1LQ0xIB5ADmEGkFXtok= X-Received: by 2002:a6b:5009:: with SMTP id e9-v6mr5529518iob.5.1527144871335; Wed, 23 May 2018 23:54:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Wed, 23 May 2018 23:54:31 -0700 (PDT) In-Reply-To: <201805240650.w4O6oSLw003786@slippy.cwsent.com> References: <201805240647.w4O6lesD071041@repo.freebsd.org> <201805240650.w4O6oSLw003786@slippy.cwsent.com> From: Matthew Macy Date: Wed, 23 May 2018 23:54:31 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334134 - head/lib/libpmcstat To: Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 06:54:32 -0000 Bugs in the code I'd just imported because I imported from the wrong branch :-/ On Wed, May 23, 2018 at 11:50 PM, Cy Schubert wrote: > In message <201805240647.w4O6lesD071041@repo.freebsd.org>, Matt Macy > writes: >> Author: mmacy >> Date: Thu May 24 06:47:40 2018 >> New Revision: 334134 >> URL: https://svnweb.freebsd.org/changeset/base/334134 >> >> Log: >> libpmcstat: import aliases table and bug fixes > > Which bugs? > >> >> Modified: >> head/lib/libpmcstat/libpmcstat_pmu_util.c >> >> Modified: head/lib/libpmcstat/libpmcstat_pmu_util.c >> ============================================================================= >> = >> --- head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 06:47:04 2018 >> (r334133) >> +++ head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 06:47:40 2018 >> (r334134) >> @@ -42,6 +42,39 @@ >> #include "pmu-events/pmu-events.h" >> >> #if defined(__amd64__) >> +struct pmu_alias { >> + const char *pa_alias; >> + const char *pa_name; >> +}; >> +static struct pmu_alias pmu_alias_table[] = { >> + { "UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, >> + { "UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, >> + { "LLC_MISSES", "LONGEST_LAT_CACHE.MISS"}, >> + { "LLC-MISSES", "LONGEST_LAT_CACHE.MISS"}, >> + { "LLC_REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, >> + { "LLC-REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, >> + { "LLC_MISS_RHITM", "mem_load_l3_miss_retired.remote_hitm"}, >> + { "LLC-MISS-RHITM", "mem_load_l3_miss_retired.remote_hitm"}, >> + { "RESOURCE_STALL", "RESOURCE_STALLS.ANY"}, >> + { "RESOURCE_STALLS_ANY", "RESOURCE_STALLS.ANY"}, >> + { "BRANCH_INSTRUCTION_RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, >> + { "BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, >> + { "BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, >> + { "BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, >> + { NULL, NULL }, >> +}; >> + >> +static const char * >> +pmu_alias_get(const char *name) >> +{ >> + struct pmu_alias *pa; >> + >> + for (pa = pmu_alias_table; pa->pa_alias != NULL; pa++) >> + if (strcasecmp(name, pa->pa_alias) == 0) >> + return (pa->pa_name); >> + return (name); >> +} >> + >> struct pmu_event_desc { >> uint32_t ped_umask; >> uint32_t ped_event; >> @@ -75,9 +108,12 @@ pmu_event_get(const char *event_name) >> >> if ((pme = pmu_events_map_get()) == NULL) >> return (NULL); >> - for (pe = pme->table; pe->name != NULL; pe++) >> - if (strcmp(pe->name, event_name) == 0) >> + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { >> + if (pe->name == NULL) >> + continue; >> + if (strcasecmp(pe->name, event_name) == 0) >> return (pe); >> + } >> return (NULL); >> } >> >> @@ -100,7 +136,7 @@ pmu_parse_event(struct pmu_event_desc *ped, const char >> if (strcmp(key, "event") == 0) >> ped->ped_event = strtol(value, NULL, 16); >> if (strcmp(key, "period") == 0) >> - ped->ped_umask = strtol(value, NULL, 10); >> + ped->ped_period = strtol(value, NULL, 10); >> } >> free(event); >> return (0); >> @@ -112,6 +148,7 @@ pmcstat_pmu_sample_rate_get(const char *event_name) >> const struct pmu_event *pe; >> struct pmu_event_desc ped; >> >> + event_name = pmu_alias_get(event_name); >> if ((pe = pmu_event_get(event_name)) == NULL) >> return (DEFAULT_SAMPLE_COUNT); >> if (pe->alias && (pe = pmu_event_get(pe->alias)) == NULL) >> > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > From owner-svn-src-head@freebsd.org Thu May 24 07:18:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8134BF5DDBE; Thu, 24 May 2018 07:18:50 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DCE97ADF6; Thu, 24 May 2018 07:18:50 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED5727175; Thu, 24 May 2018 07:18:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O7InSI085940; Thu, 24 May 2018 07:18:49 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O7In94085939; Thu, 24 May 2018 07:18:49 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805240718.w4O7In94085939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 07:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334135 - head/usr.sbin/pmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/usr.sbin/pmcstat X-SVN-Commit-Revision: 334135 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 07:18:50 -0000 Author: mmacy Date: Thu May 24 07:18:49 2018 New Revision: 334135 URL: https://svnweb.freebsd.org/changeset/base/334135 Log: pmcstat: add usage strings for -L and -I Modified: head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Thu May 24 06:47:40 2018 (r334134) +++ head/usr.sbin/pmcstat/pmcstat.c Thu May 24 07:18:49 2018 (r334135) @@ -365,6 +365,8 @@ pmcstat_show_usage(void) "\t -F file\t write a system-wide callgraph (Kcachegrind format)" " to \"file\"\n" "\t -G file\t write a system-wide callgraph to \"file\"\n" + "\t -I don't resolve leaf function but show address instead" + "\t -L \"tid\" filter on thread id in post-processing" "\t -M file\t print executable/gmon file map to \"file\"\n" "\t -N\t\t (toggle) capture callchains\n" "\t -O file\t send log output to \"file\"\n" From owner-svn-src-head@freebsd.org Thu May 24 07:38:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35E88F5E615; Thu, 24 May 2018 07:38:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D144F7B650; Thu, 24 May 2018 07:38:46 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A90C97497; Thu, 24 May 2018 07:38:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O7ckW0096026; Thu, 24 May 2018 07:38:46 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O7ckeL096025; Thu, 24 May 2018 07:38:46 GMT (envelope-from np@FreeBSD.org) Message-Id: <201805240738.w4O7ckeL096025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 24 May 2018 07:38:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334136 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 334136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 07:38:47 -0000 Author: np Date: Thu May 24 07:38:46 2018 New Revision: 334136 URL: https://svnweb.freebsd.org/changeset/base/334136 Log: cxgbe(4): Slightly simpler needs_ functions. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu May 24 07:18:49 2018 (r334135) +++ head/sys/dev/cxgbe/t4_sge.c Thu May 24 07:38:46 2018 (r334136) @@ -2062,14 +2062,7 @@ needs_tso(struct mbuf *m) M_ASSERTPKTHDR(m); - if (m->m_pkthdr.csum_flags & CSUM_TSO) { - KASSERT(m->m_pkthdr.tso_segsz > 0, - ("%s: TSO requested in mbuf %p but MSS not provided", - __func__, m)); - return (1); - } - - return (0); + return (m->m_pkthdr.csum_flags & CSUM_TSO); } static inline int @@ -2078,9 +2071,7 @@ needs_l3_csum(struct mbuf *m) M_ASSERTPKTHDR(m); - if (m->m_pkthdr.csum_flags & (CSUM_IP | CSUM_TSO)) - return (1); - return (0); + return (m->m_pkthdr.csum_flags & (CSUM_IP | CSUM_TSO)); } static inline int @@ -2089,10 +2080,8 @@ needs_l4_csum(struct mbuf *m) M_ASSERTPKTHDR(m); - if (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_UDP_IPV6 | - CSUM_TCP_IPV6 | CSUM_TSO)) - return (1); - return (0); + return (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_UDP_IPV6 | + CSUM_TCP_IPV6 | CSUM_TSO)); } static inline int @@ -2101,13 +2090,7 @@ needs_vlan_insertion(struct mbuf *m) M_ASSERTPKTHDR(m); - if (m->m_flags & M_VLANTAG) { - KASSERT(m->m_pkthdr.ether_vtag != 0, - ("%s: HWVLAN requested in mbuf %p but tag not provided", - __func__, m)); - return (1); - } - return (0); + return (m->m_flags & M_VLANTAG); } static void * From owner-svn-src-head@freebsd.org Thu May 24 07:41:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E232F5E728; Thu, 24 May 2018 07:41:32 +0000 (UTC) (envelope-from h.schmalzbauer@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA23D7B891; Thu, 24 May 2018 07:41:31 +0000 (UTC) (envelope-from h.schmalzbauer@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id w4O7fTFH044670; Thu, 24 May 2018 09:41:29 +0200 (CEST) (envelope-from h.schmalzbauer@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id CA1938EE; Thu, 24 May 2018 09:41:28 +0200 (CEST) Subject: Re: svn commit: r334115 - in head: share/man/man4 sys/dev/usb/template To: Ravi Pokala , Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805232006.w4NK64jS044384@repo.freebsd.org> <9B0033E1-56EC-4CA0-BC28-056871B32B0A@panasas.com> From: "H. Schmalzbauer - OmniLAN" Message-ID: Date: Thu, 24 May 2018 09:41:28 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <9B0033E1-56EC-4CA0-BC28-056871B32B0A@panasas.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Thu, 24 May 2018 09:41:29 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 07:41:32 -0000 Am 23.05.2018 um 22:35 schrieb Ravi Pokala: > Hi Traz, > > You're referring to power consumption in terms of (milli)Amps. That's not right; power is measured in Watts. What you're actually talking about is *current*. And it looks like in some situations USB devices can draw more than 500mA. Since the voltage isn't a variable when talking about USB power, speaking of "power" while refering to current seems valid to me – it's 5 V only and those who read that don't even need to do any math in head. I never read 2500mW in USB world, 500mA is common. Just my 2¢ -harry From owner-svn-src-head@freebsd.org Thu May 24 08:02:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0EAAF6B257; Thu, 24 May 2018 08:02:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 554457C437; Thu, 24 May 2018 08:02:12 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 363397877; Thu, 24 May 2018 08:02:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O82Cu0009889; Thu, 24 May 2018 08:02:12 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O82BCG009886; Thu, 24 May 2018 08:02:11 GMT (envelope-from np@FreeBSD.org) Message-Id: <201805240802.w4O82BCG009886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 24 May 2018 08:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334137 - in head/sys/dev/cxgbe: . common X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 334137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 08:02:12 -0000 Author: np Date: Thu May 24 08:02:11 2018 New Revision: 334137 URL: https://svnweb.freebsd.org/changeset/base/334137 Log: cxgbe(4): Fix range checks in is_etid. Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Thu May 24 07:38:46 2018 (r334136) +++ head/sys/dev/cxgbe/common/common.h Thu May 24 08:02:11 2018 (r334137) @@ -358,7 +358,7 @@ struct adapter_params { u_int ftid_min; u_int ftid_max; u_int etid_min; - u_int netids; + u_int etid_max; unsigned int cim_la_size; @@ -448,7 +448,8 @@ static inline int is_ftid(const struct adapter *sc, u_ static inline int is_etid(const struct adapter *sc, u_int tid) { - return (tid >= sc->params.etid_min); + return (sc->params.etid_min > 0 && tid >= sc->params.etid_min && + tid <= sc->params.etid_max); } static inline int is_offload(const struct adapter *adap) Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu May 24 07:38:46 2018 (r334136) +++ head/sys/dev/cxgbe/t4_main.c Thu May 24 08:02:11 2018 (r334137) @@ -3750,8 +3750,8 @@ get_params__post_init(struct adapter *sc) } sc->tids.etid_base = val[0]; sc->params.etid_min = val[0]; + sc->params.etid_max = val[1]; sc->tids.netids = val[1] - val[0] + 1; - sc->params.netids = sc->tids.netids; sc->params.eo_wr_cred = val[2]; sc->params.ethoffload = 1; } From owner-svn-src-head@freebsd.org Thu May 24 08:07:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93E07F6B517; Thu, 24 May 2018 08:07:18 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4106D7C6F4; Thu, 24 May 2018 08:07:18 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 3A3A61DEBB; Thu, 24 May 2018 08:07:18 +0000 (UTC) Date: Thu, 24 May 2018 08:07:18 +0000 From: Alexey Dokuchaev To: Cy Schubert Cc: Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , "svn-src-head@freebsd.org" , Sean Bruno , Gleb Smirnoff , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share Message-ID: <20180524080718.GA88772@FreeBSD.org> References: <20180523193027.825583BC@spqr.komquats.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180523193027.825583BC@spqr.komquats.com> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 08:07:18 -0000 On Wed, May 23, 2018 at 12:30:26PM -0700, Cy Schubert wrote: > Except for old computers and old software that segfaults on 64-bit, > how many people still use i386? i386 is my primary development machine at $work and home; I have one amd64 laptop and one i386, and a Mac mini G4 (powerpc32). Most of my hardware are 32-bit and I intend to keep it this way. I don't feel comfortable with 64-bit arches, and only use them reluctantly. > Full disclosure: I'd like to see i386 deorbited before I retire. What's with all you people wanting to kill perfectly working stuff? Fix bugs, don't axe features. ./danfe From owner-svn-src-head@freebsd.org Thu May 24 08:21:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 216F6F6BD92; Thu, 24 May 2018 08:21:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C370E7D0A0; Thu, 24 May 2018 08:21:44 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A47EB7C88; Thu, 24 May 2018 08:21:44 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O8Li21019900; Thu, 24 May 2018 08:21:44 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O8LhWw019896; Thu, 24 May 2018 08:21:43 GMT (envelope-from np@FreeBSD.org) Message-Id: <201805240821.w4O8LhWw019896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 24 May 2018 08:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334138 - in head/sys/dev/cxgbe: . common tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . common tom X-SVN-Commit-Revision: 334138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 08:21:45 -0000 Author: np Date: Thu May 24 08:21:43 2018 New Revision: 334138 URL: https://svnweb.freebsd.org/changeset/base/334138 Log: cxgbe(4): Make FW4_ACK a shared CPL. ETHOFLD in the base driver will use it for per-flow rate limiting. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/common/t4_msg.h head/sys/dev/cxgbe/t4_sge.c head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu May 24 08:02:11 2018 (r334137) +++ head/sys/dev/cxgbe/adapter.h Thu May 24 08:21:43 2018 (r334138) @@ -372,7 +372,7 @@ enum { CPL_COOKIE_DDP1, CPL_COOKIE_TOM, CPL_COOKIE_HASHFILTER, - CPL_COOKIE_AVAILABLE2, + CPL_COOKIE_ETHOFLD, CPL_COOKIE_AVAILABLE3, NUM_CPL_COOKIES = 8 /* Limited by M_COOKIE. Do not increase. */ Modified: head/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- head/sys/dev/cxgbe/common/t4_msg.h Thu May 24 08:02:11 2018 (r334137) +++ head/sys/dev/cxgbe/common/t4_msg.h Thu May 24 08:21:43 2018 (r334138) @@ -2751,6 +2751,30 @@ enum { CPL_FW4_ACK_FLAGS_FLOWC = 0x4, /* fw_flowc_wr complete */ }; +#define S_CPL_FW4_ACK_OPCODE 24 +#define M_CPL_FW4_ACK_OPCODE 0xff +#define V_CPL_FW4_ACK_OPCODE(x) ((x) << S_CPL_FW4_ACK_OPCODE) +#define G_CPL_FW4_ACK_OPCODE(x) \ + (((x) >> S_CPL_FW4_ACK_OPCODE) & M_CPL_FW4_ACK_OPCODE) + +#define S_CPL_FW4_ACK_FLOWID 0 +#define M_CPL_FW4_ACK_FLOWID 0xffffff +#define V_CPL_FW4_ACK_FLOWID(x) ((x) << S_CPL_FW4_ACK_FLOWID) +#define G_CPL_FW4_ACK_FLOWID(x) \ + (((x) >> S_CPL_FW4_ACK_FLOWID) & M_CPL_FW4_ACK_FLOWID) + +#define S_CPL_FW4_ACK_CR 24 +#define M_CPL_FW4_ACK_CR 0xff +#define V_CPL_FW4_ACK_CR(x) ((x) << S_CPL_FW4_ACK_CR) +#define G_CPL_FW4_ACK_CR(x) (((x) >> S_CPL_FW4_ACK_CR) & M_CPL_FW4_ACK_CR) + +#define S_CPL_FW4_ACK_SEQVAL 0 +#define M_CPL_FW4_ACK_SEQVAL 0x1 +#define V_CPL_FW4_ACK_SEQVAL(x) ((x) << S_CPL_FW4_ACK_SEQVAL) +#define G_CPL_FW4_ACK_SEQVAL(x) \ + (((x) >> S_CPL_FW4_ACK_SEQVAL) & M_CPL_FW4_ACK_SEQVAL) +#define F_CPL_FW4_ACK_SEQVAL V_CPL_FW4_ACK_SEQVAL(1U) + struct cpl_fw6_msg { RSS_HDR u8 opcode; Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu May 24 08:02:11 2018 (r334137) +++ head/sys/dev/cxgbe/t4_sge.c Thu May 24 08:21:43 2018 (r334138) @@ -290,6 +290,7 @@ cpl_handler_t set_tcb_rpl_handlers[NUM_CPL_COOKIES]; cpl_handler_t l2t_write_rpl_handlers[NUM_CPL_COOKIES]; cpl_handler_t act_open_rpl_handlers[NUM_CPL_COOKIES]; cpl_handler_t abort_rpl_rss_handlers[NUM_CPL_COOKIES]; +cpl_handler_t fw4_ack_handlers[NUM_CPL_COOKIES]; void t4_register_an_handler(an_handler_t h) @@ -402,6 +403,23 @@ abort_rpl_rss_handler(struct sge_iq *iq, const struct return (abort_rpl_rss_handlers[cookie](iq, rss, m)); } +static int +fw4_ack_handler(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) +{ + struct adapter *sc = iq->adapter; + const struct cpl_fw4_ack *cpl = (const void *)(rss + 1); + unsigned int tid = G_CPL_FW4_ACK_FLOWID(be32toh(OPCODE_TID(cpl))); + u_int cookie; + + MPASS(m == NULL); + if (is_etid(sc, tid)) + cookie = CPL_COOKIE_ETHOFLD; + else + cookie = CPL_COOKIE_TOM; + + return (fw4_ack_handlers[cookie](iq, rss, m)); +} + static void t4_init_shared_cpl_handlers(void) { @@ -410,6 +428,7 @@ t4_init_shared_cpl_handlers(void) t4_register_cpl_handler(CPL_L2T_WRITE_RPL, l2t_write_rpl_handler); t4_register_cpl_handler(CPL_ACT_OPEN_RPL, act_open_rpl_handler); t4_register_cpl_handler(CPL_ABORT_RPL_RSS, abort_rpl_rss_handler); + t4_register_cpl_handler(CPL_FW4_ACK, fw4_ack_handler); } void @@ -434,6 +453,9 @@ t4_register_shared_cpl_handler(int opcode, cpl_handler break; case CPL_ABORT_RPL_RSS: loc = (uintptr_t *)&abort_rpl_rss_handlers[cookie]; + break; + case CPL_FW4_ACK: + loc = (uintptr_t *)&fw4_ack_handlers[cookie]; break; default: MPASS(0); Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu May 24 08:02:11 2018 (r334137) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu May 24 08:21:43 2018 (r334138) @@ -1725,30 +1725,6 @@ do_rx_data(struct sge_iq *iq, const struct rss_header return (0); } -#define S_CPL_FW4_ACK_OPCODE 24 -#define M_CPL_FW4_ACK_OPCODE 0xff -#define V_CPL_FW4_ACK_OPCODE(x) ((x) << S_CPL_FW4_ACK_OPCODE) -#define G_CPL_FW4_ACK_OPCODE(x) \ - (((x) >> S_CPL_FW4_ACK_OPCODE) & M_CPL_FW4_ACK_OPCODE) - -#define S_CPL_FW4_ACK_FLOWID 0 -#define M_CPL_FW4_ACK_FLOWID 0xffffff -#define V_CPL_FW4_ACK_FLOWID(x) ((x) << S_CPL_FW4_ACK_FLOWID) -#define G_CPL_FW4_ACK_FLOWID(x) \ - (((x) >> S_CPL_FW4_ACK_FLOWID) & M_CPL_FW4_ACK_FLOWID) - -#define S_CPL_FW4_ACK_CR 24 -#define M_CPL_FW4_ACK_CR 0xff -#define V_CPL_FW4_ACK_CR(x) ((x) << S_CPL_FW4_ACK_CR) -#define G_CPL_FW4_ACK_CR(x) (((x) >> S_CPL_FW4_ACK_CR) & M_CPL_FW4_ACK_CR) - -#define S_CPL_FW4_ACK_SEQVAL 0 -#define M_CPL_FW4_ACK_SEQVAL 0x1 -#define V_CPL_FW4_ACK_SEQVAL(x) ((x) << S_CPL_FW4_ACK_SEQVAL) -#define G_CPL_FW4_ACK_SEQVAL(x) \ - (((x) >> S_CPL_FW4_ACK_SEQVAL) & M_CPL_FW4_ACK_SEQVAL) -#define F_CPL_FW4_ACK_SEQVAL V_CPL_FW4_ACK_SEQVAL(1U) - static int do_fw4_ack(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { @@ -1956,7 +1932,7 @@ t4_init_cpl_io_handlers(void) t4_register_shared_cpl_handler(CPL_ABORT_RPL_RSS, do_abort_rpl, CPL_COOKIE_TOM); t4_register_cpl_handler(CPL_RX_DATA, do_rx_data); - t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack); + t4_register_shared_cpl_handler(CPL_FW4_ACK, do_fw4_ack, CPL_COOKIE_TOM); } void @@ -1968,7 +1944,7 @@ t4_uninit_cpl_io_handlers(void) t4_register_cpl_handler(CPL_ABORT_REQ_RSS, NULL); t4_register_cpl_handler(CPL_ABORT_RPL_RSS, NULL); t4_register_cpl_handler(CPL_RX_DATA, NULL); - t4_register_cpl_handler(CPL_FW4_ACK, NULL); + t4_register_shared_cpl_handler(CPL_FW4_ACK, NULL, CPL_COOKIE_TOM); } /* From owner-svn-src-head@freebsd.org Thu May 24 08:32:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE157F6D453; Thu, 24 May 2018 08:32:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F8577D6E4; Thu, 24 May 2018 08:32:03 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40DA97E33; Thu, 24 May 2018 08:32:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4O8W3C0025806; Thu, 24 May 2018 08:32:03 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4O8W3lU025805; Thu, 24 May 2018 08:32:03 GMT (envelope-from np@FreeBSD.org) Message-Id: <201805240832.w4O8W3lU025805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 24 May 2018 08:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334139 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 334139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 08:32:03 -0000 Author: np Date: Thu May 24 08:32:02 2018 New Revision: 334139 URL: https://svnweb.freebsd.org/changeset/base/334139 Log: cxgbe/t4_tom: ABORT_RPL_RSS is a shared CPL and t4_tom shouldn't remove the global handler when it's being unloaded. Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu May 24 08:21:43 2018 (r334138) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu May 24 08:32:02 2018 (r334139) @@ -1942,7 +1942,7 @@ t4_uninit_cpl_io_handlers(void) t4_register_cpl_handler(CPL_PEER_CLOSE, NULL); t4_register_cpl_handler(CPL_CLOSE_CON_RPL, NULL); t4_register_cpl_handler(CPL_ABORT_REQ_RSS, NULL); - t4_register_cpl_handler(CPL_ABORT_RPL_RSS, NULL); + t4_register_shared_cpl_handler(CPL_ABORT_RPL_RSS, NULL, CPL_COOKIE_TOM); t4_register_cpl_handler(CPL_RX_DATA, NULL); t4_register_shared_cpl_handler(CPL_FW4_ACK, NULL, CPL_COOKIE_TOM); } From owner-svn-src-head@freebsd.org Thu May 24 08:39:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99A15F6D88A for ; Thu, 24 May 2018 08:39:35 +0000 (UTC) (envelope-from bounce-k7p1-898287716003747230@mlsend2.com) Received: from mail11.mlsend2.com (mail11.mlsend2.com [195.12.186.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mlsend2.com", Issuer "mlsend2.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1EF1C7DBAD for ; Thu, 24 May 2018 08:39:34 +0000 (UTC) (envelope-from bounce-k7p1-898287716003747230@mlsend2.com) Received: from (127.0.0.1) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mlsend2.com", Issuer "mlsend2.com" (verified OK)) by mail11.mlsend2.com (Postfix) with ESMTPS id 1BC7B7C06DC11 for ; Thu, 24 May 2018 11:39:31 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mlsend2.com; s=ml; t=1527151171; bh=06UqI7Ne3ZvoSrtQDk2/APeOtcCONhP3URAxxmb52vY=; h=Date:To:From:Reply-To:Subject:Message-ID:List-Unsubscribe: MIME-Version:Content-Type; b=UMp4pDlC7mEo3YlJmpNfoBrGQqBiYTbr7V0AWGjIiotC+Tj1TnxvuI3y+IdLToC05 6C3Q9dn/+HegHESb12LKdpIfkrr6yrt+j7ekL80qKqAK/BjM0j6J73DQwmQFzcP78x ceBlbMCyfoaGQOlBFnfMxmoqQb6eBUHc0ahdOdgk= Received: from (127.0.0.1) by mail11.mlsend2.com (Postfix) with ESMTP id 0F8A07C06D01B for ; Thu, 24 May 2018 11:39:31 +0300 (EEST) Date: Thu, 24 May 2018 08:37:20 +0000 To: svn-src-head@freebsd.org From: TestCon 2018 Reply-To: TestCon 2018 Subject: We are designing TestCon 2018 with you in Mind Message-ID: <43733400e41587a268ea1b3814468dd3@mlsend2.com> X-Mailer-SubscriberID: 898287716003747230; k7p1; 0a380bc44bfff02e0dc92f93b5faf4aa X-Mailru-Msgtype: 0a380bc44bfff02e0dc92f93b5faf4aa Precedence: bulk Feedback-ID: i5a5r1:0a380bc44bfff02e0dc92f93b5faf4aa:236700387724338575:MailerLite Sender: =?utf-8?Q?"TestCon=202018"?= MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 08:39:35 -0000 Hi TestCon Friends, The wait is over. International TestCon Conference is back again this Oct= ober in Vilnius, Lithuania! Over the course of 3 jam-packed days, 50+ thought-provoking sessions and = 10 full-day technical workshops, experts will be gracing the stages to sp= otlight the future of software testing practices, tools and techniques. You=E2=80=98ll hear real-world advice and practical tips for improving ev= ery aspect of your software testing.=C2=A0Need prove? Check our previous=C2= =A0lineup (http://click.mlsend2.com/link/c/)=C2=A0and feel the TestCon=C2= =A0vibe (http://click.mlsend2.com/link/c/). Currently, we are selecting speakers (check some of them=C2=A0here (http:= //click.mlsend2.com/link/c/)) to inspire and motivate you =E2=80=93 so ma= rk your calendar and consider joining +700 peers from=C2=A0October 16=E2=80= =9318 in Vilnius, Lithuania! Full conference program announcement is coming soon - stay tuned. As you've probably heard, data protection laws are being updated on May 2= 5th (GDPR).=C2=A0We just want to assure you that TestCon is committed to = privacy protection of user details on the highest level.=C2=A0We hope you= 'll decide to stay subscribed to TestCon content and future marketing ema= ils.=C2=A0 In turn, we promise to provide only the most relevant news and content pi= eces. If you decide to opt-out - just click unsubscribe at the bottom of = this email.=C2=A0 =C2=A0 See you there, TestCon 2018 Team This email was sent to svn-src-head@freebsd.org (mailto:svn-src-head@free= bsd.org) | Unsubscribe (http://click.mlsend2.com/link/c/YT04OTgyODc3MTYwM= DM3NDcyMzAmYz1rN3AxJmU9NjE4NzYmYj0xNzgwNzE5MzQmZD1yMGIwZzBy.r3F-trfVCMTXr= JFHl_QAdb3RkGDQj9Z7GA60-il8d50) | Forward this email to a friend (http://= click.mlsend2.com/link/c/YT04OTgyODc3MTYwMDM3NDcyMzAmYz1rN3AxJmU9NjE4NzYm= Yj0xNzgwNzE1OTYmZD1oOHI2YTFp.6jsRnf3F4HcdnASBq4QUBdqqTNtdUnIurcRkrp8WvEA) From owner-svn-src-head@freebsd.org Thu May 24 09:35:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84408F6FBE4; Thu, 24 May 2018 09:35:11 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wr0-x22e.google.com (mail-wr0-x22e.google.com [IPv6:2a00:1450:400c:c0c::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0A6980027; Thu, 24 May 2018 09:35:10 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by mail-wr0-x22e.google.com with SMTP id l41-v6so1837778wre.7; Thu, 24 May 2018 02:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ORPmiopUerRQF4Sk1nPxde+sqG/Ak/Ui0HjAIbZj9vY=; b=Z70xGyjx6+UR27CJBum0b2gKfpQmGzBX2JbVhfZuAUMt7PQmTSOq2HqB2xWaenQqnn wh9tHOj1cpQ7YP9nYzokCt83NXU41rPfREeKF5CejSTNyXZK+MyKTiE06sRHaSpCP5sZ Ry+oJ7mPdX6F1PwXgMXj/NrauQ/1LwAeKUp2KSoEwhmWGRVBHeidR1/2tHpHhluqFnlm 6zvLzD9ADglurVXAJSylV7LZkj+4vIs2p5DbqDpzL2Yo0Hz/wHsC81NTcRJeJ6GZ70sA culFGiZcVUGfXrxChb/1efzlOVgKRpOpXQ/DSinqYIChVfOrtT3wSW1uDLZWxrAAypCz 3EXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ORPmiopUerRQF4Sk1nPxde+sqG/Ak/Ui0HjAIbZj9vY=; b=VXl0EMYJzHnFZLqoUkS/WUwsU3Eoym8kahszQYtpMaFnjPPRiNo3d1VA4gn75wWdaV XCcGYPyoquZgUqsZIBhF7tcIsXeElWQGw3hUcNmxoa00uK+EXLT5g4HpV6gjLyICwpsS JUrIlw9z5sONgVADPL7dhmHPzVaqC7DsLYpvg4l7CFCtDycSqhXQDJSGA0qiKTi2ADCt RBCkjCyBKQVXhNxH8+U77I9VRdlbaUfrnAoRn8PTSfaeMtRrMOZbrFdl54AKsUHvZ9ov j4La903vXOXqhUxdAv2nKhce3IU6z7v8YTbhKnw98fyUt4O+uUpnu6cHO6LDYeV5tCBn FXsg== X-Gm-Message-State: ALKqPwffNFsXF367BVHdHfyrZD/AOpOiQF3qSILranzIUcn8ZA4P04HG IRhZvZA4IHctZCYcIIY3GoWZGe9bPooE4u6uRk0ATg== X-Google-Smtp-Source: AB8JxZrCFCrN1avd9+lsghsz7g9Oz0om168DRwukOTGEbRK/9OHHnxDCt3g0pEQ+Ghwy4uuunnaEc0eVOD5QvrMOTlw= X-Received: by 2002:a19:2092:: with SMTP id g140-v6mr3817126lfg.38.1527154509719; Thu, 24 May 2018 02:35:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:2e18:0:0:0:0:0 with HTTP; Thu, 24 May 2018 02:35:09 -0700 (PDT) In-Reply-To: <201805240430.w4O4U6Js001134@repo.freebsd.org> References: <201805240430.w4O4U6Js001134@repo.freebsd.org> From: Sergey Kandaurov Date: Thu, 24 May 2018 12:35:09 +0300 Message-ID: Subject: Re: svn commit: r334128 - in head: . lib/libpmcstat lib/libpmcstat/pmu-events lib/libpmcstat/pmu-events/arch lib/libpmcstat/pmu-events/arch/arm64 lib/libpmcstat/pmu-events/arch/arm64/arm lib/libpmcstat... To: Matt Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 09:35:11 -0000 On 24 May 2018 at 07:30, Matt Macy wrote: > Author: mmacy > Date: Thu May 24 04:30:06 2018 > New Revision: 334128 > URL: https://svnweb.freebsd.org/changeset/base/334128 > > Log: > libpmcstat: compile in events based on json description > [...] > > Modified: head/Makefile > ============================================================ > ================== > --- head/Makefile Thu May 24 03:44:12 2018 (r334127) > +++ head/Makefile Thu May 24 04:30:06 2018 (r334128) > @@ -481,7 +481,8 @@ worlds: .PHONY > # existing system is. > # > .if make(universe) || make(universe_kernels) || make(tinderbox) || > make(targets) > -TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 > +TARGETS?=amd64 i386 powerpc arm64 > +#riscv arm sparc64 mips > _UNIVERSE_TARGETS= ${TARGETS} > TARGET_ARCHES_arm?= arm armeb armv6 armv7 > TARGET_ARCHES_arm64?= aarch64 > Why? Looks like a debug leftover. -- wbr, pluknet From owner-svn-src-head@freebsd.org Thu May 24 09:59:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9213EEAA4F6; Thu, 24 May 2018 09:59:09 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ua0-x242.google.com (mail-ua0-x242.google.com [IPv6:2607:f8b0:400c:c08::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 219E080D3B; Thu, 24 May 2018 09:59:09 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-ua0-x242.google.com with SMTP id a3-v6so678424uad.8; Thu, 24 May 2018 02:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=NvjjwVO4oGl2MkDCEAYtUd2LptxPopiFEgqkDVOmKEs=; b=fpj/yQMtTxjRrpMaSe8HCKQONo2kWwpFfjC7pBQAbo1luVr+3mojcZJND9LLYULq71 c9LFc7JvrxQvvGZfOuULIsEUrXZEUhXJPcm/jm5Uf6j/jAC7KV45w629Ge6ppIfWy9J9 AotTg9GBDrnOykhTn8Mtkbi0Ca9xW/nSo5i7dhlhSzMFPkpIaoGwYNwSJAxOzkuywzy/ qU0D4emeXV5KfjXkWGBjMFN2E/gMryJJZKfCE1EWFYdz3aI742UP16NVxrnHqBaggQpC ldnuOhszRzBPj57TtT/dM9HcHg2O5/+FrfluImy5fwQluDfwzPTGDxZDLtwvFmPV5IxP tqhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=NvjjwVO4oGl2MkDCEAYtUd2LptxPopiFEgqkDVOmKEs=; b=lC83iBza79ABx1j68oPzRTjqwnG2xQBwvNi4dpDQixM0+DneYkUBUvKsRefb1niOsf 55g4p0+R4HGCNWUM9zSp0L81dNKrICqr8ORqrou1EgO9ftTMEXEJU3uqnNJ6MK99LOhr 1ZRlIO8vyHfV6ErNvwbSaoHsi8EkvOyuYfvOHVg0YpYycWeDp2DX75RN9DzlYHwObesL kM7L1IU/wIsvxA6rQFuFpCGco5z+AdiPUXRRmvETUj2mqJl1LtN3JO/xztLaUojS3/tC X/1GGrA8XFFodLuENCBf3yOg8r0cD7pb8hKz1I+Z/N3Fm8BITWs90Ddd17n2/urYrcip fm/w== X-Gm-Message-State: ALKqPwdwg8+DofSF7O56wFfqO1tNiylY4VBqQ0BPD2cq65N/h7uuFwMt 3NIMSNKXBc7eS28oJZ7Rg5mZdmHdsNupDVg1hOA= X-Google-Smtp-Source: AB8JxZocpiIv3gZmGoR4JnHfU22j5LzMGYhKOeiAkKKff7PDJ+sbt/6icqVh7Umor+pQhMrY1uKK9ZPhb2wUjg62oF8= X-Received: by 2002:ab0:5d1b:: with SMTP id u27-v6mr4395416uaf.59.1527155948696; Thu, 24 May 2018 02:59:08 -0700 (PDT) MIME-Version: 1.0 Sender: etnapierala@gmail.com Received: by 2002:ab0:5a81:0:0:0:0:0 with HTTP; Thu, 24 May 2018 02:59:08 -0700 (PDT) In-Reply-To: References: <201805232006.w4NK64jS044384@repo.freebsd.org> <9B0033E1-56EC-4CA0-BC28-056871B32B0A@panasas.com> From: Edward Napierala Date: Thu, 24 May 2018 10:59:08 +0100 X-Google-Sender-Auth: IRi5D3NUYgi4RQtFK4uxC4VgIrQ Message-ID: Subject: Re: svn commit: r334115 - in head: share/man/man4 sys/dev/usb/template To: "H. Schmalzbauer - OmniLAN" Cc: Ravi Pokala , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 09:59:09 -0000 2018-05-24 8:41 GMT+01:00 H. Schmalzbauer - OmniLAN < h.schmalzbauer@omnilan.de>: > Am 23.05.2018 um 22:35 schrieb Ravi Pokala: > >> Hi Traz, >> >> You're referring to power consumption in terms of (milli)Amps. That's no= t >> right; power is measured in Watts. What you're actually talking about is >> *current*. And it looks like in some situations USB devices can draw mor= e >> than 500mA. >> > > Since the voltage isn't a variable when talking about USB power, speaking > of "power" while refering to current seems valid to me =E2=80=93 it's 5 V= only and > those who read that don't even need to do any math in head. > I never read 2500mW in USB world, 500mA is common. > Just my 2=C2=A2 > I've just did some googling, and it seems you're right - while from physics point of view mA is definitely current and not power, pretty much everywhere I look the USB power (reported in bMaxPower) is specified in mA, not mW. Thus, I'm leaning toward leaving it as it is - wrong from a physics point of view, but aligned with the the USB naming convention. From owner-svn-src-head@freebsd.org Thu May 24 10:01:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD5ACEAA76D; Thu, 24 May 2018 10:01:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7658580FD4; Thu, 24 May 2018 10:01:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A411B26038C; Thu, 24 May 2018 12:01:30 +0200 (CEST) Subject: Re: svn commit: r334115 - in head: share/man/man4 sys/dev/usb/template To: Edward Napierala , "H. Schmalzbauer - OmniLAN" Cc: Ravi Pokala , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805232006.w4NK64jS044384@repo.freebsd.org> <9B0033E1-56EC-4CA0-BC28-056871B32B0A@panasas.com> From: Hans Petter Selasky Message-ID: <94801dec-73b4-63f3-6f01-b0e175073d6e@selasky.org> Date: Thu, 24 May 2018 12:01:19 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:01:33 -0000 On 05/24/18 11:59, Edward Napierala wrote: > 2018-05-24 8:41 GMT+01:00 H. Schmalzbauer - OmniLAN < > h.schmalzbauer@omnilan.de>: > >> Am 23.05.2018 um 22:35 schrieb Ravi Pokala: >> >>> Hi Traz, >>> >>> You're referring to power consumption in terms of (milli)Amps. That's not >>> right; power is measured in Watts. What you're actually talking about is >>> *current*. And it looks like in some situations USB devices can draw more >>> than 500mA. >>> >> >> Since the voltage isn't a variable when talking about USB power, speaking >> of "power" while refering to current seems valid to me – it's 5 V only and >> those who read that don't even need to do any math in head. >> I never read 2500mW in USB world, 500mA is common. >> Just my 2¢ >> > > I've just did some googling, and it seems you're right - while from physics > point of view mA is definitely current and not power, pretty much > everywhere I look the USB power (reported in bMaxPower) is specified in mA, > not mW. Thus, I'm leaning toward leaving it as it is - wrong from a > physics point of view, but aligned with the the USB naming convention. > Even though implict, we could specify mA at 5Volt in the sysctl description. --HPS From owner-svn-src-head@freebsd.org Thu May 24 10:16:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB76FEAACD1; Thu, 24 May 2018 10:16:12 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CF6581A95; Thu, 24 May 2018 10:16:12 +0000 (UTC) (envelope-from royger@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3974710E70; Thu, 24 May 2018 10:16:12 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OAGBD8076556; Thu, 24 May 2018 10:16:11 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OAGBJ7076555; Thu, 24 May 2018 10:16:11 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201805241016.w4OAGBJ7076555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 24 May 2018 10:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334140 - head/sys/dev/xen/xenstore X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/xenstore X-SVN-Commit-Revision: 334140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:16:12 -0000 Author: royger Date: Thu May 24 10:16:11 2018 New Revision: 334140 URL: https://svnweb.freebsd.org/changeset/base/334140 Log: xenstore: remove the suspend sx lock There's no need to prevent suspend while doing xenstore transactions, callers of transactions are supposed to be prepared for a transaction to fail. This fixes a bug that could be triggered from the xenstore user-space device, since starting a transaction from user-space would result in returning there with a sx lock held, that causes a WITNESS check to trigger. Tested by: Nathan Friess Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/xenstore/xenstore.c Modified: head/sys/dev/xen/xenstore/xenstore.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore.c Thu May 24 08:32:02 2018 (r334139) +++ head/sys/dev/xen/xenstore/xenstore.c Thu May 24 10:16:11 2018 (r334140) @@ -202,18 +202,6 @@ struct xs_softc { struct mtx watch_events_lock; /** - * Sleepable lock used to prevent VM suspension while a - * xenstore transaction is outstanding. - * - * Each active transaction holds a shared lock on the - * suspend mutex. Our suspend method blocks waiting - * to acquire an exclusive lock. This guarantees that - * suspend processing will only proceed once all active - * transactions have been retired. - */ - struct sx suspend_mutex; - - /** * The processid of the xenwatch thread. */ pid_t xenwatch_pid; @@ -710,50 +698,6 @@ xs_rcv_thread(void *arg __unused) } /*---------------- XenStore Message Request/Reply Processing -----------------*/ -/** - * Filter invoked before transmitting any message to the XenStore service. - * - * The role of the filter may expand, but currently serves to manage - * the interactions of messages with transaction state. - * - * \param request_msg_type The message type for the request. - */ -static inline void -xs_request_filter(uint32_t request_msg_type) -{ - if (request_msg_type == XS_TRANSACTION_START) - sx_slock(&xs.suspend_mutex); -} - -/** - * Filter invoked after transmitting any message to the XenStore service. - * - * The role of the filter may expand, but currently serves to manage - * the interactions of messages with transaction state. - * - * \param request_msg_type The message type for the original request. - * \param reply_msg_type The message type for any received reply. - * \param request_reply_error The error status from the attempt to send - * the request or retrieve the reply. - */ -static inline void -xs_reply_filter(uint32_t request_msg_type, - uint32_t reply_msg_type, int request_reply_error) -{ - /* - * The count of transactions drops if we attempted - * to end a transaction (even if that attempt fails - * in error), we receive a transaction end acknowledgement, - * or if our attempt to begin a transaction fails. - */ - if (request_msg_type == XS_TRANSACTION_END - || (request_reply_error == 0 && reply_msg_type == XS_TRANSACTION_END) - || (request_msg_type == XS_TRANSACTION_START - && (request_reply_error != 0 || reply_msg_type == XS_ERROR))) - sx_sunlock(&xs.suspend_mutex); - -} - #define xsd_error_count (sizeof(xsd_errors) / sizeof(xsd_errors[0])) /** @@ -843,15 +787,12 @@ xs_dev_request_and_reply(struct xsd_sockmsg *msg, void int error; request_type = msg->type; - xs_request_filter(request_type); sx_xlock(&xs.request_mutex); if ((error = xs_write_store(msg, sizeof(*msg) + msg->len)) == 0) error = xs_read_reply(&msg->type, &msg->len, result); sx_xunlock(&xs.request_mutex); - xs_reply_filter(request_type, msg->type, error); - return (error); } @@ -887,8 +828,6 @@ xs_talkv(struct xs_transaction t, enum xsd_sockmsg_typ for (i = 0; i < num_vecs; i++) msg.len += iovec[i].iov_len; - xs_request_filter(request_type); - sx_xlock(&xs.request_mutex); error = xs_write_store(&msg, sizeof(msg)); if (error) { @@ -908,7 +847,6 @@ xs_talkv(struct xs_transaction t, enum xsd_sockmsg_typ error_lock_held: sx_xunlock(&xs.request_mutex); - xs_reply_filter(request_type, msg.type, error); if (error) return (error); @@ -1206,7 +1144,6 @@ xs_attach(device_t dev) mtx_init(&xs.reply_lock, "reply lock", NULL, MTX_DEF); sx_init(&xs.xenwatch_mutex, "xenwatch"); sx_init(&xs.request_mutex, "xenstore request"); - sx_init(&xs.suspend_mutex, "xenstore suspend"); mtx_init(&xs.registered_watches_lock, "watches", NULL, MTX_DEF); mtx_init(&xs.watch_events_lock, "watch events", NULL, MTX_DEF); @@ -1249,7 +1186,6 @@ xs_suspend(device_t dev) if (error != 0) return (error); - sx_xlock(&xs.suspend_mutex); sx_xlock(&xs.request_mutex); return (0); @@ -1269,16 +1205,16 @@ xs_resume(device_t dev __unused) sx_xunlock(&xs.request_mutex); /* - * No need for registered_watches_lock: the suspend_mutex - * is sufficient. + * NB: since xenstore childs have not been resumed yet, there's + * no need to hold any watch mutex. Having clients try to add or + * remove watches at this point (before xenstore is resumed) is + * clearly a violantion of the resume order. */ LIST_FOREACH(watch, &xs.registered_watches, list) { sprintf(token, "%lX", (long)watch); xs_watch(watch->node, token); } - sx_xunlock(&xs.suspend_mutex); - /* Resume child Xen devices. */ bus_generic_resume(dev); @@ -1631,8 +1567,6 @@ xs_register_watch(struct xs_watch *watch) sprintf(token, "%lX", (long)watch); - sx_slock(&xs.suspend_mutex); - mtx_lock(&xs.registered_watches_lock); KASSERT(find_watch(token) == NULL, ("watch already registered")); LIST_INSERT_HEAD(&xs.registered_watches, watch, list); @@ -1650,8 +1584,6 @@ xs_register_watch(struct xs_watch *watch) mtx_unlock(&xs.registered_watches_lock); } - sx_sunlock(&xs.suspend_mutex); - return (error); } @@ -1664,12 +1596,9 @@ xs_unregister_watch(struct xs_watch *watch) sprintf(token, "%lX", (long)watch); - sx_slock(&xs.suspend_mutex); - mtx_lock(&xs.registered_watches_lock); if (find_watch(token) == NULL) { mtx_unlock(&xs.registered_watches_lock); - sx_sunlock(&xs.suspend_mutex); return; } LIST_REMOVE(watch, list); @@ -1679,8 +1608,6 @@ xs_unregister_watch(struct xs_watch *watch) if (error) log(LOG_WARNING, "XENSTORE Failed to release watch %s: %i\n", watch->node, error); - - sx_sunlock(&xs.suspend_mutex); /* Cancel pending watch events. */ mtx_lock(&xs.watch_events_lock); From owner-svn-src-head@freebsd.org Thu May 24 10:17:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57FB5EAAD76; Thu, 24 May 2018 10:17:04 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B0E281C02; Thu, 24 May 2018 10:17:04 +0000 (UTC) (envelope-from royger@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E05FB10E72; Thu, 24 May 2018 10:17:03 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OAH3nc076628; Thu, 24 May 2018 10:17:03 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OAH3Dt076627; Thu, 24 May 2018 10:17:03 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201805241017.w4OAH3Dt076627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 24 May 2018 10:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334141 - head/sys/dev/xen/xenstore X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/xenstore X-SVN-Commit-Revision: 334141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:17:04 -0000 Author: royger Date: Thu May 24 10:17:03 2018 New Revision: 334141 URL: https://svnweb.freebsd.org/changeset/base/334141 Log: xenstore: don't wait with the PCATCH flag Due to the current synchronous xenstore implementation in FreeBSD, we cannot return from xs_read_reply without reading a reply, or else the ring gets out of sync and the next request will read the previous reply and crash due to the type mismatch. A proper solution involves making use of the req_id field in the message and allowing multiple in-flight messages at the same time on the ring. Remove the PCATCH flag so that signals don't interrupt the wait. Tested by: Nathan Friess Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/xenstore/xenstore.c Modified: head/sys/dev/xen/xenstore/xenstore.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore.c Thu May 24 10:16:11 2018 (r334140) +++ head/sys/dev/xen/xenstore/xenstore.c Thu May 24 10:17:03 2018 (r334141) @@ -742,8 +742,8 @@ xs_read_reply(enum xsd_sockmsg_type *type, u_int *len, mtx_lock(&xs.reply_lock); while (TAILQ_EMPTY(&xs.reply_list)) { - error = mtx_sleep(&xs.reply_list, &xs.reply_lock, - PCATCH, "xswait", hz/10); + error = mtx_sleep(&xs.reply_list, &xs.reply_lock, 0, "xswait", + hz/10); if (error && error != EWOULDBLOCK) { mtx_unlock(&xs.reply_lock); return (error); From owner-svn-src-head@freebsd.org Thu May 24 10:17:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F02AAEAAE0E; Thu, 24 May 2018 10:17:49 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0C0881D7B; Thu, 24 May 2018 10:17:49 +0000 (UTC) (envelope-from royger@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8353F10E73; Thu, 24 May 2018 10:17:49 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OAHn12076693; Thu, 24 May 2018 10:17:49 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OAHn4W076692; Thu, 24 May 2018 10:17:49 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201805241017.w4OAHn4W076692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 24 May 2018 10:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334142 - head/sys/dev/xen/xenstore X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/xenstore X-SVN-Commit-Revision: 334142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:17:50 -0000 Author: royger Date: Thu May 24 10:17:49 2018 New Revision: 334142 URL: https://svnweb.freebsd.org/changeset/base/334142 Log: dev/xenstore: add support for watches Allow user-space applications to register watches using the xenstore device. This is needed in order to run toolstack operations on domains different than the one where xenstore is running (in which case the device is not used, since the connection to xenstore is done using a plain socket). Tested by: Nathan Friess Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/xenstore/xenstore_dev.c Modified: head/sys/dev/xen/xenstore/xenstore_dev.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore_dev.c Thu May 24 10:17:03 2018 (r334141) +++ head/sys/dev/xen/xenstore/xenstore_dev.c Thu May 24 10:17:49 2018 (r334142) @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include @@ -56,10 +58,20 @@ struct xs_dev_transaction { struct xs_transaction handle; }; +struct xs_dev_watch { + LIST_ENTRY(xs_dev_watch) list; + struct xs_watch watch; + char *token; + struct xs_dev_data *user; +}; + struct xs_dev_data { /* In-progress transaction. */ - LIST_HEAD(xdd_list_head, xs_dev_transaction) transactions; + LIST_HEAD(, xs_dev_transaction) transactions; + /* Active watches. */ + LIST_HEAD(, xs_dev_watch) watches; + /* Partial request. */ unsigned int len; union { @@ -71,8 +83,137 @@ struct xs_dev_data { #define MASK_READ_IDX(idx) ((idx)&(PAGE_SIZE-1)) char read_buffer[PAGE_SIZE]; unsigned int read_cons, read_prod; + + /* Serializes writes to the read buffer. */ + struct mtx lock; + + /* Polling structure (for reads only ATM). */ + struct selinfo ev_rsel; }; +static void +xs_queue_reply(struct xs_dev_data *u, const char *data, unsigned int len) +{ + unsigned int i; + + for (i = 0; i < len; i++, u->read_prod++) + u->read_buffer[MASK_READ_IDX(u->read_prod)] = data[i]; + + KASSERT((u->read_prod - u->read_cons) <= sizeof(u->read_buffer), + ("xenstore reply too big")); + + wakeup(u); + selwakeup(&u->ev_rsel); +} + +static const char * +xs_dev_error_to_string(int error) +{ + unsigned int i; + + for (i = 0; i < nitems(xsd_errors); i++) + if (xsd_errors[i].errnum == error) + return (xsd_errors[i].errstring); + + return (NULL); +} + +static void +xs_dev_return_error(struct xs_dev_data *u, int error, int req_id, int tx_id) +{ + struct xsd_sockmsg msg; + const char *payload; + + msg.type = XS_ERROR; + msg.req_id = req_id; + msg.tx_id = tx_id; + payload = NULL; + + + payload = xs_dev_error_to_string(error); + if (payload == NULL) + payload = xs_dev_error_to_string(EINVAL); + KASSERT(payload != NULL, ("Unable to find string for EINVAL errno")); + + msg.len = strlen(payload) + 1; + + mtx_lock(&u->lock); + xs_queue_reply(u, (char *)&msg, sizeof(msg)); + xs_queue_reply(u, payload, msg.len); + mtx_unlock(&u->lock); +} + +static int +xs_dev_watch_message_parse_string(const char **p, const char *end, + const char **string_r) +{ + const char *nul; + + nul = memchr(*p, 0, end - *p); + if (!nul) + return (EINVAL); + + *string_r = *p; + *p = nul+1; + + return (0); +} + +static int +xs_dev_watch_message_parse(const struct xsd_sockmsg *msg, const char **path_r, + const char **token_r) +{ + const char *p, *end; + int error; + + p = (const char *)msg + sizeof(*msg); + end = p + msg->len; + KASSERT(p <= end, ("payload overflow")); + + error = xs_dev_watch_message_parse_string(&p, end, path_r); + if (error) + return (error); + error = xs_dev_watch_message_parse_string(&p, end, token_r); + if (error) + return (error); + + return (0); +} + +static struct xs_dev_watch * +xs_dev_find_watch(struct xs_dev_data *u, const char *token) +{ + struct xs_dev_watch *watch; + + LIST_FOREACH(watch, &u->watches, list) + if (strcmp(watch->token, token) == 0) + return (watch); + + return (NULL); +} + +static void +xs_dev_watch_cb(struct xs_watch *watch, const char **vec, unsigned int len) +{ + struct xs_dev_watch *dwatch; + struct xsd_sockmsg msg; + char *payload; + + dwatch = (struct xs_dev_watch *)watch->callback_data; + msg.type = XS_WATCH_EVENT; + msg.req_id = msg.tx_id = 0; + msg.len = strlen(vec[XS_WATCH_PATH]) + strlen(dwatch->token) + 2; + + payload = malloc(msg.len, M_XENSTORE, M_WAITOK); + strcpy(payload, vec[XS_WATCH_PATH]); + strcpy(&payload[strlen(vec[XS_WATCH_PATH]) + 1], dwatch->token); + mtx_lock(&dwatch->user->lock); + xs_queue_reply(dwatch->user, (char *)&msg, sizeof(msg)); + xs_queue_reply(dwatch->user, payload, msg.len); + mtx_unlock(&dwatch->user->lock); + free(payload, M_XENSTORE); +} + static int xs_dev_read(struct cdev *dev, struct uio *uio, int ioflag) { @@ -101,27 +242,16 @@ xs_dev_read(struct cdev *dev, struct uio *uio, int iof return (0); } -static void -xs_queue_reply(struct xs_dev_data *u, char *data, unsigned int len) -{ - int i; - - for (i = 0; i < len; i++, u->read_prod++) - u->read_buffer[MASK_READ_IDX(u->read_prod)] = data[i]; - - KASSERT((u->read_prod - u->read_cons) <= sizeof(u->read_buffer), - ("xenstore reply too big")); - - wakeup(u); -} - static int xs_dev_write(struct cdev *dev, struct uio *uio, int ioflag) { int error; + const char *wpath, *wtoken; struct xs_dev_data *u; struct xs_dev_transaction *trans; + struct xs_dev_watch *watch; void *reply; + static const char *ok = "OK"; int len = uio->uio_resid; error = devfs_get_cdevpriv((void **)&u); @@ -168,35 +298,130 @@ xs_dev_write(struct cdev *dev, struct uio *uio, int io LIST_REMOVE(trans, list); free(trans, M_XENSTORE); } + mtx_lock(&u->lock); xs_queue_reply(u, (char *)&u->u.msg, sizeof(u->u.msg)); xs_queue_reply(u, (char *)reply, u->u.msg.len); + mtx_unlock(&u->lock); free(reply, M_XENSTORE); } break; + case XS_WATCH: + u->u.msg.tx_id = 0; + error = xs_dev_watch_message_parse(&u->u.msg, &wpath, &wtoken); + if (error) + break; + if (xs_dev_find_watch(u, wtoken) != NULL) { + error = EINVAL; + break; + } + watch = malloc(sizeof(*watch), M_XENSTORE, M_WAITOK); + watch->watch.node = strdup(wpath, M_XENSTORE); + watch->watch.callback = xs_dev_watch_cb; + watch->watch.callback_data = (uintptr_t)watch; + watch->token = strdup(wtoken, M_XENSTORE); + watch->user = u; + + error = xs_register_watch(&watch->watch); + if (error != 0) { + free(watch->token, M_XENSTORE); + free(watch->watch.node, M_XENSTORE); + free(watch, M_XENSTORE); + break; + } + + LIST_INSERT_HEAD(&u->watches, watch, list); + u->u.msg.len = sizeof(ok); + mtx_lock(&u->lock); + xs_queue_reply(u, (char *)&u->u.msg, sizeof(u->u.msg)); + xs_queue_reply(u, ok, sizeof(ok)); + mtx_unlock(&u->lock); + break; + case XS_UNWATCH: + u->u.msg.tx_id = 0; + error = xs_dev_watch_message_parse(&u->u.msg, &wpath, &wtoken); + if (error) + break; + watch = xs_dev_find_watch(u, wtoken); + if (watch == NULL) { + error = EINVAL; + break; + } + + LIST_REMOVE(watch, list); + xs_unregister_watch(&watch->watch); + free(watch->watch.node, M_XENSTORE); + free(watch->token, M_XENSTORE); + free(watch, M_XENSTORE); + u->u.msg.len = sizeof(ok); + mtx_lock(&u->lock); + xs_queue_reply(u, (char *)&u->u.msg, sizeof(u->u.msg)); + xs_queue_reply(u, ok, sizeof(ok)); + mtx_unlock(&u->lock); + break; default: error = EINVAL; break; } - if (error == 0) - u->len = 0; + if (error != 0) + xs_dev_return_error(u, error, u->u.msg.req_id, u->u.msg.tx_id); - return (error); + /* Reset the write buffer. */ + u->len = 0; + + return (0); } +static int +xs_dev_poll(struct cdev *dev, int events, struct thread *td) +{ + struct xs_dev_data *u; + int error, mask; + + error = devfs_get_cdevpriv((void **)&u); + if (error != 0) + return (POLLERR); + + /* we can always write */ + mask = events & (POLLOUT | POLLWRNORM); + + if (events & (POLLIN | POLLRDNORM)) { + if (u->read_cons != u->read_prod) { + mask |= events & (POLLIN | POLLRDNORM); + } else { + /* Record that someone is waiting */ + selrecord(td, &u->ev_rsel); + } + } + + return (mask); +} + static void xs_dev_dtor(void *arg) { struct xs_dev_data *u = arg; - struct xs_dev_transaction *trans, *tmp; + struct xs_dev_transaction *trans, *tmpt; + struct xs_dev_watch *watch, *tmpw; - LIST_FOREACH_SAFE(trans, &u->transactions, list, tmp) { + seldrain(&u->ev_rsel); + + LIST_FOREACH_SAFE(trans, &u->transactions, list, tmpt) { xs_transaction_end(trans->handle, 1); LIST_REMOVE(trans, list); free(trans, M_XENSTORE); } + LIST_FOREACH_SAFE(watch, &u->watches, list, tmpw) { + LIST_REMOVE(watch, list); + xs_unregister_watch(&watch->watch); + free(watch->watch.node, M_XENSTORE); + free(watch->token, M_XENSTORE); + free(watch, M_XENSTORE); + } + mtx_destroy(&u->lock); + free(u, M_XENSTORE); } @@ -207,7 +432,9 @@ xs_dev_open(struct cdev *dev, int oflags, int devtype, int error; u = malloc(sizeof(*u), M_XENSTORE, M_WAITOK|M_ZERO); + mtx_init(&u->lock, "xsdev_lock", NULL, MTX_DEF); LIST_INIT(&u->transactions); + LIST_INIT(&u->watches); error = devfs_set_cdevpriv(u, xs_dev_dtor); if (error != 0) free(u, M_XENSTORE); @@ -220,6 +447,7 @@ static struct cdevsw xs_dev_cdevsw = { .d_read = xs_dev_read, .d_write = xs_dev_write, .d_open = xs_dev_open, + .d_poll = xs_dev_poll, .d_name = "xs_dev", }; From owner-svn-src-head@freebsd.org Thu May 24 10:18:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB84AEAAE82; Thu, 24 May 2018 10:18:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F12381EBC; Thu, 24 May 2018 10:18:15 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F8C010E74; Thu, 24 May 2018 10:18:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OAIFLH076757; Thu, 24 May 2018 10:18:15 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OAIEgO076752; Thu, 24 May 2018 10:18:14 GMT (envelope-from np@FreeBSD.org) Message-Id: <201805241018.w4OAIEgO076752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 24 May 2018 10:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334143 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 334143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:18:16 -0000 Author: np Date: Thu May 24 10:18:14 2018 New Revision: 334143 URL: https://svnweb.freebsd.org/changeset/base/334143 Log: cxgbe(4): Data path for rate-limited tx. This is hardware support for the SO_MAX_PACING_RATE sockopt (see setsockopt(2)), which is available in kernels built with "options RATELIMIT". Relnotes: Yes Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sched.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu May 24 10:17:49 2018 (r334142) +++ head/sys/dev/cxgbe/adapter.h Thu May 24 10:18:14 2018 (r334143) @@ -1217,6 +1217,10 @@ void t4_register_an_handler(an_handler_t); void t4_register_fw_msg_handler(int, fw_msg_handler_t); void t4_register_cpl_handler(int, cpl_handler_t); void t4_register_shared_cpl_handler(int, cpl_handler_t, int); +#ifdef RATELIMIT +int ethofld_transmit(struct ifnet *, struct mbuf *); +void send_etid_flush_wr(struct cxgbe_snd_tag *); +#endif /* t4_tracer.c */ struct t4_tracer; @@ -1239,11 +1243,13 @@ void t4_release_cl_rl_kbps(struct adapter *, int, int) #ifdef RATELIMIT void t4_init_etid_table(struct adapter *); void t4_free_etid_table(struct adapter *); +struct cxgbe_snd_tag *lookup_etid(struct adapter *, int); int cxgbe_snd_tag_alloc(struct ifnet *, union if_snd_tag_alloc_params *, struct m_snd_tag **); int cxgbe_snd_tag_modify(struct m_snd_tag *, union if_snd_tag_modify_params *); int cxgbe_snd_tag_query(struct m_snd_tag *, union if_snd_tag_query_params *); void cxgbe_snd_tag_free(struct m_snd_tag *); +void cxgbe_snd_tag_free_locked(struct cxgbe_snd_tag *); #endif /* t4_filter.c */ Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Thu May 24 10:17:49 2018 (r334142) +++ head/sys/dev/cxgbe/offload.h Thu May 24 10:18:14 2018 (r334143) @@ -79,6 +79,14 @@ union aopen_entry { union aopen_entry *next; }; +/* cxgbe_snd_tag flags */ +enum { + EO_FLOWC_PENDING = (1 << 0), /* flowc needs to be sent */ + EO_FLOWC_RPL_PENDING = (1 << 1), /* flowc credits due back */ + EO_SND_TAG_REF = (1 << 2), /* kernel has a ref on us */ + EO_FLUSH_RPL_PENDING = (1 << 3), /* credit flush rpl due back */ +}; + struct cxgbe_snd_tag { struct m_snd_tag com; struct adapter *adapter; @@ -86,13 +94,13 @@ struct cxgbe_snd_tag { struct mtx lock; int port_id; int etid; + struct mbufq pending_tx, pending_fwack; + int plen; struct sge_wrq *eo_txq; + uint32_t ctrl0; uint16_t iqid; int8_t schedcl; uint64_t max_rate; /* in bytes/s */ - int8_t next_credits; /* need these many tx credits next */ - uint8_t next_nsegs; /* next WR will have these many GL segs total */ - uint8_t next_msegs; /* max segs for a single mbuf in next chain */ uint8_t tx_total; /* total tx WR credits (in 16B units) */ uint8_t tx_credits; /* tx WR credits (in 16B units) available */ uint8_t tx_nocompl; /* tx WR credits since last compl request */ Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu May 24 10:17:49 2018 (r334142) +++ head/sys/dev/cxgbe/t4_main.c Thu May 24 10:18:14 2018 (r334143) @@ -1891,6 +1891,17 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic is ok */ return (rc); } +#ifdef RATELIMIT + if (m->m_pkthdr.snd_tag != NULL) { + /* EAGAIN tells the stack we are not the correct interface. */ + if (__predict_false(ifp != m->m_pkthdr.snd_tag->ifp)) { + m_freem(m); + return (EAGAIN); + } + + return (ethofld_transmit(ifp, m)); + } +#endif /* Select a txq. */ txq = &sc->sge.txq[vi->first_txq]; Modified: head/sys/dev/cxgbe/t4_sched.c ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Thu May 24 10:17:49 2018 (r334142) +++ head/sys/dev/cxgbe/t4_sched.c Thu May 24 10:18:14 2018 (r334143) @@ -529,7 +529,6 @@ alloc_etid(struct adapter *sc, struct cxgbe_snd_tag *c return (etid); } -#ifdef notyet struct cxgbe_snd_tag * lookup_etid(struct adapter *sc, int etid) { @@ -537,7 +536,6 @@ lookup_etid(struct adapter *sc, int etid) return (t->etid_tab[etid - t->etid_base].cst); } -#endif static void free_etid(struct adapter *sc, int etid) @@ -585,14 +583,21 @@ failed: } mtx_init(&cst->lock, "cst_lock", NULL, MTX_DEF); + mbufq_init(&cst->pending_tx, INT_MAX); + mbufq_init(&cst->pending_fwack, INT_MAX); cst->com.ifp = ifp; + cst->flags |= EO_FLOWC_PENDING | EO_SND_TAG_REF; cst->adapter = sc; cst->port_id = pi->port_id; cst->schedcl = schedcl; cst->max_rate = params->rate_limit.max_rate; - cst->next_credits = -1; cst->tx_credits = sc->params.ofldq_wr_cred; cst->tx_total = cst->tx_credits; + cst->plen = 0; + cst->ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT) | + V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(G_FW_VIID_PFN(vi->viid)) | + V_TXPKT_VF(G_FW_VIID_VIN(vi->viid)) | + V_TXPKT_VF_VLD(G_FW_VIID_VIVLD(vi->viid))); /* * Queues will be selected later when the connection flowid is available. @@ -616,6 +621,8 @@ cxgbe_snd_tag_modify(struct m_snd_tag *mst, /* XXX: is schedcl -1 ok here? */ MPASS(cst->schedcl >= 0 && cst->schedcl < sc->chip_params->nsched_cls); + mtx_lock(&cst->lock); + MPASS(cst->flags & EO_SND_TAG_REF); rc = t4_reserve_cl_rl_kbps(sc, cst->port_id, (params->rate_limit.max_rate * 8ULL / 1000), &schedcl); if (rc != 0) @@ -624,6 +631,7 @@ cxgbe_snd_tag_modify(struct m_snd_tag *mst, t4_release_cl_rl_kbps(sc, cst->port_id, cst->schedcl); cst->schedcl = schedcl; cst->max_rate = params->rate_limit.max_rate; + mtx_unlock(&cst->lock); return (0); } @@ -643,18 +651,53 @@ cxgbe_snd_tag_query(struct m_snd_tag *mst, return (0); } +/* + * Unlocks cst and frees it. + */ void -cxgbe_snd_tag_free(struct m_snd_tag *mst) +cxgbe_snd_tag_free_locked(struct cxgbe_snd_tag *cst) { - struct cxgbe_snd_tag *cst = mst_to_cst(mst); struct adapter *sc = cst->adapter; + mtx_assert(&cst->lock, MA_OWNED); + MPASS((cst->flags & EO_SND_TAG_REF) == 0); + MPASS(cst->tx_credits == cst->tx_total); + MPASS(cst->plen == 0); + MPASS(mbufq_first(&cst->pending_tx) == NULL); + MPASS(mbufq_first(&cst->pending_fwack) == NULL); + if (cst->etid >= 0) free_etid(sc, cst->etid); if (cst->schedcl != -1) t4_release_cl_rl_kbps(sc, cst->port_id, cst->schedcl); - if (mtx_initialized(&cst->lock)) - mtx_destroy(&cst->lock); + mtx_unlock(&cst->lock); + mtx_destroy(&cst->lock); free(cst, M_CXGBE); +} + +void +cxgbe_snd_tag_free(struct m_snd_tag *mst) +{ + struct cxgbe_snd_tag *cst = mst_to_cst(mst); + + mtx_lock(&cst->lock); + + /* The kernel is done with the snd_tag. Remove its reference. */ + MPASS(cst->flags & EO_SND_TAG_REF); + cst->flags &= ~EO_SND_TAG_REF; + + if (cst->ncompl == 0) { + /* + * No fw4_ack in flight. Free the tag right away if there are + * no outstanding credits. Request the firmware to return all + * credits for the etid otherwise. + */ + if (cst->tx_credits == cst->tx_total) { + cxgbe_snd_tag_free_locked(cst); + return; /* cst is gone. */ + } + send_etid_flush_wr(cst); + } + mtx_unlock(&cst->lock); } #endif Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu May 24 10:17:49 2018 (r334142) +++ head/sys/dev/cxgbe/t4_sge.c Thu May 24 10:18:14 2018 (r334143) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -153,7 +154,24 @@ TUNABLE_INT("hw.cxgbe.largest_rx_cluster", &largest_rx static int safest_rx_cluster = PAGE_SIZE; TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); +#ifdef RATELIMIT /* + * Knob to control TCP timestamp rewriting, and the granularity of the tick used + * for rewriting. -1 and 0-3 are all valid values. + * -1: hardware should leave the TCP timestamps alone. + * 0: 1ms + * 1: 100us + * 2: 10us + * 3: 1us + */ +static int tsclk = -1; +TUNABLE_INT("hw.cxgbe.tsclk", &tsclk); + +static int eo_max_backlog = 1024 * 1024; +TUNABLE_INT("hw.cxgbe.eo_max_backlog", &eo_max_backlog); +#endif + +/* * The interrupt holdoff timers are multiplied by this value on T6+. * 1 and 3-17 (both inclusive) are legal values. */ @@ -279,6 +297,11 @@ static void drain_wrq_wr_list(struct adapter *, struct static int sysctl_uint16(SYSCTL_HANDLER_ARGS); static int sysctl_bufsizes(SYSCTL_HANDLER_ARGS); static int sysctl_tc(SYSCTL_HANDLER_ARGS); +#ifdef RATELIMIT +static inline u_int txpkt_eo_len16(u_int, u_int, u_int); +static int ethofld_fw4_ack(struct sge_iq *, const struct rss_header *, + struct mbuf *); +#endif static counter_u64_t extfree_refs; static counter_u64_t extfree_rels; @@ -515,6 +538,10 @@ t4_sge_modload(void) t4_register_cpl_handler(CPL_FW6_MSG, handle_fw_msg); t4_register_cpl_handler(CPL_SGE_EGR_UPDATE, handle_sge_egr_update); t4_register_cpl_handler(CPL_RX_PKT, t4_eth_rx); +#ifdef RATELIMIT + t4_register_shared_cpl_handler(CPL_FW4_ACK, ethofld_fw4_ack, + CPL_COOKIE_ETHOFLD); +#endif t4_register_fw_msg_handler(FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); t4_register_fw_msg_handler(FW6_TYPE_WRERR_RPL, t4_handle_wrerr_rpl); } @@ -2078,7 +2105,68 @@ set_mbuf_len16(struct mbuf *m, uint8_t len16) m->m_pkthdr.PH_loc.eight[0] = len16; } +#ifdef RATELIMIT static inline int +mbuf_eo_nsegs(struct mbuf *m) +{ + + M_ASSERTPKTHDR(m); + return (m->m_pkthdr.PH_loc.eight[1]); +} + +static inline void +set_mbuf_eo_nsegs(struct mbuf *m, uint8_t nsegs) +{ + + M_ASSERTPKTHDR(m); + m->m_pkthdr.PH_loc.eight[1] = nsegs; +} + +static inline int +mbuf_eo_len16(struct mbuf *m) +{ + int n; + + M_ASSERTPKTHDR(m); + n = m->m_pkthdr.PH_loc.eight[2]; + MPASS(n > 0 && n <= SGE_MAX_WR_LEN / 16); + + return (n); +} + +static inline void +set_mbuf_eo_len16(struct mbuf *m, uint8_t len16) +{ + + M_ASSERTPKTHDR(m); + m->m_pkthdr.PH_loc.eight[2] = len16; +} + +static inline int +mbuf_eo_tsclk_tsoff(struct mbuf *m) +{ + + M_ASSERTPKTHDR(m); + return (m->m_pkthdr.PH_loc.eight[3]); +} + +static inline void +set_mbuf_eo_tsclk_tsoff(struct mbuf *m, uint8_t tsclk_tsoff) +{ + + M_ASSERTPKTHDR(m); + m->m_pkthdr.PH_loc.eight[3] = tsclk_tsoff; +} + +static inline int +needs_eo(struct mbuf *m) +{ + + return (m->m_pkthdr.snd_tag != NULL); +} +#endif + +static inline int needs_tso(struct mbuf *m) { @@ -2107,6 +2195,22 @@ needs_l4_csum(struct mbuf *m) } static inline int +needs_tcp_csum(struct mbuf *m) +{ + + M_ASSERTPKTHDR(m); + return (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_TCP_IPV6 | CSUM_TSO)); +} + +static inline int +needs_udp_csum(struct mbuf *m) +{ + + M_ASSERTPKTHDR(m); + return (m->m_pkthdr.csum_flags & (CSUM_UDP | CSUM_UDP_IPV6)); +} + +static inline int needs_vlan_insertion(struct mbuf *m) { @@ -2142,16 +2246,19 @@ m_advance(struct mbuf **pm, int *poffset, int len) /* * Can deal with empty mbufs in the chain that have m_len = 0, but the chain - * must have at least one mbuf that's not empty. + * must have at least one mbuf that's not empty. It is possible for this + * routine to return 0 if skip accounts for all the contents of the mbuf chain. */ static inline int -count_mbuf_nsegs(struct mbuf *m) +count_mbuf_nsegs(struct mbuf *m, int skip) { vm_paddr_t lastb, next; vm_offset_t va; int len, nsegs; - MPASS(m != NULL); + M_ASSERTPKTHDR(m); + MPASS(m->m_pkthdr.len > 0); + MPASS(m->m_pkthdr.len >= skip); nsegs = 0; lastb = 0; @@ -2160,15 +2267,20 @@ count_mbuf_nsegs(struct mbuf *m) len = m->m_len; if (__predict_false(len == 0)) continue; - va = mtod(m, vm_offset_t); + if (skip >= len) { + skip -= len; + continue; + } + va = mtod(m, vm_offset_t) + skip; + len -= skip; + skip = 0; next = pmap_kextract(va); - nsegs += sglist_count(m->m_data, len); + nsegs += sglist_count((void *)(uintptr_t)va, len); if (lastb + 1 == next) nsegs--; lastb = pmap_kextract(va + len - 1); } - MPASS(nsegs > 0); return (nsegs); } @@ -2204,7 +2316,7 @@ restart: */ M_ASSERTPKTHDR(m0); MPASS(m0->m_pkthdr.len > 0); - nsegs = count_mbuf_nsegs(m0); + nsegs = count_mbuf_nsegs(m0, 0); if (nsegs > (needs_tso(m0) ? TX_SGL_SEGS_TSO : TX_SGL_SEGS)) { if (defragged++ > 0 || (m = m_defrag(m0, M_NOWAIT)) == NULL) { rc = EFBIG; @@ -2230,7 +2342,20 @@ restart: else set_mbuf_len16(m0, txpkt_len16(nsegs, needs_tso(m0))); +#ifdef RATELIMIT + /* + * Ethofld is limited to TCP and UDP for now, and only when L4 hw + * checksumming is enabled. needs_l4_csum happens to check for all the + * right things. + */ + if (__predict_false(needs_eo(m0) && !needs_l4_csum(m0))) + m0->m_pkthdr.snd_tag = NULL; +#endif + if (!needs_tso(m0) && +#ifdef RATELIMIT + !needs_eo(m0) && +#endif !(sc->flags & IS_VF && (needs_l3_csum(m0) || needs_l4_csum(m0)))) return (0); @@ -2276,11 +2401,34 @@ restart: } #if defined(INET) || defined(INET6) - if (needs_tso(m0)) { + if (needs_tcp_csum(m0)) { tcp = m_advance(&m, &offset, m0->m_pkthdr.l3hlen); m0->m_pkthdr.l4hlen = tcp->th_off * 4; +#ifdef RATELIMIT + if (tsclk >= 0 && *(uint32_t *)(tcp + 1) == ntohl(0x0101080a)) { + set_mbuf_eo_tsclk_tsoff(m0, + V_FW_ETH_TX_EO_WR_TSCLK(tsclk) | + V_FW_ETH_TX_EO_WR_TSOFF(sizeof(*tcp) / 2 + 1)); + } else + set_mbuf_eo_tsclk_tsoff(m0, 0); + } else if (needs_udp_csum(m)) { + m0->m_pkthdr.l4hlen = sizeof(struct udphdr); +#endif } +#ifdef RATELIMIT + if (needs_eo(m0)) { + u_int immhdrs; + + /* EO WRs have the headers in the WR and not the GL. */ + immhdrs = m0->m_pkthdr.l2hlen + m0->m_pkthdr.l3hlen + + m0->m_pkthdr.l4hlen; + nsegs = count_mbuf_nsegs(m0, immhdrs); + set_mbuf_eo_nsegs(m0, nsegs); + set_mbuf_eo_len16(m0, + txpkt_eo_len16(nsegs, immhdrs, needs_tso(m0))); + } #endif +#endif MPASS(m0 == *mp); return (0); } @@ -5302,3 +5450,416 @@ done: mtx_unlock(&sc->tc_lock); return (rc); } + +#ifdef RATELIMIT +/* + * len16 for a txpkt WR with a GL. Includes the firmware work request header. + */ +static inline u_int +txpkt_eo_len16(u_int nsegs, u_int immhdrs, u_int tso) +{ + u_int n; + + MPASS(immhdrs > 0); + + n = roundup2(sizeof(struct fw_eth_tx_eo_wr) + + sizeof(struct cpl_tx_pkt_core) + immhdrs, 16); + if (__predict_false(nsegs == 0)) + goto done; + + nsegs--; /* first segment is part of ulptx_sgl */ + n += sizeof(struct ulptx_sgl) + 8 * ((3 * nsegs) / 2 + (nsegs & 1)); + if (tso) + n += sizeof(struct cpl_tx_pkt_lso_core); + +done: + return (howmany(n, 16)); +} + +#define ETID_FLOWC_NPARAMS 6 +#define ETID_FLOWC_LEN (roundup2((sizeof(struct fw_flowc_wr) + \ + ETID_FLOWC_NPARAMS * sizeof(struct fw_flowc_mnemval)), 16)) +#define ETID_FLOWC_LEN16 (howmany(ETID_FLOWC_LEN, 16)) + +static int +send_etid_flowc_wr(struct cxgbe_snd_tag *cst, struct port_info *pi, + struct vi_info *vi) +{ + struct wrq_cookie cookie; + u_int pfvf = G_FW_VIID_PFN(vi->viid) << S_FW_VIID_PFN; + struct fw_flowc_wr *flowc; + + mtx_assert(&cst->lock, MA_OWNED); + MPASS((cst->flags & (EO_FLOWC_PENDING | EO_FLOWC_RPL_PENDING)) == + EO_FLOWC_PENDING); + + flowc = start_wrq_wr(cst->eo_txq, ETID_FLOWC_LEN16, &cookie); + if (__predict_false(flowc == NULL)) + return (ENOMEM); + + bzero(flowc, ETID_FLOWC_LEN); + flowc->op_to_nparams = htobe32(V_FW_WR_OP(FW_FLOWC_WR) | + V_FW_FLOWC_WR_NPARAMS(ETID_FLOWC_NPARAMS) | V_FW_WR_COMPL(0)); + flowc->flowid_len16 = htonl(V_FW_WR_LEN16(ETID_FLOWC_LEN16) | + V_FW_WR_FLOWID(cst->etid)); + flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; + flowc->mnemval[0].val = htobe32(pfvf); + flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; + flowc->mnemval[1].val = htobe32(pi->tx_chan); + flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; + flowc->mnemval[2].val = htobe32(pi->tx_chan); + flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; + flowc->mnemval[3].val = htobe32(cst->iqid); + flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_EOSTATE; + flowc->mnemval[4].val = htobe32(FW_FLOWC_MNEM_EOSTATE_ESTABLISHED); + flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_SCHEDCLASS; + flowc->mnemval[5].val = htobe32(cst->schedcl); + + commit_wrq_wr(cst->eo_txq, flowc, &cookie); + + cst->flags &= ~EO_FLOWC_PENDING; + cst->flags |= EO_FLOWC_RPL_PENDING; + MPASS(cst->tx_credits >= ETID_FLOWC_LEN16); /* flowc is first WR. */ + cst->tx_credits -= ETID_FLOWC_LEN16; + + return (0); +} + +#define ETID_FLUSH_LEN16 (howmany(sizeof (struct fw_flowc_wr), 16)) + +void +send_etid_flush_wr(struct cxgbe_snd_tag *cst) +{ + struct fw_flowc_wr *flowc; + struct wrq_cookie cookie; + + mtx_assert(&cst->lock, MA_OWNED); + + flowc = start_wrq_wr(cst->eo_txq, ETID_FLUSH_LEN16, &cookie); + if (__predict_false(flowc == NULL)) + CXGBE_UNIMPLEMENTED(__func__); + + bzero(flowc, ETID_FLUSH_LEN16 * 16); + flowc->op_to_nparams = htobe32(V_FW_WR_OP(FW_FLOWC_WR) | + V_FW_FLOWC_WR_NPARAMS(0) | F_FW_WR_COMPL); + flowc->flowid_len16 = htobe32(V_FW_WR_LEN16(ETID_FLUSH_LEN16) | + V_FW_WR_FLOWID(cst->etid)); + + commit_wrq_wr(cst->eo_txq, flowc, &cookie); + + cst->flags |= EO_FLUSH_RPL_PENDING; + MPASS(cst->tx_credits >= ETID_FLUSH_LEN16); + cst->tx_credits -= ETID_FLUSH_LEN16; + cst->ncompl++; +} + +static void +write_ethofld_wr(struct cxgbe_snd_tag *cst, struct fw_eth_tx_eo_wr *wr, + struct mbuf *m0, int compl) +{ + struct cpl_tx_pkt_core *cpl; + uint64_t ctrl1; + uint32_t ctrl; /* used in many unrelated places */ + int len16, pktlen, nsegs, immhdrs; + caddr_t dst; + uintptr_t p; + struct ulptx_sgl *usgl; + struct sglist sg; + struct sglist_seg segs[38]; /* XXX: find real limit. XXX: get off the stack */ + + mtx_assert(&cst->lock, MA_OWNED); + M_ASSERTPKTHDR(m0); + KASSERT(m0->m_pkthdr.l2hlen > 0 && m0->m_pkthdr.l3hlen > 0 && + m0->m_pkthdr.l4hlen > 0, + ("%s: ethofld mbuf %p is missing header lengths", __func__, m0)); + + if (needs_udp_csum(m0)) { + CXGBE_UNIMPLEMENTED("UDP ethofld"); + } + + len16 = mbuf_eo_len16(m0); + nsegs = mbuf_eo_nsegs(m0); + pktlen = m0->m_pkthdr.len; + ctrl = sizeof(struct cpl_tx_pkt_core); + if (needs_tso(m0)) + ctrl += sizeof(struct cpl_tx_pkt_lso_core); + immhdrs = m0->m_pkthdr.l2hlen + m0->m_pkthdr.l3hlen + m0->m_pkthdr.l4hlen; + ctrl += immhdrs; + + wr->op_immdlen = htobe32(V_FW_WR_OP(FW_ETH_TX_EO_WR) | + V_FW_ETH_TX_EO_WR_IMMDLEN(ctrl) | V_FW_WR_COMPL(!!compl)); + wr->equiq_to_len16 = htobe32(V_FW_WR_LEN16(len16) | + V_FW_WR_FLOWID(cst->etid)); + wr->r3 = 0; + wr->u.tcpseg.type = FW_ETH_TX_EO_TYPE_TCPSEG; + wr->u.tcpseg.ethlen = m0->m_pkthdr.l2hlen; + wr->u.tcpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); + wr->u.tcpseg.tcplen = m0->m_pkthdr.l4hlen; + wr->u.tcpseg.tsclk_tsoff = mbuf_eo_tsclk_tsoff(m0); + wr->u.tcpseg.r4 = 0; + wr->u.tcpseg.r5 = 0; + wr->u.tcpseg.plen = htobe32(pktlen - immhdrs); + + if (needs_tso(m0)) { + struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); + + wr->u.tcpseg.mss = htobe16(m0->m_pkthdr.tso_segsz); + + ctrl = V_LSO_OPCODE(CPL_TX_PKT_LSO) | F_LSO_FIRST_SLICE | + F_LSO_LAST_SLICE | V_LSO_IPHDR_LEN(m0->m_pkthdr.l3hlen >> 2) + | V_LSO_TCPHDR_LEN(m0->m_pkthdr.l4hlen >> 2); + if (m0->m_pkthdr.l2hlen == sizeof(struct ether_vlan_header)) + ctrl |= V_LSO_ETHHDR_LEN(1); + if (m0->m_pkthdr.l3hlen == sizeof(struct ip6_hdr)) + ctrl |= F_LSO_IPV6; + lso->lso_ctrl = htobe32(ctrl); + lso->ipid_ofst = htobe16(0); + lso->mss = htobe16(m0->m_pkthdr.tso_segsz); + lso->seqno_offset = htobe32(0); + lso->len = htobe32(pktlen); + + cpl = (void *)(lso + 1); + } else { + wr->u.tcpseg.mss = htobe16(0xffff); + cpl = (void *)(wr + 1); + } + + /* Checksum offload must be requested for ethofld. */ + ctrl1 = 0; + MPASS(needs_l4_csum(m0)); + + /* VLAN tag insertion */ + if (needs_vlan_insertion(m0)) { + ctrl1 |= F_TXPKT_VLAN_VLD | + V_TXPKT_VLAN(m0->m_pkthdr.ether_vtag); + } + + /* CPL header */ + cpl->ctrl0 = cst->ctrl0; + cpl->pack = 0; + cpl->len = htobe16(pktlen); + cpl->ctrl1 = htobe64(ctrl1); + + /* Copy Ethernet, IP & TCP hdrs as immediate data */ + p = (uintptr_t)(cpl + 1); + m_copydata(m0, 0, immhdrs, (void *)p); + + /* SGL */ + dst = (void *)(cpl + 1); + if (nsegs > 0) { + int i, pad; + + /* zero-pad upto next 16Byte boundary, if not 16Byte aligned */ + p += immhdrs; + pad = 16 - (immhdrs & 0xf); + bzero((void *)p, pad); + + usgl = (void *)(p + pad); + usgl->cmd_nsge = htobe32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | + V_ULPTX_NSGE(nsegs)); + + sglist_init(&sg, nitems(segs), segs); + for (; m0 != NULL; m0 = m0->m_next) { + if (__predict_false(m0->m_len == 0)) + continue; + if (immhdrs >= m0->m_len) { + immhdrs -= m0->m_len; + continue; + } + + sglist_append(&sg, mtod(m0, char *) + immhdrs, + m0->m_len - immhdrs); + immhdrs = 0; + } + MPASS(sg.sg_nseg == nsegs); + + /* + * Zero pad last 8B in case the WR doesn't end on a 16B + * boundary. + */ + *(uint64_t *)((char *)wr + len16 * 16 - 8) = 0; + + usgl->len0 = htobe32(segs[0].ss_len); + usgl->addr0 = htobe64(segs[0].ss_paddr); + for (i = 0; i < nsegs - 1; i++) { + usgl->sge[i / 2].len[i & 1] = htobe32(segs[i + 1].ss_len); + usgl->sge[i / 2].addr[i & 1] = htobe64(segs[i + 1].ss_paddr); + } + if (i & 1) + usgl->sge[i / 2].len[1] = htobe32(0); + } + +} + +static void +ethofld_tx(struct cxgbe_snd_tag *cst) +{ + struct mbuf *m; + struct wrq_cookie cookie; + int next_credits, compl; + struct fw_eth_tx_eo_wr *wr; + + mtx_assert(&cst->lock, MA_OWNED); + + while ((m = mbufq_first(&cst->pending_tx)) != NULL) { + M_ASSERTPKTHDR(m); + + /* How many len16 credits do we need to send this mbuf. */ + next_credits = mbuf_eo_len16(m); + MPASS(next_credits > 0); + if (next_credits > cst->tx_credits) { + /* + * Tx will make progress eventually because there is at + * least one outstanding fw4_ack that will return + * credits and kick the tx. + */ + MPASS(cst->ncompl > 0); + return; + } + wr = start_wrq_wr(cst->eo_txq, next_credits, &cookie); + if (__predict_false(wr == NULL)) { + /* XXX: wishful thinking, not a real assertion. */ + MPASS(cst->ncompl > 0); + return; + } + cst->tx_credits -= next_credits; + cst->tx_nocompl += next_credits; + compl = cst->ncompl == 0 || cst->tx_nocompl >= cst->tx_total / 2; + ETHER_BPF_MTAP(cst->com.ifp, m); + write_ethofld_wr(cst, wr, m, compl); + commit_wrq_wr(cst->eo_txq, wr, &cookie); + if (compl) { + cst->ncompl++; + cst->tx_nocompl = 0; + } + (void) mbufq_dequeue(&cst->pending_tx); + mbufq_enqueue(&cst->pending_fwack, m); + } +} + +int +ethofld_transmit(struct ifnet *ifp, struct mbuf *m0) +{ + struct cxgbe_snd_tag *cst; + int rc; + + MPASS(m0->m_nextpkt == NULL); + MPASS(m0->m_pkthdr.snd_tag != NULL); + cst = mst_to_cst(m0->m_pkthdr.snd_tag); + + mtx_lock(&cst->lock); + MPASS(cst->flags & EO_SND_TAG_REF); + + if (__predict_false(cst->flags & EO_FLOWC_PENDING)) { + struct vi_info *vi = ifp->if_softc; + struct port_info *pi = vi->pi; + struct adapter *sc = pi->adapter; + const uint32_t rss_mask = vi->rss_size - 1; + uint32_t rss_hash; + + cst->eo_txq = &sc->sge.ofld_txq[vi->first_ofld_txq]; + if (M_HASHTYPE_ISHASH(m0)) + rss_hash = m0->m_pkthdr.flowid; + else + rss_hash = arc4random(); + /* We assume RSS hashing */ + cst->iqid = vi->rss[rss_hash & rss_mask]; + cst->eo_txq += rss_hash % vi->nofldtxq; + rc = send_etid_flowc_wr(cst, pi, vi); + if (rc != 0) + goto done; + } + + if (__predict_false(cst->plen + m0->m_pkthdr.len > eo_max_backlog)) { + rc = ENOBUFS; + goto done; + } + + mbufq_enqueue(&cst->pending_tx, m0); + cst->plen += m0->m_pkthdr.len; + + ethofld_tx(cst); + rc = 0; +done: + mtx_unlock(&cst->lock); + if (__predict_false(rc != 0)) + m_freem(m0); + return (rc); +} + +static int +ethofld_fw4_ack(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m0) +{ + struct adapter *sc = iq->adapter; + const struct cpl_fw4_ack *cpl = (const void *)(rss + 1); + struct mbuf *m; + u_int etid = G_CPL_FW4_ACK_FLOWID(be32toh(OPCODE_TID(cpl))); + struct cxgbe_snd_tag *cst; + uint8_t credits = cpl->credits; + + cst = lookup_etid(sc, etid); + mtx_lock(&cst->lock); + if (__predict_false(cst->flags & EO_FLOWC_RPL_PENDING)) { + MPASS(credits >= ETID_FLOWC_LEN16); + credits -= ETID_FLOWC_LEN16; + cst->flags &= ~EO_FLOWC_RPL_PENDING; + } + + KASSERT(cst->ncompl > 0, + ("%s: etid %u (%p) wasn't expecting completion.", + __func__, etid, cst)); + cst->ncompl--; + + while (credits > 0) { + m = mbufq_dequeue(&cst->pending_fwack); + if (__predict_false(m == NULL)) { + /* + * The remaining credits are for the final flush that + * was issued when the tag was freed by the kernel. + */ + MPASS((cst->flags & + (EO_FLUSH_RPL_PENDING | EO_SND_TAG_REF)) == + EO_FLUSH_RPL_PENDING); + MPASS(credits == ETID_FLUSH_LEN16); + MPASS(cst->tx_credits + cpl->credits == cst->tx_total); + MPASS(cst->ncompl == 0); + + cst->flags &= ~EO_FLUSH_RPL_PENDING; + cst->tx_credits += cpl->credits; +freetag: + cxgbe_snd_tag_free_locked(cst); + return (0); /* cst is gone. */ + } + KASSERT(m != NULL, + ("%s: too many credits (%u, %u)", __func__, cpl->credits, + credits)); + KASSERT(credits >= mbuf_eo_len16(m), + ("%s: too few credits (%u, %u, %u)", __func__, + cpl->credits, credits, mbuf_eo_len16(m))); + credits -= mbuf_eo_len16(m); + cst->plen -= m->m_pkthdr.len; + m_freem(m); + } + + cst->tx_credits += cpl->credits; + MPASS(cst->tx_credits <= cst->tx_total); + + m = mbufq_first(&cst->pending_tx); + if (m != NULL && cst->tx_credits >= mbuf_eo_len16(m)) + ethofld_tx(cst); + + if (__predict_false((cst->flags & EO_SND_TAG_REF) == 0) && + cst->ncompl == 0) { + if (cst->tx_credits == cst->tx_total) + goto freetag; + else { + MPASS((cst->flags & EO_FLUSH_RPL_PENDING) == 0); + send_etid_flush_wr(cst); + } + } + + mtx_unlock(&cst->lock); + + return (0); +} +#endif From owner-svn-src-head@freebsd.org Thu May 24 10:18:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47FF4EAAEF1; Thu, 24 May 2018 10:18:32 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA98F81FE8; Thu, 24 May 2018 10:18:31 +0000 (UTC) (envelope-from royger@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD34C10E75; Thu, 24 May 2018 10:18:31 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OAIVpT076812; Thu, 24 May 2018 10:18:31 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OAIVMs076811; Thu, 24 May 2018 10:18:31 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201805241018.w4OAIVMs076811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 24 May 2018 10:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334144 - head/sys/dev/xen/xenstore X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/xenstore X-SVN-Commit-Revision: 334144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:18:32 -0000 Author: royger Date: Thu May 24 10:18:31 2018 New Revision: 334144 URL: https://svnweb.freebsd.org/changeset/base/334144 Log: dev/xenstore: prevent transaction hijacking The user-space xenstore device is currently lacking a check to make sure that the caller is only using transaction ids currently assigned to it. This allows users of the xenstore device to hijack transactions not started by them, although the scope is limited to transactions started by the same domain. Tested by: Nathan Friess Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/xenstore/xenstore_dev.c Modified: head/sys/dev/xen/xenstore/xenstore_dev.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore_dev.c Thu May 24 10:18:14 2018 (r334143) +++ head/sys/dev/xen/xenstore/xenstore_dev.c Thu May 24 10:18:31 2018 (r334144) @@ -214,6 +214,18 @@ xs_dev_watch_cb(struct xs_watch *watch, const char **v free(payload, M_XENSTORE); } +static struct xs_dev_transaction * +xs_dev_find_transaction(struct xs_dev_data *u, uint32_t tx_id) +{ + struct xs_dev_transaction *trans; + + LIST_FOREACH(trans, &u->transactions, list) + if (trans->handle.id == tx_id) + return (trans); + + return (NULL); +} + static int xs_dev_read(struct cdev *dev, struct uio *uio, int ioflag) { @@ -281,6 +293,12 @@ xs_dev_write(struct cdev *dev, struct uio *uio, int io case XS_MKDIR: case XS_RM: case XS_SET_PERMS: + /* Check that this transaction id is not hijacked. */ + if (u->u.msg.tx_id != 0 && + xs_dev_find_transaction(u, u->u.msg.tx_id) == NULL) { + error = EINVAL; + break; + } error = xs_dev_request_and_reply(&u->u.msg, &reply); if (!error) { if (u->u.msg.type == XS_TRANSACTION_START) { @@ -289,12 +307,10 @@ xs_dev_write(struct cdev *dev, struct uio *uio, int io trans->handle.id = strtoul(reply, NULL, 0); LIST_INSERT_HEAD(&u->transactions, trans, list); } else if (u->u.msg.type == XS_TRANSACTION_END) { - LIST_FOREACH(trans, &u->transactions, list) - if (trans->handle.id == u->u.msg.tx_id) - break; -#if 0 /* XXX does this mean the list is empty? */ - BUG_ON(&trans->list == &u->transactions); -#endif + trans = xs_dev_find_transaction(u, + u->u.msg.tx_id); + KASSERT(trans != NULL, + ("Unable to find transaction")); LIST_REMOVE(trans, list); free(trans, M_XENSTORE); } From owner-svn-src-head@freebsd.org Thu May 24 10:19:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 694FDEAB04A; Thu, 24 May 2018 10:19:55 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BE3882239; Thu, 24 May 2018 10:19:55 +0000 (UTC) (envelope-from royger@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F105610E76; Thu, 24 May 2018 10:19:54 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OAJsMj076897; Thu, 24 May 2018 10:19:54 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OAJsIf076896; Thu, 24 May 2018 10:19:54 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201805241019.w4OAJsIf076896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 24 May 2018 10:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334145 - head/sys/dev/xen/blkback X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/blkback X-SVN-Commit-Revision: 334145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:19:55 -0000 Author: royger Date: Thu May 24 10:19:54 2018 New Revision: 334145 URL: https://svnweb.freebsd.org/changeset/base/334145 Log: xen-blkback: don't unbind the interrupt while holding the lock There's no need to perform the interrupt unbind while holding the blkback lock, and doing so leads to the following LOR: lock order reversal: (sleepable after non-sleepable) 1st 0xfffff8000802fe90 xbbd1 (xbbd1) @ /usr/src/sys/dev/xen/blkback/blkback.c:3423 2nd 0xffffffff81fdf890 intrsrc (intrsrc) @ /usr/src/sys/x86/x86/intr_machdep.c:224 stack backtrace: #0 0xffffffff80bdd993 at witness_debugger+0x73 #1 0xffffffff80bdd814 at witness_checkorder+0xe34 #2 0xffffffff80b7d798 at _sx_xlock+0x68 #3 0xffffffff811b3913 at intr_remove_handler+0x43 #4 0xffffffff811c63ef at xen_intr_unbind+0x10f #5 0xffffffff80a12ecf at xbb_disconnect+0x2f #6 0xffffffff80a12e54 at xbb_shutdown+0x1e4 #7 0xffffffff80a10be4 at xbb_frontend_changed+0x54 #8 0xffffffff80ed66a4 at xenbusb_back_otherend_changed+0x14 #9 0xffffffff80a2a382 at xenwatch_thread+0x182 #10 0xffffffff80b34164 at fork_exit+0x84 #11 0xffffffff8101ec9e at fork_trampoline+0xe Reported by: Nathan Friess Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/blkback/blkback.c Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Thu May 24 10:18:31 2018 (r334144) +++ head/sys/dev/xen/blkback/blkback.c Thu May 24 10:19:54 2018 (r334145) @@ -2803,9 +2803,8 @@ xbb_disconnect(struct xbb_softc *xbb) if ((xbb->flags & XBBF_RING_CONNECTED) == 0) return (0); - xen_intr_unbind(&xbb->xen_intr_handle); - mtx_unlock(&xbb->lock); + xen_intr_unbind(&xbb->xen_intr_handle); taskqueue_drain(xbb->io_taskqueue, &xbb->io_task); mtx_lock(&xbb->lock); From owner-svn-src-head@freebsd.org Thu May 24 10:20:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1AA0EAB125; Thu, 24 May 2018 10:20:43 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 874AF823D5; Thu, 24 May 2018 10:20:43 +0000 (UTC) (envelope-from royger@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6870410E87; Thu, 24 May 2018 10:20:43 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OAKhHH076998; Thu, 24 May 2018 10:20:43 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OAKhF6076997; Thu, 24 May 2018 10:20:43 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201805241020.w4OAKhF6076997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 24 May 2018 10:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334146 - head/sys/dev/xen/evtchn X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/evtchn X-SVN-Commit-Revision: 334146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:20:44 -0000 Author: royger Date: Thu May 24 10:20:42 2018 New Revision: 334146 URL: https://svnweb.freebsd.org/changeset/base/334146 Log: xen/evtchn: fix LOR in evtchn device Remove the device from the list before unbinding it. Doing it in this order allows calling xen_intr_unbind without holding the bind_mutex lock. Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/evtchn/evtchn_dev.c Modified: head/sys/dev/xen/evtchn/evtchn_dev.c ============================================================================== --- head/sys/dev/xen/evtchn/evtchn_dev.c Thu May 24 10:19:54 2018 (r334145) +++ head/sys/dev/xen/evtchn/evtchn_dev.c Thu May 24 10:20:42 2018 (r334146) @@ -474,10 +474,10 @@ evtchn_ioctl(struct cdev *dev, unsigned long cmd, cadd error = ENOTCONN; break; } - - xen_intr_unbind(&evtchn->handle); RB_REMOVE(evtchn_tree, &u->evtchns, evtchn); mtx_unlock(&u->bind_mutex); + + xen_intr_unbind(&evtchn->handle); free(evtchn, M_EVTCHN); error = 0; break; From owner-svn-src-head@freebsd.org Thu May 24 10:22:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60EF9EAB38C; Thu, 24 May 2018 10:22:58 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1038F827B5; Thu, 24 May 2018 10:22:58 +0000 (UTC) (envelope-from royger@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E42DF11005; Thu, 24 May 2018 10:22:57 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OAMvWx081959; Thu, 24 May 2018 10:22:57 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OAMv5r081958; Thu, 24 May 2018 10:22:57 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201805241022.w4OAMv5r081958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 24 May 2018 10:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334147 - head/sys/x86/xen X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/x86/xen X-SVN-Commit-Revision: 334147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:22:58 -0000 Author: royger Date: Thu May 24 10:22:57 2018 New Revision: 334147 URL: https://svnweb.freebsd.org/changeset/base/334147 Log: xen/pvh: allocate dbg_stack Or else init_secondary will hit a page fault (or write garbage somewhere). Sponsored by: Citrix Systems R&D Modified: head/sys/x86/xen/pv.c Modified: head/sys/x86/xen/pv.c ============================================================================== --- head/sys/x86/xen/pv.c Thu May 24 10:20:42 2018 (r334146) +++ head/sys/x86/xen/pv.c Thu May 24 10:22:57 2018 (r334147) @@ -101,6 +101,7 @@ static int xen_pv_start_all_aps(void); extern char *doublefault_stack; extern char *mce_stack; extern char *nmi_stack; +extern char *dbg_stack; #endif /* @@ -224,6 +225,8 @@ start_xen_ap(int cpu) (char *)kmem_malloc(kernel_arena, PAGE_SIZE, M_WAITOK | M_ZERO); nmi_stack = (char *)kmem_malloc(kernel_arena, PAGE_SIZE, M_WAITOK | M_ZERO); + dbg_stack = + (void *)kmem_malloc(kernel_arena, PAGE_SIZE, M_WAITOK | M_ZERO); dpcpu = (void *)kmem_malloc(kernel_arena, DPCPU_SIZE, M_WAITOK | M_ZERO); From owner-svn-src-head@freebsd.org Thu May 24 10:55:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92A17EB125D; Thu, 24 May 2018 10:55:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47B4583A78; Thu, 24 May 2018 10:55:27 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0ADE1114F0; Thu, 24 May 2018 10:55:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OAtQ1a096927; Thu, 24 May 2018 10:55:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OAtQQ9096926; Thu, 24 May 2018 10:55:26 GMT (envelope-from np@FreeBSD.org) Message-Id: <201805241055.w4OAtQQ9096926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 24 May 2018 10:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334148 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 334148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 10:55:27 -0000 Author: np Date: Thu May 24 10:55:26 2018 New Revision: 334148 URL: https://svnweb.freebsd.org/changeset/base/334148 Log: cxgbe(4): Report IFCAP_TXRTLMT to kernels built with RATELIMIT if the firmware has provisioned resources for this feature. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu May 24 10:22:57 2018 (r334147) +++ head/sys/dev/cxgbe/t4_main.c Thu May 24 10:55:26 2018 (r334148) @@ -1508,6 +1508,10 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) if (vi->nnmrxq != 0) ifp->if_capabilities |= IFCAP_NETMAP; #endif +#ifdef RATELIMIT + if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) + ifp->if_capabilities |= IFCAP_TXRTLMT; +#endif ifp->if_capenable = T4_CAP_ENABLE; ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6; @@ -1526,10 +1530,22 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) #endif sb = sbuf_new_auto(); sbuf_printf(sb, "%d txq, %d rxq (NIC)", vi->ntxq, vi->nrxq); +#if defined(TCP_OFFLOAD) || defined(RATELIMIT) + switch (ifp->if_capabilities & (IFCAP_TOE | IFCAP_TXRTLMT)) { + case IFCAP_TOE: + sbuf_printf(sb, "; %d txq (TOE)", vi->nofldtxq); + break; + case IFCAP_TOE | IFCAP_TXRTLMT: + sbuf_printf(sb, "; %d txq (TOE/ETHOFLD)", vi->nofldtxq); + break; + case IFCAP_TXRTLMT: + sbuf_printf(sb, "; %d txq (ETHOFLD)", vi->nofldtxq); + break; + } +#endif #ifdef TCP_OFFLOAD if (ifp->if_capabilities & IFCAP_TOE) - sbuf_printf(sb, "; %d txq, %d rxq (TOE)", - vi->nofldtxq, vi->nofldrxq); + sbuf_printf(sb, ", %d rxq (TOE)", vi->nofldrxq); #endif #ifdef DEV_NETMAP if (ifp->if_capabilities & IFCAP_NETMAP) @@ -1821,6 +1837,10 @@ redo_sifflags: ifp->if_capenable ^= IFCAP_VLAN_HWTSO; if (mask & IFCAP_VLAN_HWCSUM) ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; +#ifdef RATELIMIT + if (mask & IFCAP_TXRTLMT) + ifp->if_capenable ^= IFCAP_TXRTLMT; +#endif #ifdef VLAN_CAPABILITIES VLAN_CAPABILITIES(ifp); From owner-svn-src-head@freebsd.org Thu May 24 12:30:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AFC1EEEBC6; Thu, 24 May 2018 12:30:20 +0000 (UTC) (envelope-from emeric.poupon@stormshield.eu) Received: from work.stormshield.eu (gwlille.netasq.com [91.212.116.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 9EFBE689A3; Thu, 24 May 2018 12:30:19 +0000 (UTC) (envelope-from emeric.poupon@stormshield.eu) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTPS id C02F83761B8E; Thu, 24 May 2018 14:30:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id B1ED337614C3; Thu, 24 May 2018 14:30:02 +0200 (CEST) Received: from work.stormshield.eu ([127.0.0.1]) by localhost (work.stormshield.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9_9fH0Xo3BQ5; Thu, 24 May 2018 14:30:02 +0200 (CEST) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id 9AF223761361; Thu, 24 May 2018 14:30:02 +0200 (CEST) Date: Thu, 24 May 2018 14:30:02 +0200 (CEST) From: Emeric POUPON To: cem@freebsd.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Message-ID: <1236617318.14311730.1527165002236.JavaMail.zimbra@stormshield.eu> In-Reply-To: References: <201805221554.w4MFsPQA083334@repo.freebsd.org> <822609135.13913713.1527060223167.JavaMail.zimbra@stormshield.eu> Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Thread-Topic: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat Thread-Index: 0+ugSuZzyXPYU+3s2gc5o3fgWJAuPw== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 12:30:20 -0000 ----- Original Message ----- > From: "Conrad Meyer" > To: "Emeric POUPON" > Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "src-committers" > Sent: Wednesday, 23 May, 2018 18:47:57 > Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat > On Wed, May 23, 2018 at 12:23 AM, Emeric POUPON > wrote: >>> From: "Conrad Meyer" >> >>> Can users control arbitrary key_allocsp() calls? If so, it seems >>> concerning to expose hit/miss stats on cached security keys. >> >> I am not sure to understand, could you please tell more about what you mean? > > If users can insert arbitrary keys into the cache, they can check the > hit/miss statistics to tell if that key was already present -- > revealing key contents. This would be a major problem. > > https://security.stackexchange.com/questions/10617/what-is-a-cryptographic-oracle Actually we just store traffic profiles and the associated security policy (SP). A SP is basically just a bunch of traffic selectors, there is no key or other sensitive information involved. > > Best, > Conrad From owner-svn-src-head@freebsd.org Thu May 24 13:26:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 031CBEF1319; Thu, 24 May 2018 13:26:16 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09B956B907; Thu, 24 May 2018 13:26:14 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4ODQ9Kh040439; Thu, 24 May 2018 06:26:09 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4ODQ9Wh040438; Thu, 24 May 2018 06:26:09 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805241326.w4ODQ9Wh040438@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334077 - in head/sbin/devd: . tests In-Reply-To: To: Eitan Adler Date: Thu, 24 May 2018 06:26:09 -0700 (PDT) CC: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 13:26:16 -0000 > On 23 May 2018 at 13:09, Warner Losh wrote: > > > > > > On Wed, May 23, 2018 at 1:39 AM, Eitan Adler wrote: > >> > >> Author: eadler > >> Date: Wed May 23 07:39:02 2018 > >> New Revision: 334077 > >> URL: https://svnweb.freebsd.org/changeset/base/334077 > >> > >> Log: > >> devd: correct two warnings > >> > >> - catching a polymorphic type by value > >> - "output between 16 and 95 bytes into a destination of size 80" > >> > >> Modified: > >> head/sbin/devd/devd.cc > >> head/sbin/devd/tests/client_test.c > >> > >> Modified: head/sbin/devd/devd.cc > >> > >> ============================================================================== > >> --- head/sbin/devd/devd.cc Wed May 23 07:39:00 2018 (r334076) > >> +++ head/sbin/devd/devd.cc Wed May 23 07:39:02 2018 (r334077) > >> @@ -1087,7 +1087,7 @@ event_loop(void) > >> try { > >> process_event(buffer); > >> } > >> - catch (std::length_error e) { > >> + catch (const std::length_error& e) { > >> devdlog(LOG_ERR, "Dropping event > >> %s " > >> "due to low memory", buffer); > >> } > >> > >> Modified: head/sbin/devd/tests/client_test.c > >> > >> ============================================================================== > >> --- head/sbin/devd/tests/client_test.c Wed May 23 07:39:00 2018 > >> (r334076) > >> +++ head/sbin/devd/tests/client_test.c Wed May 23 07:39:02 2018 > >> (r334077) > >> @@ -50,7 +50,7 @@ create_two_events(void) > >> FILE *create_stdout; > >> FILE *destroy_stdout; > >> char mdname[80]; > >> - char destroy_cmd[80]; > >> + char destroy_cmd[95]; > >> char *error; > > > > > > I know it's just a test, but 95 seems equally as magical as 80... > > Agreed. I stole this number from the warning without too much thought. > Tested that it still passed, and didn't do anything funky. It is extremly dangerous to be driven by compiler warnings, it has driven some developers write off the major bug cliff causing serious security issues. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu May 24 13:31:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BBC4EF1428; Thu, 24 May 2018 13:31:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC7076BB00; Thu, 24 May 2018 13:31:01 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4ODV03u040455; Thu, 24 May 2018 06:31:00 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4ODUx2s040454; Thu, 24 May 2018 06:30:59 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805241330.w4ODUx2s040454@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334128 - in head: . lib/libpmcstat lib/libpmcstat/pmu-events lib/libpmcstat/pmu-events/arch lib/libpmcstat/pmu-events/arch/arm64 lib/libpmcstat/pmu-events/arch/arm64/arm lib/libpmcstat... In-Reply-To: <201805240430.w4O4U6Js001134@repo.freebsd.org> To: Matt Macy Date: Thu, 24 May 2018 06:30:59 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 13:31:03 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: mmacy > Date: Thu May 24 04:30:06 2018 > New Revision: 334128 > URL: https://svnweb.freebsd.org/changeset/base/334128 > > Log: > libpmcstat: compile in events based on json description Most of this has no copyright or license attached to the files. > Added: > head/lib/libpmcstat/libpmcstat_pmu_util.c (contents, props changed) > head/lib/libpmcstat/pmu-events/ > head/lib/libpmcstat/pmu-events/Makefile (contents, props changed) > head/lib/libpmcstat/pmu-events/README (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/ > head/lib/libpmcstat/pmu-events/arch/arm64/ > head/lib/libpmcstat/pmu-events/arch/arm64/arm/ > head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/ > head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/arm64/cavium/ > head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/ > head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/ > head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/ > head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/ > head/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/ > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/ > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/ > head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/ > head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/ > head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/ > head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/ > head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/ > head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ > head/lib/libpmcstat/pmu-events/arch/x86/bonnell/ > head/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/ > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/ > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/ > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmont/ > head/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/ > head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswell/ > head/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/ > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/ > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/ > head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/ > head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/ > head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/ > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/silvermont/ > head/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylake/ > head/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/ > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/ > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/ > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereex/ > head/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json (contents, props changed) > head/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json (contents, props changed) > head/lib/libpmcstat/pmu-events/jevents.c (contents, props changed) > head/lib/libpmcstat/pmu-events/jevents.h (contents, props changed) > head/lib/libpmcstat/pmu-events/jsmn.c (contents, props changed) > head/lib/libpmcstat/pmu-events/jsmn.h (contents, props changed) > head/lib/libpmcstat/pmu-events/json.c (contents, props changed) > head/lib/libpmcstat/pmu-events/json.h (contents, props changed) > head/lib/libpmcstat/pmu-events/list.h (contents, props changed) > head/lib/libpmcstat/pmu-events/pmu-events.h (contents, props changed) > Modified: > head/Makefile > head/Makefile.inc1 > head/lib/libpmcstat/Makefile > head/lib/libpmcstat/libpmcstat.h > head/sys/amd64/conf/GENERIC-NODEBUG > head/usr.sbin/pmcstat/pmcstat.c > head/usr.sbin/pmcstat/pmcstat.h > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Thu May 24 03:44:12 2018 (r334127) > +++ head/Makefile Thu May 24 04:30:06 2018 (r334128) > @@ -481,7 +481,8 @@ worlds: .PHONY > # existing system is. > # > .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) > -TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 > +TARGETS?=amd64 i386 powerpc arm64 > +#riscv arm sparc64 mips > _UNIVERSE_TARGETS= ${TARGETS} > TARGET_ARCHES_arm?= arm armeb armv6 armv7 > TARGET_ARCHES_arm64?= aarch64 > > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Thu May 24 03:44:12 2018 (r334127) > +++ head/Makefile.inc1 Thu May 24 04:30:06 2018 (r334128) > @@ -2029,6 +2029,11 @@ _tcsh=bin/csh > _libmagic=lib/libmagic > .endif > > +.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ > + ${MACHINE_CPUARCH} == "powerpc") > +_jevents=lib/libpmcstat/pmu-events > +.endif > + > # kernel-toolchain skips _cleanobj, so handle cleaning up previous > # build-tools directories if needed. > .if !defined(NO_CLEAN) && make(kernel-toolchain) > @@ -2039,6 +2044,7 @@ _bt_clean= ${CLEANDIR} > ${_tcsh} \ > bin/sh \ > ${LOCAL_TOOL_DIRS} \ > + ${_jevents} \ > lib/ncurses/ncurses \ > lib/ncurses/ncursesw \ > ${_rescue} \ > > Modified: head/lib/libpmcstat/Makefile > ============================================================================== > --- head/lib/libpmcstat/Makefile Thu May 24 03:44:12 2018 (r334127) > +++ head/lib/libpmcstat/Makefile Thu May 24 04:30:06 2018 (r334128) > @@ -1,5 +1,4 @@ > # $FreeBSD$ > - > PACKAGE=lib${LIB} > LIB= pmcstat > INTERNALLIB= > @@ -10,7 +9,31 @@ SRCS= \ > libpmcstat_logging.c \ > libpmcstat_process.c \ > libpmcstat_string.c \ > - libpmcstat_symbol.c > + libpmcstat_symbol.c \ > + libpmcstat_pmu_util.c > INCS= libpmcstat.h > + > +CFLAGS+= -I${.CURDIR} > + > +.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ > + ${MACHINE_CPUARCH} == "powerpc") > +.if ${MACHINE_CPUARCH} == "aarch64" > +EVENT_ARCH="arm64" > +.elif ${MACHINE_CPUARCH} == "amd64" > +EVENT_ARCH="x86" > +.elif ${MACHINE_CPUARCH} == "powerpc" > +EVENT_ARCH="powerpc" > +.endif > + > +.if defined(HOST_OBJTOP) > +JEVENTS= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents > +.else > +JEVENTS= pmu-events/jevents > +.endif > + > +libpmcstat_events.c: ${JEVENTS} > + ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c > +SRCS+= libpmcstat_events.c > +.endif > > .include > > Modified: head/lib/libpmcstat/libpmcstat.h > ============================================================================== > --- head/lib/libpmcstat/libpmcstat.h Thu May 24 03:44:12 2018 (r334127) > +++ head/lib/libpmcstat/libpmcstat.h Thu May 24 04:30:06 2018 (r334128) > @@ -53,6 +53,7 @@ > > #define PMCSTAT_NHASH 256 > #define PMCSTAT_HASH_MASK 0xFF > +#define DEFAULT_SAMPLE_COUNT 65536 > > typedef const void *pmcstat_interned_string; > struct pmc_plugins; > @@ -380,6 +381,9 @@ int pmcstat_analyze_log(struct pmcstat_args *args, > > int pmcstat_open_log(const char *_p, int _mode); > int pmcstat_close_log(struct pmcstat_args *args); > + > +uint64_t pmcstat_pmu_sample_rate_get(const char *); > + > __END_DECLS > > #endif /* !_LIBPMCSTAT_H_ */ > > Added: head/lib/libpmcstat/libpmcstat_pmu_util.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,128 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2018, Matthew Macy > + * All rights reserved. We have had several discussions on the use of this line, and the templates have all been changed, is there some reason your still putting it on new work? > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + * > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include "pmu-events/pmu-events.h" > + > +#if defined(__amd64__) > +struct pmu_event_desc { > + uint32_t ped_umask; > + uint32_t ped_event; > + uint64_t ped_period; > +}; > + > +static const struct pmu_events_map * > +pmu_events_map_get(void) > +{ > + size_t s; > + char buf[64]; > + const struct pmu_events_map *pme; > + > + if (sysctlbyname("kern.hwpmc.cpuid", (void *)NULL, &s, > + (void *)NULL, 0) == -1) > + return (NULL); > + if (sysctlbyname("kern.hwpmc.cpuid", buf, &s, > + (void *)NULL, 0) == -1) > + return (NULL); > + for (pme = pmu_events_map; pme->cpuid != NULL; pme++) > + if (strcmp(buf, pme->cpuid) == 0) > + return (pme); > + return (NULL); > +} > + > +static const struct pmu_event * > +pmu_event_get(const char *event_name) > +{ > + const struct pmu_events_map *pme; > + const struct pmu_event *pe; > + > + if ((pme = pmu_events_map_get()) == NULL) > + return (NULL); > + for (pe = pme->table; pe->name != NULL; pe++) > + if (strcmp(pe->name, event_name) == 0) > + return (pe); > + return (NULL); > +} > + > +static int > +pmu_parse_event(struct pmu_event_desc *ped, const char *eventin) > +{ > + char *event; > + char *kvp, *key, *value; > + > + if ((event = strdup(eventin)) == NULL) > + return (ENOMEM); > + bzero(ped, sizeof(*ped)); > + while ((kvp = strsep(&event, ",")) != NULL) { > + key = strsep(&kvp, "="); > + if (key == NULL) > + abort(); > + value = kvp; > + if (strcmp(key, "umask") == 0) > + ped->ped_umask = strtol(value, NULL, 16); > + if (strcmp(key, "event") == 0) > + ped->ped_event = strtol(value, NULL, 16); > + if (strcmp(key, "period") == 0) > + ped->ped_umask = strtol(value, NULL, 10); > + } > + free(event); > + return (0); > +} > + > +uint64_t > +pmcstat_pmu_sample_rate_get(const char *event_name) > +{ > + const struct pmu_event *pe; > + struct pmu_event_desc ped; > + > + if ((pe = pmu_event_get(event_name)) == NULL) > + return (DEFAULT_SAMPLE_COUNT); > + if (pe->alias && (pe = pmu_event_get(pe->alias)) == NULL) > + return (DEFAULT_SAMPLE_COUNT); > + if (pe->event == NULL) > + return (DEFAULT_SAMPLE_COUNT); > + if (pmu_parse_event(&ped, pe->event)) > + return (DEFAULT_SAMPLE_COUNT); > + return (ped.ped_period); > +} > + > +#else > +uint64_t pmcstat_pmu_sample_rate_get(void) { return (DEFAULT_SAMPLE_COUNT); } > +#endif > > Added: head/lib/libpmcstat/pmu-events/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/pmu-events/Makefile Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,9 @@ > +# $FreeBSD$ > + > +PROG=jevents > +SRCS=jevents.c jsmn.c json.c > +CFLAGS+= -Wno-cast-qual > +.PATH: ${.CURDIR} > +build-tools: jevents > +MAN= > +.include > > Added: head/lib/libpmcstat/pmu-events/README > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/pmu-events/README Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,152 @@ This file needs a copyright.... and license... > + > +The contents of this directory allow users to specify PMU events in their > +CPUs by their symbolic names rather than raw event codes (see example below). > + > +The main program in this directory, is the 'jevents', which is built and > +executed _BEFORE_ the perf binary itself is built. > + > +The 'jevents' program tries to locate and process JSON files in the directory > +tree tools/perf/pmu-events/arch/foo. > + > + - Regular files with '.json' extension in the name are assumed to be > + JSON files, each of which describes a set of PMU events. > + > + - The CSV file that maps a specific CPU to its set of PMU events is to > + be named 'mapfile.csv' (see below for mapfile format). > + > + - Directories are traversed, but all other files are ignored. > + > + - To reduce JSON event duplication per architecture, platform JSONs may > + use "ArchStdEvent" keyword to dereference an "Architecture standard > + events", defined in architecture standard JSONs. > + Architecture standard JSONs must be located in the architecture root > + folder. Matching is based on the "EventName" field. > + > +The PMU events supported by a CPU model are expected to grouped into topics > +such as Pipelining, Cache, Memory, Floating-point etc. All events for a topic > +should be placed in a separate JSON file - where the file name identifies > +the topic. Eg: "Floating-point.json". > + > +All the topic JSON files for a CPU model/family should be in a separate > +sub directory. Thus for the Silvermont X86 CPU: > + > + $ ls tools/perf/pmu-events/arch/x86/Silvermont_core > + Cache.json Memory.json Virtual-Memory.json > + Frontend.json Pipeline.json > + > +The JSONs folder for a CPU model/family may be placed in the root arch > +folder, or may be placed in a vendor sub-folder under the arch folder > +for instances where the arch and vendor are not the same. > + > +Using the JSON files and the mapfile, 'jevents' generates the C source file, > +'pmu-events.c', which encodes the two sets of tables: > + > + - Set of 'PMU events tables' for all known CPUs in the architecture, > + (one table like the following, per JSON file; table name 'pme_power8' > + is derived from JSON file name, 'power8.json'). > + > + struct pmu_event pme_power8[] = { > + > + ... > + > + { > + .name = "pm_1plus_ppc_cmpl", > + .event = "event=0x100f2", > + .desc = "1 or more ppc insts finished,", > + }, > + > + ... > + } > + > + - A 'mapping table' that maps each CPU of the architecture, to its > + 'PMU events table' > + > + struct pmu_events_map pmu_events_map[] = { > + { > + .cpuid = "004b0000", > + .version = "1", > + .type = "core", > + .table = pme_power8 > + }, > + ... > + > + }; > + > +After the 'pmu-events.c' is generated, it is compiled and the resulting > +'pmu-events.o' is added to 'libperf.a' which is then used to build perf. > + > +NOTES: > + 1. Several CPUs can support same set of events and hence use a common > + JSON file. Hence several entries in the pmu_events_map[] could map > + to a single 'PMU events table'. > + > + 2. The 'pmu-events.h' has an extern declaration for the mapping table > + and the generated 'pmu-events.c' defines this table. > + > + 3. _All_ known CPU tables for architecture are included in the perf > + binary. > + > +At run time, perf determines the actual CPU it is running on, finds the > +matching events table and builds aliases for those events. This allows > +users to specify events by their name: > + > + $ perf stat -e pm_1plus_ppc_cmpl sleep 1 > + > +where 'pm_1plus_ppc_cmpl' is a Power8 PMU event. > + > +However some errors in processing may cause the perf build to fail. > + > +Mapfile format > +=============== > + > +The mapfile enables multiple CPU models to share a single set of PMU events. > +It is required even if such mapping is 1:1. > + > +The mapfile.csv format is expected to be: > + > + Header line > + CPUID,Version,Dir/path/name,Type > + > +where: > + > + Comma: > + is the required field delimiter (i.e other fields cannot > + have commas within them). > + > + Comments: > + Lines in which the first character is either '\n' or '#' > + are ignored. > + > + Header line > + The header line is the first line in the file, which is > + always _IGNORED_. It can empty. > + > + CPUID: > + CPUID is an arch-specific char string, that can be used > + to identify CPU (and associate it with a set of PMU events > + it supports). Multiple CPUIDS can point to the same > + File/path/name.json. > + > + Example: > + CPUID == 'GenuineIntel-6-2E' (on x86). > + CPUID == '004b0100' (PVR value in Powerpc) > + Version: > + is the Version of the mapfile. > + > + Dir/path/name: > + is the pathname to the directory containing the CPU's JSON > + files, relative to the directory containing the mapfile.csv > + > + Type: > + indicates whether the events or "core" or "uncore" events. > + > + > + Eg: > + > + $ grep Silvermont tools/perf/pmu-events/arch/x86/mapfile.csv > + GenuineIntel-6-37,V13,Silvermont_core,core > + GenuineIntel-6-4D,V13,Silvermont_core,core > + GenuineIntel-6-4C,V13,Silvermont_core,core > + > + i.e the three CPU models use the JSON files (i.e PMU events) listed > + in the directory 'tools/perf/pmu-events/arch/x86/Silvermont_core'. > > Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,25 @@ I believe this files should have a copyright and license as well, though they may fall under the reciepe rules like Makefiles? > +[ > + { > + "ArchStdEvent": "BR_INDIRECT_SPEC", > + }, > + { > + "EventCode": "0xC9", > + "EventName": "BR_COND", > + "BriefDescription": "Conditional branch executed" > + }, > + { > + "EventCode": "0xCA", > + "EventName": "BR_INDIRECT_MISPRED", > + "BriefDescription": "Indirect branch mispredicted" > + }, > + { > + "EventCode": "0xCB", > + "EventName": "BR_INDIRECT_MISPRED_ADDR", > + "BriefDescription": "Indirect branch mispredicted because of address miscompare" > + }, > + { > + "EventCode": "0xCC", > + "EventName": "BR_COND_MISPRED", > + "BriefDescription": "Conditional branch mispredicted" > + } > +] > > Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,8 @@ > +[ > + { > + "ArchStdEvent": "BUS_ACCESS_RD", > + }, > + { > + "ArchStdEvent": "BUS_ACCESS_WR", > + } > +] > > Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,27 @@ > +[ > + { > + "EventCode": "0xC2", > + "EventName": "PREFETCH_LINEFILL", > + "BriefDescription": "Linefill because of prefetch" > + }, > + { > + "EventCode": "0xC3", > + "EventName": "PREFETCH_LINEFILL_DROP", > + "BriefDescription": "Instruction Cache Throttle occurred" > + }, > + { > + "EventCode": "0xC4", > + "EventName": "READ_ALLOC_ENTER", > + "BriefDescription": "Entering read allocate mode" > + }, > + { > + "EventCode": "0xC5", > + "EventName": "READ_ALLOC", > + "BriefDescription": "Read allocate mode" > + }, > + { > + "EventCode": "0xC8", > + "EventName": "EXT_SNOOP", > + "BriefDescription": "SCU Snooped data from another CPU for this CPU" > + } > +] > > Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,12 @@ > +[ > + { > + "EventCode": "0xC0", > + "EventName": "EXT_MEM_REQ", > + "BriefDescription": "External memory request" > + }, > + { > + "EventCode": "0xC1", > + "EventName": "EXT_MEM_REQ_NC", > + "BriefDescription": "Non-cacheable external memory request" > + } > +] > > Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,28 @@ > +[ > + { > + "ArchStdEvent": "EXC_IRQ", > + }, > + { > + "ArchStdEvent": "EXC_FIQ", > + }, > + { > + "EventCode": "0xC6", > + "EventName": "PRE_DECODE_ERR", > + "BriefDescription": "Pre-decode error" > + }, > + { > + "EventCode": "0xD0", > + "EventName": "L1I_CACHE_ERR", > + "BriefDescription": "L1 Instruction Cache (data or tag) memory error" > + }, > + { > + "EventCode": "0xD1", > + "EventName": "L1D_CACHE_ERR", > + "BriefDescription": "L1 Data Cache (data, tag or dirty) memory error, correctable or non-correctable" > + }, > + { > + "EventCode": "0xD2", > + "EventName": "TLB_ERR", > + "BriefDescription": "TLB memory error" > + } > +] > > Added: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,52 @@ > +[ > + { > + "EventCode": "0xC7", > + "EventName": "STALL_SB_FULL", > + "BriefDescription": "Data Write operation that stalls the pipeline because the store buffer is full" > + }, > + { > + "EventCode": "0xE0", > + "EventName": "OTHER_IQ_DEP_STALL", > + "BriefDescription": "Cycles that the DPU IQ is empty and that is not because of a recent micro-TLB miss, instruction cache miss or pre-decode error" > + }, > + { > + "EventCode": "0xE1", > + "EventName": "IC_DEP_STALL", > + "BriefDescription": "Cycles the DPU IQ is empty and there is an instruction cache miss being processed" > + }, > + { > + "EventCode": "0xE2", > + "EventName": "IUTLB_DEP_STALL", > + "BriefDescription": "Cycles the DPU IQ is empty and there is an instruction micro-TLB miss being processed" > + }, > + { > + "EventCode": "0xE3", > + "EventName": "DECODE_DEP_STALL", > + "BriefDescription": "Cycles the DPU IQ is empty and there is a pre-decode error being processed" > + }, > + { > + "EventCode": "0xE4", > + "EventName": "OTHER_INTERLOCK_STALL", > + "BriefDescription": "Cycles there is an interlock other than Advanced SIMD/Floating-point instructions or load/store instruction" > + }, > + { > + "EventCode": "0xE5", > + "EventName": "AGU_DEP_STALL", > + "BriefDescription": "Cycles there is an interlock for a load/store instruction waiting for data to calculate the address in the AGU" > + }, > + { > + "EventCode": "0xE6", > + "EventName": "SIMD_DEP_STALL", > + "BriefDescription": "Cycles there is an interlock for an Advanced SIMD/Floating-point operation." > + }, > + { > + "EventCode": "0xE7", > + "EventName": "LD_DEP_STALL", > + "BriefDescription": "Cycles there is a stall in the Wr stage because of a load miss" > + }, > + { > + "EventCode": "0xE8", > + "EventName": "ST_DEP_STALL", > + "BriefDescription": "Cycles there is a stall in the Wr stage because of a store" > + } > +] > > Added: head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json Thu May 24 04:30:06 2018 (r334128) > @@ -0,0 +1,452 @@ > +[ > + { > + "PublicDescription": "Attributable Level 1 data cache access, read", > + "EventCode": "0x40", > + "EventName": "L1D_CACHE_RD", > + "BriefDescription": "L1D cache access, read" > + }, > + { > + "PublicDescription": "Attributable Level 1 data cache access, write", > + "EventCode": "0x41", > + "EventName": "L1D_CACHE_WR", > + "BriefDescription": "L1D cache access, write" > + }, > + { > + "PublicDescription": "Attributable Level 1 data cache refill, read", > + "EventCode": "0x42", > + "EventName": "L1D_CACHE_REFILL_RD", > + "BriefDescription": "L1D cache refill, read" > + }, > + { > + "PublicDescription": "Attributable Level 1 data cache refill, write", > + "EventCode": "0x43", > + "EventName": "L1D_CACHE_REFILL_WR", > + "BriefDescription": "L1D cache refill, write" > + }, > + { > + "PublicDescription": "Attributable Level 1 data cache refill, inner", > + "EventCode": "0x44", > + "EventName": "L1D_CACHE_REFILL_INNER", > + "BriefDescription": "L1D cache refill, inner" > + }, > + { > + "PublicDescription": "Attributable Level 1 data cache refill, outer", > + "EventCode": "0x45", > + "EventName": "L1D_CACHE_REFILL_OUTER", > + "BriefDescription": "L1D cache refill, outer" > + }, > + { > + "PublicDescription": "Attributable Level 1 data cache Write-Back, victim", > + "EventCode": "0x46", > + "EventName": "L1D_CACHE_WB_VICTIM", > + "BriefDescription": "L1D cache Write-Back, victim" > + }, > + { > + "PublicDescription": "Level 1 data cache Write-Back, cleaning and coherency", > + "EventCode": "0x47", > + "EventName": "L1D_CACHE_WB_CLEAN", > + "BriefDescription": "L1D cache Write-Back, cleaning and coherency" > + }, > + { > + "PublicDescription": "Attributable Level 1 data cache invalidate", > + "EventCode": "0x48", > + "EventName": "L1D_CACHE_INVAL", > + "BriefDescription": "L1D cache invalidate" > + }, > + { > + "PublicDescription": "Attributable Level 1 data TLB refill, read", > + "EventCode": "0x4C", > + "EventName": "L1D_TLB_REFILL_RD", > + "BriefDescription": "L1D tlb refill, read" > + }, > + { > + "PublicDescription": "Attributable Level 1 data TLB refill, write", > + "EventCode": "0x4D", > + "EventName": "L1D_TLB_REFILL_WR", > + "BriefDescription": "L1D tlb refill, write" > + }, > + { > + "PublicDescription": "Attributable Level 1 data or unified TLB access, read", > + "EventCode": "0x4E", > + "EventName": "L1D_TLB_RD", > + "BriefDescription": "L1D tlb access, read" > + }, > + { > + "PublicDescription": "Attributable Level 1 data or unified TLB access, write", > + "EventCode": "0x4F", > + "EventName": "L1D_TLB_WR", > + "BriefDescription": "L1D tlb access, write" > + }, > + { > + "PublicDescription": "Attributable Level 2 data cache access, read", > + "EventCode": "0x50", > + "EventName": "L2D_CACHE_RD", > + "BriefDescription": "L2D cache access, read" > + }, > + { > + "PublicDescription": "Attributable Level 2 data cache access, write", > + "EventCode": "0x51", > + "EventName": "L2D_CACHE_WR", > + "BriefDescription": "L2D cache access, write" > + }, > + { > + "PublicDescription": "Attributable Level 2 data cache refill, read", > + "EventCode": "0x52", > + "EventName": "L2D_CACHE_REFILL_RD", > + "BriefDescription": "L2D cache refill, read" > + }, > + { > + "PublicDescription": "Attributable Level 2 data cache refill, write", > + "EventCode": "0x53", > + "EventName": "L2D_CACHE_REFILL_WR", > + "BriefDescription": "L2D cache refill, write" > + }, > + { > + "PublicDescription": "Attributable Level 2 data cache Write-Back, victim", > + "EventCode": "0x56", > + "EventName": "L2D_CACHE_WB_VICTIM", > + "BriefDescription": "L2D cache Write-Back, victim" > + }, > + { > + "PublicDescription": "Level 2 data cache Write-Back, cleaning and coherency", > + "EventCode": "0x57", > + "EventName": "L2D_CACHE_WB_CLEAN", > + "BriefDescription": "L2D cache Write-Back, cleaning and coherency" > + }, > + { > + "PublicDescription": "Attributable Level 2 data cache invalidate", > + "EventCode": "0x58", > + "EventName": "L2D_CACHE_INVAL", > + "BriefDescription": "L2D cache invalidate" > + }, > + { > + "PublicDescription": "Attributable Level 2 data or unified TLB refill, read", > + "EventCode": "0x5c", > + "EventName": "L2D_TLB_REFILL_RD", > + "BriefDescription": "L2D cache refill, read" > + }, > + { > + "PublicDescription": "Attributable Level 2 data or unified TLB refill, write", > + "EventCode": "0x5d", > + "EventName": "L2D_TLB_REFILL_WR", > + "BriefDescription": "L2D cache refill, write" > + }, > + { > + "PublicDescription": "Attributable Level 2 data or unified TLB access, read", > + "EventCode": "0x5e", > + "EventName": "L2D_TLB_RD", > + "BriefDescription": "L2D cache access, read" > + }, > + { > + "PublicDescription": "Attributable Level 2 data or unified TLB access, write", > + "EventCode": "0x5f", > + "EventName": "L2D_TLB_WR", > + "BriefDescription": "L2D cache access, write" > + }, > + { > + "PublicDescription": "Bus access read", > + "EventCode": "0x60", > + "EventName": "BUS_ACCESS_RD", > + "BriefDescription": "Bus access read" > + }, > + { > + "PublicDescription": "Bus access write", > + "EventCode": "0x61", > + "EventName": "BUS_ACCESS_WR", > + "BriefDescription": "Bus access write" > + } > + { > + "PublicDescription": "Bus access, Normal, Cacheable, Shareable", > + "EventCode": "0x62", > + "EventName": "BUS_ACCESS_SHARED", > + "BriefDescription": "Bus access, Normal, Cacheable, Shareable" > + } > + { > + "PublicDescription": "Bus access, not Normal, Cacheable, Shareable", > + "EventCode": "0x63", > + "EventName": "BUS_ACCESS_NOT_SHARED", > + "BriefDescription": "Bus access, not Normal, Cacheable, Shareable" > + } > + { > + "PublicDescription": "Bus access, Normal", > + "EventCode": "0x64", > + "EventName": "BUS_ACCESS_NORMAL", > + "BriefDescription": "Bus access, Normal" > + } > + { > + "PublicDescription": "Bus access, peripheral", > + "EventCode": "0x65", > + "EventName": "BUS_ACCESS_PERIPH", > + "BriefDescription": "Bus access, peripheral" > + } > + { > + "PublicDescription": "Data memory access, read", > + "EventCode": "0x66", > + "EventName": "MEM_ACCESS_RD", > + "BriefDescription": "Data memory access, read" > + } > + { > + "PublicDescription": "Data memory access, write", > + "EventCode": "0x67", > + "EventName": "MEM_ACCESS_WR", > + "BriefDescription": "Data memory access, write" > + } > + { > + "PublicDescription": "Unaligned access, read", > + "EventCode": "0x68", > + "EventName": "UNALIGNED_LD_SPEC", > + "BriefDescription": "Unaligned access, read" > + } > + { > + "PublicDescription": "Unaligned access, write", > + "EventCode": "0x69", > + "EventName": "UNALIGNED_ST_SPEC", > + "BriefDescription": "Unaligned access, write" > + } > + { > + "PublicDescription": "Unaligned access", > + "EventCode": "0x6a", > + "EventName": "UNALIGNED_LDST_SPEC", > + "BriefDescription": "Unaligned access" > + } > + { > + "PublicDescription": "Exclusive operation speculatively executed, LDREX or LDX", > + "EventCode": "0x6c", > + "EventName": "LDREX_SPEC", > + "BriefDescription": "Exclusive operation speculatively executed, LDREX or LDX" > + } > + { > + "PublicDescription": "Exclusive operation speculatively executed, STREX or STX pass", > + "EventCode": "0x6d", > + "EventName": "STREX_PASS_SPEC", > + "BriefDescription": "Exclusive operation speculatively executed, STREX or STX pass" > + } > + { > + "PublicDescription": "Exclusive operation speculatively executed, STREX or STX fail", > + "EventCode": "0x6e", > + "EventName": "STREX_FAIL_SPEC", > + "BriefDescription": "Exclusive operation speculatively executed, STREX or STX fail" > + } > + { > + "PublicDescription": "Exclusive operation speculatively executed, STREX or STX", > + "EventCode": "0x6f", > + "EventName": "STREX_SPEC", > + "BriefDescription": "Exclusive operation speculatively executed, STREX or STX" > + } > + { > + "PublicDescription": "Operation speculatively executed, load", > + "EventCode": "0x70", > + "EventName": "LD_SPEC", > + "BriefDescription": "Operation speculatively executed, load" > + } > + { > + "PublicDescription": "Operation speculatively executed, store" > + "EventCode": "0x71", > + "EventName": "ST_SPEC", > + "BriefDescription": "Operation speculatively executed, store" > + } > + { > + "PublicDescription": "Operation speculatively executed, load or store", > + "EventCode": "0x72", > + "EventName": "LDST_SPEC", > + "BriefDescription": "Operation speculatively executed, load or store" > + } > + { > + "PublicDescription": "Operation speculatively executed, integer data processing", > + "EventCode": "0x73", > + "EventName": "DP_SPEC", > + "BriefDescription": "Operation speculatively executed, integer data processing" > + } > + { > + "PublicDescription": "Operation speculatively executed, Advanced SIMD instruction", > + "EventCode": "0x74", > + "EventName": "ASE_SPEC", > + "BriefDescription": "Operation speculatively executed, Advanced SIMD instruction", > + } > + { > + "PublicDescription": "Operation speculatively executed, floating-point instruction", > + "EventCode": "0x75", > + "EventName": "VFP_SPEC", > + "BriefDescription": "Operation speculatively executed, floating-point instruction" > + } > + { > + "PublicDescription": "Operation speculatively executed, software change of the PC", > + "EventCode": "0x76", > + "EventName": "PC_WRITE_SPEC", > + "BriefDescription": "Operation speculatively executed, software change of the PC" > + } > + { > + "PublicDescription": "Operation speculatively executed, Cryptographic instruction", > + "EventCode": "0x77", > + "EventName": "CRYPTO_SPEC", > + "BriefDescription": "Operation speculatively executed, Cryptographic instruction" > + } > + { > + "PublicDescription": "Branch speculatively executed, immediate branch" > + "EventCode": "0x78", > + "EventName": "BR_IMMED_SPEC", > + "BriefDescription": "Branch speculatively executed, immediate branch" > + } > + { > + "PublicDescription": "Branch speculatively executed, procedure return" > + "EventCode": "0x79", > + "EventName": "BR_RETURN_SPEC", > + "BriefDescription": "Branch speculatively executed, procedure return" > + } > + { > + "PublicDescription": "Branch speculatively executed, indirect branch" > + "EventCode": "0x7a", > + "EventName": "BR_INDIRECT_SPEC", > + "BriefDescription": "Branch speculatively executed, indirect branch" > + } > + { > + "PublicDescription": "Barrier speculatively executed, ISB" > + "EventCode": "0x7c", > + "EventName": "ISB_SPEC", > + "BriefDescription": "Barrier speculatively executed, ISB" > + } > + { > + "PublicDescription": "Barrier speculatively executed, DSB" > + "EventCode": "0x7d", > + "EventName": "DSB_SPEC", > + "BriefDescription": "Barrier speculatively executed, DSB" > + } > + { > + "PublicDescription": "Barrier speculatively executed, DMB" > + "EventCode": "0x7e", > + "EventName": "DMB_SPEC", > + "BriefDescription": "Barrier speculatively executed, DMB" > + } > + { > + "PublicDescription": "Exception taken, Other synchronous" > + "EventCode": "0x81", > + "EventName": "EXC_UNDEF", > + "BriefDescription": "Exception taken, Other synchronous" > + } > + { > + "PublicDescription": "Exception taken, Supervisor Call" > + "EventCode": "0x82", > + "EventName": "EXC_SVC", > + "BriefDescription": "Exception taken, Supervisor Call" > + } > + { > + "PublicDescription": "Exception taken, Instruction Abort" > + "EventCode": "0x83", > + "EventName": "EXC_PABORT", > + "BriefDescription": "Exception taken, Instruction Abort" > + } > + { > + "PublicDescription": "Exception taken, Data Abort and SError" > + "EventCode": "0x84", > + "EventName": "EXC_DABORT", > + "BriefDescription": "Exception taken, Data Abort and SError" > + } > + { > + "PublicDescription": "Exception taken, IRQ" > + "EventCode": "0x86", > + "EventName": "EXC_IRQ", > + "BriefDescription": "Exception taken, IRQ" > + } > + { > + "PublicDescription": "Exception taken, FIQ" > + "EventCode": "0x87", > + "EventName": "EXC_FIQ", > + "BriefDescription": "Exception taken, FIQ" > + } > + { > + "PublicDescription": "Exception taken, Secure Monitor Call" > + "EventCode": "0x88", > + "EventName": "EXC_SMC", > + "BriefDescription": "Exception taken, Secure Monitor Call" > + } > + { > + "PublicDescription": "Exception taken, Hypervisor Call" > + "EventCode": "0x8a", > + "EventName": "EXC_HVC", > + "BriefDescription": "Exception taken, Hypervisor Call" > + } > + { > + "PublicDescription": "Exception taken, Instruction Abort not taken locally" > + "EventCode": "0x8b", > + "EventName": "EXC_TRAP_PABORT", > + "BriefDescription": "Exception taken, Instruction Abort not taken locally" > + } > + { > + "PublicDescription": "Exception taken, Data Abort or SError not taken locally" > + "EventCode": "0x8c", > + "EventName": "EXC_TRAP_DABORT", > + "BriefDescription": "Exception taken, Data Abort or SError not taken locally" > + } > + { > + "PublicDescription": "Exception taken, Other traps not taken locally" > + "EventCode": "0x8d", > + "EventName": "EXC_TRAP_OTHER", > + "BriefDescription": "Exception taken, Other traps not taken locally" > + } > + { > + "PublicDescription": "Exception taken, IRQ not taken locally" > + "EventCode": "0x8e", > + "EventName": "EXC_TRAP_IRQ", > + "BriefDescription": "Exception taken, IRQ not taken locally" > + } > + { > + "PublicDescription": "Exception taken, FIQ not taken locally" > + "EventCode": "0x8f", > + "EventName": "EXC_TRAP_FIQ", > + "BriefDescription": "Exception taken, FIQ not taken locally" > + } > + { > + "PublicDescription": "Release consistency operation speculatively executed, Load-Acquire" > + "EventCode": "0x90", > + "EventName": "RC_LD_SPEC", > + "BriefDescription": "Release consistency operation speculatively executed, Load-Acquire" > + } > + { > + "PublicDescription": "Release consistency operation speculatively executed, Store-Release" > + "EventCode": "0x91", > + "EventName": "RC_ST_SPEC", > + "BriefDescription": "Release consistency operation speculatively executed, Store-Release" > + } > + { > + "PublicDescription": "Attributable Level 3 data or unified cache access, read" > + "EventCode": "0xa0", > + "EventName": "L3D_CACHE_RD", > + "BriefDescription": "Attributable Level 3 data or unified cache access, read" > + } > + { > + "PublicDescription": "Attributable Level 3 data or unified cache access, write" > + "EventCode": "0xa1", > + "EventName": "L3D_CACHE_WR", > + "BriefDescription": "Attributable Level 3 data or unified cache access, write" > + } > + { > + "PublicDescription": "Attributable Level 3 data or unified cache refill, read" > + "EventCode": "0xa2", > + "EventName": "L3D_CACHE_REFILL_RD", > + "BriefDescription": "Attributable Level 3 data or unified cache refill, read" > + } > + { > + "PublicDescription": "Attributable Level 3 data or unified cache refill, write" > + "EventCode": "0xa3", > + "EventName": "L3D_CACHE_REFILL_WR", > + "BriefDescription": "Attributable Level 3 data or unified cache refill, write" > + } > + { > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu May 24 14:01:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46B15EF2189; Thu, 24 May 2018 14:01:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE9A16D128; Thu, 24 May 2018 14:01:22 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D106E132EE; Thu, 24 May 2018 14:01:22 +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 w4OE1MKv090477; Thu, 24 May 2018 14:01:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OE1MQn090476; Thu, 24 May 2018 14:01:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805241401.w4OE1MQn090476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 May 2018 14:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334153 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 334153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 14:01:23 -0000 Author: emaste Date: Thu May 24 14:01:22 2018 New Revision: 334153 URL: https://svnweb.freebsd.org/changeset/base/334153 Log: Restore arm, riscv, sparc64, and mips to UNIVERSE after r334128 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu May 24 13:17:24 2018 (r334152) +++ head/Makefile Thu May 24 14:01:22 2018 (r334153) @@ -481,8 +481,7 @@ worlds: .PHONY # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) -TARGETS?=amd64 i386 powerpc arm64 -#riscv arm sparc64 mips +TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= arm armeb armv6 armv7 TARGET_ARCHES_arm64?= aarch64 From owner-svn-src-head@freebsd.org Thu May 24 14:08:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2A5CEF23CB; Thu, 24 May 2018 14:08:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 471DB6D4A4; Thu, 24 May 2018 14:08:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x229.google.com with SMTP id e20-v6so2444691iof.4; Thu, 24 May 2018 07:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=RnHXC2Fon7AMGkDE8Odxo8ITrxbTNbXhcxJNcKE469c=; b=JbfnFYCwbIsd61SHG7lNYZkOPYCYxdvW4zsb5KzENIEHVtMFRymjE18lK5ue06KjFJ 7aFqnA69cH84jB4MDCwBNdMPdyiqp/cMrcCcyEHBIelnszL1JSlzzyExpzqLJfQpvPDz hDH4AmzmzUYHEl/WJ1yau7qqOP1503zhnm6hYsQHt8kduas1YvPnoDfvwKD2Po0i4ksX HsN5bxsVgJKC/+R01hQZhQh37OzgUPMuCFENcLGmsZtHC1O5wE+jOfHSq2n50RLe9EZV KRuIfE6wI0sJj9eTjgbjoAwpYJp19a0WTxreUrZEfF/NLhy9nQ8e/pWKpHy7hqKzesPN cSOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=RnHXC2Fon7AMGkDE8Odxo8ITrxbTNbXhcxJNcKE469c=; b=oXAzobEOYLijAHCpX1Xupm+RPs2G8BDK6RxD86DhAZpLE4H+QH2cQ7gdFran7dDfbj zO5eFpvxnKm2++TuozN91MZfSBx+RufHob6ocs6x3lg+UMoyjo1tsuiFsr8p7AkhIKLr gVJ6IuOseY/rbj8eYfjT27O/FcbN4FxHjZwYbyP6vHWXSGYuBl/5sYIv3U3GuIMbLp0B n9JEJlnfNNC84mNF+Fc4T1CRr4TyuCYbhTSYJzENKmxPw3iE47zrg2NtTFzacRKHSiRi r8/EYx72SjXSnJmKDySVuN7yP5/GA8WURK1yAZwz+2oqKEV/F5u2DGEi2vTY7kQ5ur4d defg== X-Gm-Message-State: ALKqPwcXVCxKjtiWVvrQ35xaY9MNFHH9YOf88D7KUdoAi3JP+AXqzaEk tY7+fnTgtwAhuXufc7Vd1vmAIZX1dRygwBbKVy72sQ== X-Google-Smtp-Source: AB8JxZoKKybe59XFtFmuAXKX92/ToJu3HGMNXLrJu/6zRYJLGKWbKwgAi6wvgGA7wkiG3FG+hQnKaC9BHUMorllzP4I= X-Received: by 2002:a6b:1c84:: with SMTP id c126-v6mr6660811ioc.210.1527170893394; Thu, 24 May 2018 07:08:13 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:82a7:0:0:0:0:0 with HTTP; Thu, 24 May 2018 07:07:52 -0700 (PDT) In-Reply-To: References: <201805240431.w4O4Vrvv004255@repo.freebsd.org> From: Ed Maste Date: Thu, 24 May 2018 10:07:52 -0400 X-Google-Sender-Auth: 0aAXp3xKNAgUJVD0bfpKOdurIuc Message-ID: Subject: Re: svn commit: r334129 - head/sys/amd64/conf To: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 14:08:14 -0000 On 24 May 2018 at 01:36, Matthew Macy wrote: > On Wed, May 23, 2018 at 10:32 PM, Ravi Pokala wrote: >>> >>> Author: mmacy >>> Date: Thu May 24 04:31:53 2018 >>> New Revision: 334129 >>> URL: https://svnweb.freebsd.org/changeset/base/334129 >>> >>> Log: >>> take NUMA out >>> ... >> Why? > > > I ^C'd the prior commit too late. For cases like this the commit message should include something like "It was accidentally committed in r334128." From owner-svn-src-head@freebsd.org Thu May 24 14:16:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE533EF2865; Thu, 24 May 2018 14:16:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6648A6DBAA; Thu, 24 May 2018 14:16:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AE1F134D3; Thu, 24 May 2018 14:16:23 +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 w4OEGNDW099009; Thu, 24 May 2018 14:16:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OEGNgm099008; Thu, 24 May 2018 14:16:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805241416.w4OEGNgm099008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 24 May 2018 14:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334154 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 334154 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 14:16:24 -0000 Author: markj Date: Thu May 24 14:16:22 2018 New Revision: 334154 URL: https://svnweb.freebsd.org/changeset/base/334154 Log: Split the active and inactive queue scans into separate subroutines. The scans are largely independent, so this helps make the code marginally neater, and makes it easier to incorporate feedback from the active queue scan into the page daemon control loop. Improve some comments while here. No functional change intended. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D15490 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu May 24 14:01:22 2018 (r334153) +++ head/sys/vm/vm_pageout.c Thu May 24 14:16:22 2018 (r334154) @@ -124,7 +124,6 @@ static void vm_pageout(void); static void vm_pageout_init(void); static int vm_pageout_clean(vm_page_t m, int *numpagedout); static int vm_pageout_cluster(vm_page_t m); -static bool vm_pageout_scan(struct vm_domain *vmd, int pass, int shortage); static void vm_pageout_mightbe_oom(struct vm_domain *vmd, int page_shortage, int starting_page_shortage); @@ -1108,7 +1107,193 @@ dolaundry: } } +/* + * Compute the number of pages we want to try to move from the + * active queue to either the inactive or laundry queue. + * + * When scanning active pages, we make clean pages count more heavily + * towards the page shortage than dirty pages. This is because dirty + * pages must be laundered before they can be reused and thus have less + * utility when attempting to quickly alleviate a shortage. However, + * this weighting also causes the scan to deactivate dirty pages more + * aggressively, improving the effectiveness of clustering and + * ensuring that they can eventually be reused. + */ static int +vm_pageout_scan_active_target(struct vm_domain *vmd) +{ + int shortage; + + shortage = vmd->vmd_inactive_target + vm_paging_target(vmd) - + (vmd->vmd_pagequeues[PQ_INACTIVE].pq_cnt + + vmd->vmd_pagequeues[PQ_LAUNDRY].pq_cnt / act_scan_laundry_weight); + shortage *= act_scan_laundry_weight; + return (shortage); +} + +/* + * Scan the active queue. If there is no shortage of inactive pages, scan a + * small portion of the queue in order to maintain quasi-LRU. + */ +static void +vm_pageout_scan_active(struct vm_domain *vmd, int page_shortage) +{ + struct scan_state ss; + struct mtx *mtx; + vm_page_t m, marker; + struct vm_pagequeue *pq; + long min_scan; + int act_delta, max_scan, scan_tick; + + marker = &vmd->vmd_markers[PQ_ACTIVE]; + pq = &vmd->vmd_pagequeues[PQ_ACTIVE]; + vm_pagequeue_lock(pq); + + /* + * If we're just idle polling attempt to visit every + * active page within 'update_period' seconds. + */ + scan_tick = ticks; + if (vm_pageout_update_period != 0) { + min_scan = pq->pq_cnt; + min_scan *= scan_tick - vmd->vmd_last_active_scan; + min_scan /= hz * vm_pageout_update_period; + } else + min_scan = 0; + if (min_scan > 0 || (page_shortage > 0 && pq->pq_cnt > 0)) + vmd->vmd_last_active_scan = scan_tick; + + /* + * Scan the active queue for pages that can be deactivated. Update + * the per-page activity counter and use it to identify deactivation + * candidates. Held pages may be deactivated. + * + * To avoid requeuing each page that remains in the active queue, we + * implement the CLOCK algorithm. To maintain consistency in the + * generic page queue code, pages are inserted at the tail of the + * active queue. We thus use two hands, represented by marker pages: + * scans begin at the first hand, which precedes the second hand in + * the queue. When the two hands meet, they are moved back to the + * head and tail of the queue, respectively, and scanning resumes. + */ + max_scan = page_shortage > 0 ? pq->pq_cnt : min_scan; + mtx = NULL; +act_scan: + vm_pageout_init_scan(&ss, pq, marker, &vmd->vmd_clock[0], max_scan); + while ((m = vm_pageout_next(&ss, false)) != NULL) { + if (__predict_false(m == &vmd->vmd_clock[1])) { + vm_pagequeue_lock(pq); + TAILQ_REMOVE(&pq->pq_pl, &vmd->vmd_clock[0], plinks.q); + TAILQ_REMOVE(&pq->pq_pl, &vmd->vmd_clock[1], plinks.q); + TAILQ_INSERT_HEAD(&pq->pq_pl, &vmd->vmd_clock[0], + plinks.q); + TAILQ_INSERT_TAIL(&pq->pq_pl, &vmd->vmd_clock[1], + plinks.q); + max_scan -= ss.scanned; + vm_pageout_end_scan(&ss); + goto act_scan; + } + if (__predict_false((m->flags & PG_MARKER) != 0)) + continue; + + vm_page_change_lock(m, &mtx); + + /* + * The page may have been disassociated from the queue + * while locks were dropped. + */ + if (vm_page_queue(m) != PQ_ACTIVE) + continue; + + /* + * Wired pages are dequeued lazily. + */ + if (m->wire_count != 0) { + vm_page_dequeue_deferred(m); + continue; + } + + /* + * Check to see "how much" the page has been used. + */ + if ((m->aflags & PGA_REFERENCED) != 0) { + vm_page_aflag_clear(m, PGA_REFERENCED); + act_delta = 1; + } else + act_delta = 0; + + /* + * Perform an unsynchronized object ref count check. While + * the page lock ensures that the page is not reallocated to + * another object, in particular, one with unmanaged mappings + * that cannot support pmap_ts_referenced(), two races are, + * nonetheless, possible: + * 1) The count was transitioning to zero, but we saw a non- + * zero value. pmap_ts_referenced() will return zero + * because the page is not mapped. + * 2) The count was transitioning to one, but we saw zero. + * This race delays the detection of a new reference. At + * worst, we will deactivate and reactivate the page. + */ + if (m->object->ref_count != 0) + act_delta += pmap_ts_referenced(m); + + /* + * Advance or decay the act_count based on recent usage. + */ + if (act_delta != 0) { + m->act_count += ACT_ADVANCE + act_delta; + if (m->act_count > ACT_MAX) + m->act_count = ACT_MAX; + } else + m->act_count -= min(m->act_count, ACT_DECLINE); + + if (m->act_count == 0) { + /* + * When not short for inactive pages, let dirty pages go + * through the inactive queue before moving to the + * laundry queues. This gives them some extra time to + * be reactivated, potentially avoiding an expensive + * pageout. During a page shortage, the inactive queue + * is necessarily small, so we may move dirty pages + * directly to the laundry queue. + */ + if (page_shortage <= 0) + vm_page_deactivate(m); + else { + /* + * Calling vm_page_test_dirty() here would + * require acquisition of the object's write + * lock. However, during a page shortage, + * directing dirty pages into the laundry + * queue is only an optimization and not a + * requirement. Therefore, we simply rely on + * the opportunistic updates to the page's + * dirty field by the pmap. + */ + if (m->dirty == 0) { + vm_page_deactivate(m); + page_shortage -= + act_scan_laundry_weight; + } else { + vm_page_launder(m); + page_shortage--; + } + } + } + } + if (mtx != NULL) { + mtx_unlock(mtx); + mtx = NULL; + } + vm_pagequeue_lock(pq); + TAILQ_REMOVE(&pq->pq_pl, &vmd->vmd_clock[0], plinks.q); + TAILQ_INSERT_AFTER(&pq->pq_pl, marker, &vmd->vmd_clock[0], plinks.q); + vm_pageout_end_scan(&ss); + vm_pagequeue_unlock(pq); +} + +static int vm_pageout_reinsert_inactive_page(struct scan_state *ss, vm_page_t m) { struct vm_domain *vmd; @@ -1159,16 +1344,13 @@ vm_pageout_reinsert_inactive(struct scan_state *ss, st } /* - * vm_pageout_scan does the dirty work for the pageout daemon. - * - * pass == 0: Update active LRU/deactivate pages - * pass >= 1: Free inactive pages - * - * Returns true if pass was zero or enough pages were freed by the inactive - * queue scan to meet the target. + * Attempt to reclaim the requested number of pages. Returns true if pass was + * zero or enough pages were freed by the inactive queue scan to meet the + * target. */ -static bool -vm_pageout_scan(struct vm_domain *vmd, int pass, int shortage) +static int +vm_pageout_scan_inactive(struct vm_domain *vmd, int pass, int shortage, + int *addl_shortage) { struct scan_state ss; struct vm_batchqueue rq; @@ -1176,9 +1358,8 @@ vm_pageout_scan(struct vm_domain *vmd, int pass, int s vm_page_t m, marker; struct vm_pagequeue *pq; vm_object_t object; - long min_scan; - int act_delta, addl_page_shortage, deficit, inactq_shortage, max_scan; - int page_shortage, scan_tick, starting_page_shortage; + int act_delta, addl_page_shortage, deficit, page_shortage; + int starting_page_shortage; bool obj_locked; /* @@ -1263,8 +1444,7 @@ recheck: /* * Held pages are essentially stuck in the queue. So, * they ought to be discounted from the inactive count. - * See the calculation of inactq_shortage before the - * loop over the active queue below. + * See the description of addl_page_shortage above. * * Wired pages may not be freed. Complete their removal * from the queue now to avoid needless revisits during @@ -1332,7 +1512,7 @@ recheck: act_delta += pmap_ts_referenced(m); } else { KASSERT(!pmap_page_is_mapped(m), - ("vm_pageout_scan: page %p is mapped", m)); + ("page %p is mapped", m)); } if (act_delta != 0) { if (object->ref_count != 0) { @@ -1453,170 +1633,16 @@ reinsert: vm_pageout_mightbe_oom(vmd, page_shortage, starting_page_shortage); /* - * Compute the number of pages we want to try to move from the - * active queue to either the inactive or laundry queue. - * - * When scanning active pages, we make clean pages count more heavily - * towards the page shortage than dirty pages. This is because dirty - * pages must be laundered before they can be reused and thus have less - * utility when attempting to quickly alleviate a shortage. However, - * this weighting also causes the scan to deactivate dirty pages more - * more aggressively, improving the effectiveness of clustering and - * ensuring that they can eventually be reused. + * Reclaim pages by swapping out idle processes, if configured to do so. */ - inactq_shortage = vmd->vmd_inactive_target - (pq->pq_cnt + - vmd->vmd_pagequeues[PQ_LAUNDRY].pq_cnt / act_scan_laundry_weight) + - vm_paging_target(vmd) + deficit + addl_page_shortage; - inactq_shortage *= act_scan_laundry_weight; + if (pass > 0) + vm_swapout_run_idle(); - marker = &vmd->vmd_markers[PQ_ACTIVE]; - pq = &vmd->vmd_pagequeues[PQ_ACTIVE]; - vm_pagequeue_lock(pq); - /* - * If we're just idle polling attempt to visit every - * active page within 'update_period' seconds. + * See the description of addl_page_shortage above. */ - scan_tick = ticks; - if (vm_pageout_update_period != 0) { - min_scan = pq->pq_cnt; - min_scan *= scan_tick - vmd->vmd_last_active_scan; - min_scan /= hz * vm_pageout_update_period; - } else - min_scan = 0; - if (min_scan > 0 || (inactq_shortage > 0 && pq->pq_cnt > 0)) - vmd->vmd_last_active_scan = scan_tick; + *addl_shortage = addl_page_shortage + deficit; - /* - * Scan the active queue for pages that can be deactivated. Update - * the per-page activity counter and use it to identify deactivation - * candidates. Held pages may be deactivated. - * - * To avoid requeuing each page that remains in the active queue, we - * implement the CLOCK algorithm. To maintain consistency in the - * generic page queue code, pages are inserted at the tail of the - * active queue. We thus use two hands, represented by marker pages: - * scans begin at the first hand, which precedes the second hand in - * the queue. When the two hands meet, they are moved back to the - * head and tail of the queue, respectively, and scanning resumes. - */ - max_scan = inactq_shortage > 0 ? pq->pq_cnt : min_scan; -act_scan: - vm_pageout_init_scan(&ss, pq, marker, &vmd->vmd_clock[0], max_scan); - while ((m = vm_pageout_next(&ss, false)) != NULL) { - if (__predict_false(m == &vmd->vmd_clock[1])) { - vm_pagequeue_lock(pq); - TAILQ_REMOVE(&pq->pq_pl, &vmd->vmd_clock[0], plinks.q); - TAILQ_REMOVE(&pq->pq_pl, &vmd->vmd_clock[1], plinks.q); - TAILQ_INSERT_HEAD(&pq->pq_pl, &vmd->vmd_clock[0], - plinks.q); - TAILQ_INSERT_TAIL(&pq->pq_pl, &vmd->vmd_clock[1], - plinks.q); - max_scan -= ss.scanned; - vm_pageout_end_scan(&ss); - goto act_scan; - } - if (__predict_false((m->flags & PG_MARKER) != 0)) - continue; - - vm_page_change_lock(m, &mtx); - - /* - * The page may have been disassociated from the queue - * while locks were dropped. - */ - if (vm_page_queue(m) != PQ_ACTIVE) - continue; - - /* - * Wired pages are dequeued lazily. - */ - if (m->wire_count != 0) { - vm_page_dequeue_deferred(m); - continue; - } - - /* - * Check to see "how much" the page has been used. - */ - if ((m->aflags & PGA_REFERENCED) != 0) { - vm_page_aflag_clear(m, PGA_REFERENCED); - act_delta = 1; - } else - act_delta = 0; - - /* - * Perform an unsynchronized object ref count check. While - * the page lock ensures that the page is not reallocated to - * another object, in particular, one with unmanaged mappings - * that cannot support pmap_ts_referenced(), two races are, - * nonetheless, possible: - * 1) The count was transitioning to zero, but we saw a non- - * zero value. pmap_ts_referenced() will return zero - * because the page is not mapped. - * 2) The count was transitioning to one, but we saw zero. - * This race delays the detection of a new reference. At - * worst, we will deactivate and reactivate the page. - */ - if (m->object->ref_count != 0) - act_delta += pmap_ts_referenced(m); - - /* - * Advance or decay the act_count based on recent usage. - */ - if (act_delta != 0) { - m->act_count += ACT_ADVANCE + act_delta; - if (m->act_count > ACT_MAX) - m->act_count = ACT_MAX; - } else - m->act_count -= min(m->act_count, ACT_DECLINE); - - if (m->act_count == 0) { - /* - * When not short for inactive pages, let dirty pages go - * through the inactive queue before moving to the - * laundry queues. This gives them some extra time to - * be reactivated, potentially avoiding an expensive - * pageout. During a page shortage, the inactive queue - * is necessarily small, so we may move dirty pages - * directly to the laundry queue. - */ - if (inactq_shortage <= 0) - vm_page_deactivate(m); - else { - /* - * Calling vm_page_test_dirty() here would - * require acquisition of the object's write - * lock. However, during a page shortage, - * directing dirty pages into the laundry - * queue is only an optimization and not a - * requirement. Therefore, we simply rely on - * the opportunistic updates to the page's - * dirty field by the pmap. - */ - if (m->dirty == 0) { - vm_page_deactivate(m); - inactq_shortage -= - act_scan_laundry_weight; - } else { - vm_page_launder(m); - inactq_shortage--; - } - } - } - } - if (mtx != NULL) { - mtx_unlock(mtx); - mtx = NULL; - } - vm_pagequeue_lock(pq); - TAILQ_REMOVE(&pq->pq_pl, &vmd->vmd_clock[0], plinks.q); - TAILQ_INSERT_AFTER(&pq->pq_pl, marker, &vmd->vmd_clock[0], plinks.q); - vm_pageout_end_scan(&ss); - vm_pagequeue_unlock(pq); - - if (pass > 0) - vm_swapout_run_idle(); return (page_shortage <= 0); } @@ -1844,7 +1870,7 @@ static void vm_pageout_worker(void *arg) { struct vm_domain *vmd; - int domain, pass, shortage; + int addl_shortage, domain, pass, shortage; bool target_met; domain = (uintptr_t)arg; @@ -1896,18 +1922,28 @@ vm_pageout_worker(void *arg) "psleep", hz / VM_INACT_SCAN_RATE) == 0) VM_CNT_INC(v_pdwakeups); } + /* Prevent spurious wakeups by ensuring that wanted is set. */ atomic_store_int(&vmd->vmd_pageout_wanted, 1); /* * Use the controller to calculate how many pages to free in - * this interval. + * this interval, and scan the inactive queue. */ shortage = pidctrl_daemon(&vmd->vmd_pid, vmd->vmd_free_count); - if (shortage && pass == 0) + if (shortage > 0 && pass == 0) pass = 1; + target_met = vm_pageout_scan_inactive(vmd, pass, shortage, + &addl_shortage); - target_met = vm_pageout_scan(vmd, pass, shortage); + /* + * Scan the active queue. A positive value for shortage + * indicates that we must aggressively deactivate pages to avoid + * a shortfall. + */ + shortage = vm_pageout_scan_active_target(vmd) + addl_shortage; + vm_pageout_scan_active(vmd, shortage); + /* * If the target was not met we must increase the pass to * more aggressively reclaim. From owner-svn-src-head@freebsd.org Thu May 24 14:24:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CE8AEF2C5A; Thu, 24 May 2018 14:24:02 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1BD16E22A; Thu, 24 May 2018 14:24:01 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4OENrpF040656; Thu, 24 May 2018 07:23:53 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4OENrjU040655; Thu, 24 May 2018 07:23:53 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805241423.w4OENrjU040655@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334129 - head/sys/amd64/conf In-Reply-To: To: Ed Maste Date: Thu, 24 May 2018 07:23:53 -0700 (PDT) CC: src-committers , svn-src-head@freebsd.org, svn-src-all@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 14:24:02 -0000 > On 24 May 2018 at 01:36, Matthew Macy wrote: > > On Wed, May 23, 2018 at 10:32 PM, Ravi Pokala wrote: > >>> > >>> Author: mmacy > >>> Date: Thu May 24 04:31:53 2018 > >>> New Revision: 334129 > >>> URL: https://svnweb.freebsd.org/changeset/base/334129 > >>> > >>> Log: > >>> take NUMA out > >>> ... > >> Why? > > > > > > I ^C'd the prior commit too late. > > For cases like this the commit message should include something like > "It was accidentally committed in r334128." Would it not make some sense to revert and recommit when these happen, especially if there is an intenent to MFC, otherwise one has to be sure to merge both parts to end up with a corrected commit to stable/ We seem to be afraid of revert, recommit correcting cycles, and in the long run that may be causing us some problems. Just a though. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu May 24 14:28:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83D0CEF2FF8; Thu, 24 May 2018 14:28:15 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32B936E7DC; Thu, 24 May 2018 14:28:15 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id EA5EE116DB; Thu, 24 May 2018 14:28:14 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f50.google.com with SMTP id 144-v6so2589234iti.5; Thu, 24 May 2018 07:28:14 -0700 (PDT) X-Gm-Message-State: ALKqPwf/qv7sEpJ4HotFavt1kUih+9n+yjnWDBTZrKp3DfXIuCQhOeqB nWxvcZ9tHYFbdc9DkxoJYkwUQQYJvWCThRy1S54= X-Google-Smtp-Source: AB8JxZquyZ8jPNVc4ym+aGHglyqv3uvJailDAJauAfmoJbkDHCJU9eD/3QGXheQjXU3zpqmA2v2n/pkP9RKwOpoHIu4= X-Received: by 2002:a24:ddcc:: with SMTP id t195-v6mr9415671itf.77.1527172094432; Thu, 24 May 2018 07:28:14 -0700 (PDT) MIME-Version: 1.0 References: <201805240430.w4O4U6Js001134@repo.freebsd.org> In-Reply-To: From: Matthew Macy Date: Thu, 24 May 2018 07:28:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334128 - in head: . lib/libpmcstat lib/libpmcstat/pmu-events lib/libpmcstat/pmu-events/arch lib/libpmcstat/pmu-events/arch/arm64 lib/libpmcstat/pmu-events/arch/arm64/arm lib/libpmcstat... To: Sergey Kandaurov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 14:28:15 -0000 Ugh. Not intentional On Thu, May 24, 2018 at 02:35 Sergey Kandaurov wrote: > On 24 May 2018 at 07:30, Matt Macy wrote: > >> Author: mmacy >> Date: Thu May 24 04:30:06 2018 >> New Revision: 334128 >> URL: https://svnweb.freebsd.org/changeset/base/334128 >> >> Log: >> libpmcstat: compile in events based on json description >> > [...] > > >> >> Modified: head/Makefile >> >> ============================================================================== >> --- head/Makefile Thu May 24 03:44:12 2018 (r334127) >> +++ head/Makefile Thu May 24 04:30:06 2018 (r334128) >> @@ -481,7 +481,8 @@ worlds: .PHONY >> # existing system is. >> # >> .if make(universe) || make(universe_kernels) || make(tinderbox) || >> make(targets) >> -TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 >> +TARGETS?=amd64 i386 powerpc arm64 >> +#riscv arm sparc64 mips >> _UNIVERSE_TARGETS= ${TARGETS} >> TARGET_ARCHES_arm?= arm armeb armv6 armv7 >> TARGET_ARCHES_arm64?= aarch64 >> > > Why? Looks like a debug leftover. > > -- > wbr, > pluknet > From owner-svn-src-head@freebsd.org Thu May 24 14:30:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFE1CEF31AF for ; Thu, 24 May 2018 14:30:29 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48D216EA09 for ; Thu, 24 May 2018 14:30:28 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: f943b06a-5f5e-11e8-8837-614b7c574d04 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id f943b06a-5f5e-11e8-8837-614b7c574d04; Thu, 24 May 2018 14:30:17 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w4OEUEog004176; Thu, 24 May 2018 08:30:14 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1527172214.32688.123.camel@freebsd.org> Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/conf sys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/tools tools/tools/nxge usr.sbin/bsdconfig/share From: Ian Lepore To: Eugene Grosbein Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Date: Thu, 24 May 2018 08:30:14 -0600 In-Reply-To: <5B05B419.2070709@grosbein.net> References: <201805231814.w4NIExZ9036362@pdx.rh.CN85.dnsmgr.net> <5B05B419.2070709@grosbein.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 14:30:29 -0000 On Thu, 2018-05-24 at 01:34 +0700, Eugene Grosbein wrote: > 24.05.2018 1:14, Rodney W. Grimes wrote: > > > > > > > > > On Wed, May 23, 2018 at 10:41:17AM -0700, Gleb Smirnoff wrote: > > > > > > > > If end of sales and support is enough to remove 10g driver from the kernel, > > > > can we please delete all 10Mbit, 100Mbit 10+ year old drivers from the kernel? > > > Depends on how many existing users we want to screw over.  Not everyone > > > replaces all their hardware every 2 years, folks. > > And some of us buy 2 year old hardware because it is cheap, > > and serves our needs just fine.   Even 8 year old servers > > make usable machines today. > My home router runs 11.1-STABLE/i386 using PC-104 form factor system from the year 2007 > having AMD Geode processor not capable of 64 bit mode, RAM maxed at 1GB (2x512MB DIMMs), > UDMA100 IDE/PATA controller and two 100Mbit vr(4) vlan-capable network interfaces. > > It can route/nat PPPoE connection at 100M wire speed, performs IPSEC at 33Mbit/s using > cryptodev/onboard AES accelerator while acting as WiFi access point same time > using multi-AP capable AR5212 ath(4) miniPCI (not miniPCI-E) card. > > And I love FreeBSD for that. > > At $work we still build and ship some products using industrial SBCs similar to what you describe (32-bit Geode processor and vr(4) network driver). That hardware is still available today (and not just on ebay). I think there's a big difference between removing an old driver because the hardware it supports was a marketplace failure and almost no units exist in the wild, and removing old drivers just because they're old. -- Ian From owner-svn-src-head@freebsd.org Thu May 24 14:38:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A77B2EF34CC for ; Thu, 24 May 2018 14:38:03 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DE4D6F02A for ; Thu, 24 May 2018 14:38:02 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 03dd1ca8-5f60-11e8-afd2-4ddcc8249dd4 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 03dd1ca8-5f60-11e8-afd2-4ddcc8249dd4; Thu, 24 May 2018 14:37:45 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w4OEbf0h004191; Thu, 24 May 2018 08:37:41 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1527172661.32688.129.camel@freebsd.org> Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share From: Ian Lepore To: Cy Schubert , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon Cc: Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Date: Thu, 24 May 2018 08:37:41 -0600 In-Reply-To: <20180523193027.825583BC@spqr.komquats.com> References: <20180523193027.825583BC@spqr.komquats.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 14:38:03 -0000 On Wed, 2018-05-23 at 12:30 -0700, Cy Schubert wrote: > Except for old computers and old software that segfaults on 64-bit, > how many people still use i386? > > Full disclosure: I'd like to see i386 deorbited before I retire. > > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > Also, this old phone only supports top post. Apologies. > > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- At $work, we build products using i386. I would hope that if we started a new x86-based product we would be given the engineering budget to make it work on 64-bit, but you know how that sort of thing goes out the window when the time-and-budget management folks get involved.  But we have a repo containing 20 years worth of application code (well over a million lines) that has never run on 64-bit and may well need some attention (and lots of testing) to do so properly. i386 is not dead, and amd64 is not always necessary even for modern applications (our apps, for example, never need more than 512MB in a system). -- Ian From owner-svn-src-head@freebsd.org Thu May 24 14:55:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97B0AEF3E1B; Thu, 24 May 2018 14:55:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4299870426; Thu, 24 May 2018 14:55:51 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21B7213B2B; Thu, 24 May 2018 14:55:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OEtob4019418; Thu, 24 May 2018 14:55:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OEtoCa019417; Thu, 24 May 2018 14:55:50 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805241455.w4OEtoCa019417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 May 2018 14:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334155 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 334155 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 14:55:51 -0000 Author: andrew Date: Thu May 24 14:55:50 2018 New Revision: 334155 URL: https://svnweb.freebsd.org/changeset/base/334155 Log: Exclude memory from the /reserved-memory mappings with the no-map property set. This memory must not be mapped by the operating system other than under control of the device driver. Obtained from: ABT Systems Ltd Sponsored by: Turing Robotic Industries Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Thu May 24 14:16:22 2018 (r334154) +++ head/sys/arm64/arm64/machdep.c Thu May 24 14:55:50 2018 (r334155) @@ -1063,6 +1063,9 @@ initarm(struct arm64_bootparams *abp) &physmap_idx); arm_physmem_hardware_regions(mem_regions, mem_regions_sz); } + if (fdt_get_reserved_mem(mem_regions, &mem_regions_sz) == 0) + arm_physmem_exclude_regions(mem_regions, mem_regions_sz, + EXFLAG_NODUMP | EXFLAG_NOALLOC); #endif /* Set the pcpu data, this is needed by pmap_bootstrap */ From owner-svn-src-head@freebsd.org Thu May 24 15:04:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8935BEF40C5; Thu, 24 May 2018 15:04:45 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B065709BE; Thu, 24 May 2018 15:04:45 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B48013CDB; Thu, 24 May 2018 15:04:45 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OF4iRF024730; Thu, 24 May 2018 15:04:44 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OF4iYu024729; Thu, 24 May 2018 15:04:44 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805241504.w4OF4iYu024729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 15:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334156 - head/lib/libpmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/lib/libpmcstat X-SVN-Commit-Revision: 334156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:04:45 -0000 Author: mmacy Date: Thu May 24 15:04:44 2018 New Revision: 334156 URL: https://svnweb.freebsd.org/changeset/base/334156 Log: remove All Rights Reserved from new libpmcstat file Modified: head/lib/libpmcstat/libpmcstat_pmu_util.c Modified: head/lib/libpmcstat/libpmcstat_pmu_util.c ============================================================================== --- head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 14:55:50 2018 (r334155) +++ head/lib/libpmcstat/libpmcstat_pmu_util.c Thu May 24 15:04:44 2018 (r334156) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2018, Matthew Macy - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-head@freebsd.org Thu May 24 15:07:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAE82EF4209; Thu, 24 May 2018 15:07:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66B3170DA6; Thu, 24 May 2018 15:07:54 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44B6F13CDC; Thu, 24 May 2018 15:07:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OF7sEa024895; Thu, 24 May 2018 15:07:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OF7sW2024894; Thu, 24 May 2018 15:07:54 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805241507.w4OF7sW2024894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 May 2018 15:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334157 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 334157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:07:54 -0000 Author: andrew Date: Thu May 24 15:07:53 2018 New Revision: 334157 URL: https://svnweb.freebsd.org/changeset/base/334157 Log: Print the physmem tables under a verbose boot. Obtained from: ABT Systems Ltd Sponsored by: Turing Robotic Industries Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Thu May 24 15:04:44 2018 (r334156) +++ head/sys/arm64/arm64/machdep.c Thu May 24 15:07:53 2018 (r334157) @@ -1116,6 +1116,9 @@ initarm(struct arm64_bootparams *abp) if (env != NULL) strlcpy(kernelname, env, sizeof(kernelname)); + if (bootverbose) + arm_physmem_print_tables(); + early_boot = 0; } From owner-svn-src-head@freebsd.org Thu May 24 15:24:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E47EF4BD6; Thu, 24 May 2018 15:24:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ADC7724AD; Thu, 24 May 2018 15:24:43 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2974C1400A; Thu, 24 May 2018 15:24:43 +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 w4OFOhWv034931; Thu, 24 May 2018 15:24:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OFOgGm034930; Thu, 24 May 2018 15:24:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201805241524.w4OFOgGm034930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 24 May 2018 15:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334158 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 334158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:24:43 -0000 Author: hselasky Date: Thu May 24 15:24:42 2018 New Revision: 334158 URL: https://svnweb.freebsd.org/changeset/base/334158 Log: Add function to wait for USB ethernet attach to complete. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/usb/net/usb_ethernet.h Modified: head/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.c Thu May 24 15:07:53 2018 (r334157) +++ head/sys/dev/usb/net/usb_ethernet.c Thu May 24 15:24:42 2018 (r334158) @@ -190,6 +190,17 @@ error: return (error); } +void +uether_ifattach_wait(struct usb_ether *ue) +{ + + UE_LOCK(ue); + usb_proc_mwait(&ue->ue_tq, + &ue->ue_sync_task[0].hdr, + &ue->ue_sync_task[1].hdr); + UE_UNLOCK(ue); +} + static void ue_attach_post_task(struct usb_proc_msg *_task) { Modified: head/sys/dev/usb/net/usb_ethernet.h ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.h Thu May 24 15:07:53 2018 (r334157) +++ head/sys/dev/usb/net/usb_ethernet.h Thu May 24 15:24:42 2018 (r334158) @@ -113,6 +113,7 @@ struct ifnet *uether_getifp(struct usb_ether *); struct mii_data *uether_getmii(struct usb_ether *); void *uether_getsc(struct usb_ether *); int uether_ifattach(struct usb_ether *); +void uether_ifattach_wait(struct usb_ether *); void uether_ifdetach(struct usb_ether *); int uether_ifmedia_upd(struct ifnet *); void uether_init(void *); From owner-svn-src-head@freebsd.org Thu May 24 15:28:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2BE8EF4E94; Thu, 24 May 2018 15:28:17 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8409072950; Thu, 24 May 2018 15:28:17 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61B2F14014; Thu, 24 May 2018 15:28:17 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OFSHAO035108; Thu, 24 May 2018 15:28:17 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OFSHIE035106; Thu, 24 May 2018 15:28:17 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805241528.w4OFSHIE035106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 15:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334159 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:28:18 -0000 Author: mmacy Date: Thu May 24 15:28:16 2018 New Revision: 334159 URL: https://svnweb.freebsd.org/changeset/base/334159 Log: AF_UNIX: assert that we're not acquiring the same lock Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Thu May 24 15:24:42 2018 (r334158) +++ head/sys/kern/uipc_usrreq.c Thu May 24 15:28:16 2018 (r334159) @@ -344,6 +344,7 @@ unp_pcb_rele(struct unpcb *unp) static void unp_pcb_lock2(struct unpcb *unp, struct unpcb *unp2) { + MPASS(unp != unp2); UNP_PCB_UNLOCK_ASSERT(unp); UNP_PCB_UNLOCK_ASSERT(unp2); if ((uintptr_t)unp2 > (uintptr_t)unp) { @@ -375,6 +376,7 @@ unp_pcb_owned_lock2_slowpath(struct unpcb *unp, struct freed = 0; \ UNP_PCB_LOCK_ASSERT((unp)); \ UNP_PCB_UNLOCK_ASSERT((unp2)); \ + MPASS(unp != unp2); \ if (__predict_true(UNP_PCB_TRYLOCK((unp2)))) \ break; \ else if ((uintptr_t)(unp2) > (uintptr_t)(unp)) \ From owner-svn-src-head@freebsd.org Thu May 24 15:28:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBC78EF4EBE; Thu, 24 May 2018 15:28:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82CE372A30; Thu, 24 May 2018 15:28:22 +0000 (UTC) (envelope-from bz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0FEE14015; Thu, 24 May 2018 15:28:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OFSLQM035163; Thu, 24 May 2018 15:28:21 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OFSLEM035162; Thu, 24 May 2018 15:28:21 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201805241528.w4OFSLEM035162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 24 May 2018 15:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334160 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334160 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:28:25 -0000 Author: bz Date: Thu May 24 15:28:21 2018 New Revision: 334160 URL: https://svnweb.freebsd.org/changeset/base/334160 Log: Improve the KASSERT to also have the prison pointer. Helpful when debugging from ddb. Sponsored by: iXsystems, Inc. Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu May 24 15:28:16 2018 (r334159) +++ head/sys/kern/kern_jail.c Thu May 24 15:28:21 2018 (r334160) @@ -2660,7 +2660,7 @@ prison_hold_locked(struct prison *pr) mtx_assert(&pr->pr_mtx, MA_OWNED); KASSERT(pr->pr_ref > 0, - ("Trying to hold dead prison (jid=%d).", pr->pr_id)); + ("Trying to hold dead prison %p (jid=%d).", pr, pr->pr_id)); pr->pr_ref++; } From owner-svn-src-head@freebsd.org Thu May 24 15:31:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 805C1EF5067; Thu, 24 May 2018 15:31:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C52E72CEC; Thu, 24 May 2018 15:31:06 +0000 (UTC) (envelope-from bz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CA4014137; Thu, 24 May 2018 15:31:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OFV5S1037514; Thu, 24 May 2018 15:31:05 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OFV51t037513; Thu, 24 May 2018 15:31:05 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201805241531.w4OFV51t037513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 24 May 2018 15:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334161 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334161 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:31:06 -0000 Author: bz Date: Thu May 24 15:31:05 2018 New Revision: 334161 URL: https://svnweb.freebsd.org/changeset/base/334161 Log: Try to be consistent and spell "vnet" lower case like all the other options (and as we do on command line). Sponsored by: iXsystems, Inc. Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu May 24 15:28:21 2018 (r334160) +++ head/sys/kern/kern_jail.c Thu May 24 15:31:05 2018 (r334161) @@ -3540,7 +3540,7 @@ sysctl_jail_vnet(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_security_jail, OID_AUTO, vnet, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, - sysctl_jail_vnet, "I", "Jail owns VNET?"); + sysctl_jail_vnet, "I", "Jail owns vnet?"); #if defined(INET) || defined(INET6) SYSCTL_UINT(_security_jail, OID_AUTO, jail_max_af_ips, CTLFLAG_RW, From owner-svn-src-head@freebsd.org Thu May 24 15:31:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E36FBEF5077; Thu, 24 May 2018 15:31:08 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.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 8E99472CFC; Thu, 24 May 2018 15:31:08 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.3] (c-73-216-227-39.hsd1.va.comcast.net [73.216.227.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 397D22700226; Thu, 24 May 2018 11:31:02 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 397D22700226 Authentication-Results: duke.cs.duke.edu; dmarc=none header.from=cs.duke.edu DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1527175862; bh=eg9GExN06IlIHd4Ok5qsCAuosLykBhsHB2KuX9jjpcU=; h=Subject:To:From:Date:From; b=Iss4c4nHKj12KsR5o3WSCyEgY20Gk8bxXZZIpywgmAiiNGP4W93XfwYx8hezeMvWl Osm6Jri70SbKb+7s1HpKVWQ4jZB3pGC4fe7yUMeqljBpi6fO/anc2opf7+ebZZZsLi M5aR4Bgl/KfY5NW6oYxKTRz+uYnfAn/ucPN3Ytq0/pRrJfs3224FFg5HqfDhBZBy/5 crsmVmTlWV2DTLPtpcVsRIW8uPALItT04l6w/4/J3BULe+ChvyFTMMcr5pdUNLWJcN +0cliIVMnKzsb3oMDQy4r9kaPf19vXgU6YZVVC8iv/Nk5dlfKiJzX67U5SRvGeFLb3 6VQcVHBed7UVA== Subject: Re: svn commit: r334143 - head/sys/dev/cxgbe To: Navdeep Parhar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805241018.w4OAIEgO076752@repo.freebsd.org> From: Andrew Gallatin Message-ID: Date: Thu, 24 May 2018 11:31:00 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201805241018.w4OAIEgO076752@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:31:09 -0000 On 05/24/18 06:18, Navdeep Parhar wrote: > Log: > cxgbe(4): Data path for rate-limited tx. > > This is hardware support for the SO_MAX_PACING_RATE sockopt (see > setsockopt(2)), which is available in kernels built with "options > RATELIMIT". > > Relnotes: Yes > Sponsored by: Chelsio Communications Hurray! Thanks so much for supporting this! Drew From owner-svn-src-head@freebsd.org Thu May 24 15:32:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05E98EF534E; Thu, 24 May 2018 15:32:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7A49731A7; Thu, 24 May 2018 15:32:50 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 88B19141A4; Thu, 24 May 2018 15:32:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OFWoEx039898; Thu, 24 May 2018 15:32:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OFWnB6039893; Thu, 24 May 2018 15:32:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805241532.w4OFWnB6039893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 May 2018 15:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334162 - in head/sys: arm/arm arm/include arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm/arm arm/include arm64/arm64 X-SVN-Commit-Revision: 334162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:32:51 -0000 Author: andrew Date: Thu May 24 15:32:49 2018 New Revision: 334162 URL: https://svnweb.freebsd.org/changeset/base/334162 Log: Allow us to read the physmap data into our own array and use this to build the DMAP region on arm64. We already have the needed information to build these tables, we just need to extract it. This significantly simplifies the code. Obtained from: ABT Systems Ltd Sponsored by: Turing Robotic Industries Modified: head/sys/arm/arm/physmem.c head/sys/arm/include/physmem.h head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/pmap.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Thu May 24 15:31:05 2018 (r334161) +++ head/sys/arm/arm/physmem.c Thu May 24 15:32:49 2018 (r334162) @@ -375,6 +375,13 @@ void arm_physmem_exclude_region(vm_paddr_t pa, vm_size excnt = insert_region(exregions, excnt, pa, sz, exflags); } +size_t +arm_physmem_avail(vm_paddr_t *avail, size_t maxavail) +{ + + return (regions_to_avail(avail, EXFLAG_NOALLOC, maxavail, NULL, NULL)); +} + /* * Process all the regions added earlier into the global avail lists. * Modified: head/sys/arm/include/physmem.h ============================================================================== --- head/sys/arm/include/physmem.h Thu May 24 15:31:05 2018 (r334161) +++ head/sys/arm/include/physmem.h Thu May 24 15:32:49 2018 (r334162) @@ -56,6 +56,7 @@ extern vm_paddr_t arm_physmem_kernaddr; void arm_physmem_hardware_region(uint64_t pa, uint64_t sz); void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t flags); +size_t arm_physmem_avail(vm_paddr_t *avail, size_t maxavail); void arm_physmem_init_kernel_globals(void); void arm_physmem_print_tables(void); Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Thu May 24 15:31:05 2018 (r334161) +++ head/sys/arm64/arm64/machdep.c Thu May 24 15:32:49 2018 (r334162) @@ -106,10 +106,6 @@ static struct trapframe proc0_tf; int early_boot = 1; int cold = 1; -#define PHYSMAP_SIZE (2 * (VM_PHYSSEG_MAX - 1)) -vm_paddr_t physmap[PHYSMAP_SIZE]; -u_int physmap_idx; - struct kva_md_info kmi; int64_t dcache_line_size; /* The minimum D cache line size */ @@ -724,89 +720,9 @@ typedef struct { uint64_t attr; } EFI_MEMORY_DESCRIPTOR; -static int -add_physmap_entry(uint64_t base, uint64_t length, vm_paddr_t *physmap, - u_int *physmap_idxp) -{ - u_int i, insert_idx, _physmap_idx; - - _physmap_idx = *physmap_idxp; - - if (length == 0) - return (1); - - /* - * Find insertion point while checking for overlap. Start off by - * assuming the new entry will be added to the end. - */ - insert_idx = _physmap_idx; - for (i = 0; i <= _physmap_idx; i += 2) { - if (base < physmap[i + 1]) { - if (base + length <= physmap[i]) { - insert_idx = i; - break; - } - if (boothowto & RB_VERBOSE) - printf( - "Overlapping memory regions, ignoring second region\n"); - return (1); - } - } - - /* See if we can prepend to the next entry. */ - if (insert_idx <= _physmap_idx && - base + length == physmap[insert_idx]) { - physmap[insert_idx] = base; - return (1); - } - - /* See if we can append to the previous entry. */ - if (insert_idx > 0 && base == physmap[insert_idx - 1]) { - physmap[insert_idx - 1] += length; - return (1); - } - - _physmap_idx += 2; - *physmap_idxp = _physmap_idx; - if (_physmap_idx == PHYSMAP_SIZE) { - printf( - "Too many segments in the physical address map, giving up\n"); - return (0); - } - - /* - * Move the last 'N' entries down to make room for the new - * entry if needed. - */ - for (i = _physmap_idx; i > insert_idx; i -= 2) { - physmap[i] = physmap[i - 2]; - physmap[i + 1] = physmap[i - 1]; - } - - /* Insert the new entry. */ - physmap[insert_idx] = base; - physmap[insert_idx + 1] = base + length; - return (1); -} - -#ifdef FDT static void -add_fdt_mem_regions(struct mem_region *mr, int mrcnt, vm_paddr_t *physmap, - u_int *physmap_idxp) +add_efi_map_entries(struct efi_map_header *efihdr) { - - for (int i = 0; i < mrcnt; i++) { - if (!add_physmap_entry(mr[i].mr_start, mr[i].mr_size, physmap, - physmap_idxp)) - break; - } -} -#endif - -static void -add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, - u_int *physmap_idxp) -{ struct efi_md *map, *p; const char *type; size_t efisz; @@ -897,9 +813,6 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_ arm_physmem_hardware_region(p->md_phys, p->md_pages * PAGE_SIZE); - if (!add_physmap_entry(p->md_phys, (p->md_pages * PAGE_SIZE), - physmap, physmap_idxp)) - break; } } @@ -1048,19 +961,16 @@ initarm(struct arm64_bootparams *abp) lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); /* Load the physical memory ranges */ - physmap_idx = 0; efihdr = (struct efi_map_header *)preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_EFI_MAP); if (efihdr != NULL) - add_efi_map_entries(efihdr, physmap, &physmap_idx); + add_efi_map_entries(efihdr); #ifdef FDT else { /* Grab physical memory regions information from device tree. */ if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, NULL) != 0) panic("Cannot get physical memory regions"); - add_fdt_mem_regions(mem_regions, mem_regions_sz, physmap, - &physmap_idx); arm_physmem_hardware_regions(mem_regions, mem_regions_sz); } if (fdt_get_reserved_mem(mem_regions, &mem_regions_sz) == 0) Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Thu May 24 15:31:05 2018 (r334161) +++ head/sys/arm64/arm64/pmap.c Thu May 24 15:32:49 2018 (r334162) @@ -259,6 +259,10 @@ CTASSERT((DMAP_MAX_ADDRESS & ~L0_OFFSET) == DMAP_MAX_ #define DMAP_TABLES ((DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS) >> L0_SHIFT) extern pt_entry_t pagetable_dmap[]; +#define PHYSMAP_SIZE (2 * (VM_PHYSSEG_MAX - 1)) +static vm_paddr_t physmap[PHYSMAP_SIZE]; +static u_int physmap_idx; + static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); static int superpages_enabled = 1; @@ -708,6 +712,9 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ /* Assume the address we were loaded to is a valid physical address */ min_pa = max_pa = KERNBASE - kern_delta; + + physmap_idx = arm_physmem_avail(physmap, nitems(physmap)); + physmap_idx /= 2; /* * Find the minimum physical address. physmap is sorted, From owner-svn-src-head@freebsd.org Thu May 24 15:47:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38C9EEF5898; Thu, 24 May 2018 15:47:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF38A7399C; Thu, 24 May 2018 15:47:15 +0000 (UTC) (envelope-from bz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD2391434C; Thu, 24 May 2018 15:47:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OFlFWU045307; Thu, 24 May 2018 15:47:15 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OFlFIq045306; Thu, 24 May 2018 15:47:15 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201805241547.w4OFlFIq045306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 24 May 2018 15:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334163 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 334163 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:47:16 -0000 Author: bz Date: Thu May 24 15:47:15 2018 New Revision: 334163 URL: https://svnweb.freebsd.org/changeset/base/334163 Log: Add Peraso Technologies, Inc. to the list. Sponsored by: Turing Robotic Industries Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu May 24 15:32:49 2018 (r334162) +++ head/sys/dev/usb/usbdevs Thu May 24 15:47:15 2018 (r334163) @@ -751,6 +751,7 @@ vendor TRIPPLITE 0x2478 Tripp-Lite vendor HIROSE 0x2631 Hirose Electric vendor NHJ 0x2770 NHJ vendor THINGM 0x27b8 ThingM +vendor PERASO 0x2932 Peraso Technologies, Inc. vendor PLANEX 0x2c02 Planex Communications vendor QUECTEL 0x2c7c Quectel Wireless Solutions vendor VIDZMEDIA 0x3275 VidzMedia Pte Ltd @@ -3581,6 +3582,9 @@ product PERACOM SERIAL1 0x0001 Serial product PERACOM ENET 0x0002 Ethernet product PERACOM ENET3 0x0003 At Home Ethernet product PERACOM ENET2 0x0005 Ethernet + +/* Peraso Technologies, Inc products */ +product PERASO PRS4001 0x4001 PRS4001 WLAN /* Philips products */ product PHILIPS DSS350 0x0101 DSS 350 Digital Speaker System From owner-svn-src-head@freebsd.org Thu May 24 15:54:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67A29EF60FD for ; Thu, 24 May 2018 15:54:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED852744F1 for ; Thu, 24 May 2018 15:54:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id c9-v6so2855060iob.12 for ; Thu, 24 May 2018 08:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=3reEhnWYktJnAdYLfA28+t1S48hIlei8AnrPfqOWFK4=; b=MX/s2qybOgH4HTO3WaEdWFMb/vCYTk9HzaIpNrCEBubW56NiFI7pzXJfWx4j+5Losi kjuA8CHXZb4xF3IT6KAZo9NCfhZa5zVs44JZU9mSEu7ubSbD55Y8G1JLruLWHelzXD2k JM87c3DG7Cgqg/NAHKk3cCY8AA7SqdU37dWJ9oa6exKOsDrQVdSXMlADjV/6xNAoI7Tq nv9KuBj4DW89kHOCgRG86YNAy11E3/4DUEVxCa3fWmXz7zOVH7Az3kWjHaBJUOMJm52c bNzaYVDFdlavIOgPEF71iRC2SnLtrubVdYClUL8rzSZTksp7XoSZNa+ezr/PjA0cx1ZW EqKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=3reEhnWYktJnAdYLfA28+t1S48hIlei8AnrPfqOWFK4=; b=rL2D9Kdh1veB3kQfC74s5P94xObJagjP5uQ0BBRvdNVOuAXYMBelxhIivSW7z4uMHy nrWY3aZgnz6ypXnrsbX84h5NNr0yKf/cFlXb4i8SA/hlFX7mQU17F8BLfOINzDKB82+y PzMFDHr59o46LUR1fwoYv8pU3TWzKFmLAoHgg1GbgpMJF8ilSQroTemESk5IYNjM0UdQ 2FMQ4FGWbQOW2U/yqOMvGA1073Xff0wFoL49XP+RqSW5VMzrn+4vUyfT082FioFQ9d7Q z6DFsGqdjWRGZu2yvy94iuClgC+4Z7eZQRXL9qgpZQVZoAXDtDfEx2wZQO4U6eBPze2Y 5Qpg== X-Gm-Message-State: ALKqPwdbhwg+zXD1EVdzJYpaiz5S8VQv6ONphZvG6xqZBffNAiMoCCA7 FeduzJ0j6Fwx5ydjXLEMjRAwkOz1ehUoczYqL9TY2g== X-Google-Smtp-Source: ADUXVKJAIrT4evpVkbxP+TOmS84Jv/QvwFgd059ZZvobYaoX/OCEvXXheLCZRSfYl22JdHcIcn0DqrKPIoFrhHIXGVk= X-Received: by 2002:a6b:df09:: with SMTP id w9-v6mr329482iog.168.1527177265078; Thu, 24 May 2018 08:54:25 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:d028:0:0:0:0:0 with HTTP; Thu, 24 May 2018 08:54:23 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> From: Warner Losh Date: Thu, 24 May 2018 09:54:23 -0600 X-Google-Sender-Auth: uQx4MnvPw2yxBW-gWJWrzzgHrRU Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Matthew Macy Cc: Michael Tuexen , Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:54:26 -0000 On Thu, May 24, 2018 at 12:36 AM, Matthew Macy wrote: > On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen > wrote: > >> On 24. May 2018, at 06:51, Matthew Macy wrote: > >> > >> Warnings find bugs PERIOD. Although most are not useful, I've found > > Some warnings indicate bugs, some warnings are just wrong. If you > > have a "may be used uninitialized" warning being a false positive, you > > may silences the warning by just set it to zero in the declaration and > > you silence it. Other compilers might then correctly report an > > assignment without affect... > > I have yet to see a double assignment be flagged as assignment without > effect. If it _does_ occur then we have to disable the warning on the > compiler that we have less faith in. > Coverity does exactly that. Warner From owner-svn-src-head@freebsd.org Thu May 24 15:57:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDD2FEF62D5; Thu, 24 May 2018 15:57:48 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B9C474727; Thu, 24 May 2018 15:57:48 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 36DD91200E; Thu, 24 May 2018 15:57:48 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f171.google.com with SMTP id g1-v6so2899382iob.2; Thu, 24 May 2018 08:57:48 -0700 (PDT) X-Gm-Message-State: ALKqPweYAGbiJ0CwOSDmhuSvM7618CYoA71lT88ptdYUdGqnGB8ceO+h ZifvmAEeYrk+0e+XZMtm8H3AeNa6AKMrv/Rmm+U= X-Google-Smtp-Source: ADUXVKI6HaHKcyZeEwbjMrKQdk0H11DS+hd4omXclQ683P1FGenDAVrSbT0D9aEUVhzplPn3h3nP3rCDr35c3/7pBWA= X-Received: by 2002:a6b:6707:: with SMTP id b7-v6mr2053668ioc.132.1527177467432; Thu, 24 May 2018 08:57:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Thu, 24 May 2018 08:57:46 -0700 (PDT) In-Reply-To: References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> From: Matthew Macy Date: Thu, 24 May 2018 08:57:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Warner Losh Cc: Michael Tuexen , Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:57:48 -0000 On Thu, May 24, 2018 at 8:54 AM, Warner Losh wrote: > > > On Thu, May 24, 2018 at 12:36 AM, Matthew Macy wrote: >> >> On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen >> wrote: >> >> On 24. May 2018, at 06:51, Matthew Macy wrote: >> >> >> >> Warnings find bugs PERIOD. Although most are not useful, I've found >> > Some warnings indicate bugs, some warnings are just wrong. If you >> > have a "may be used uninitialized" warning being a false positive, you >> > may silences the warning by just set it to zero in the declaration and >> > you silence it. Other compilers might then correctly report an >> > assignment without affect... >> >> I have yet to see a double assignment be flagged as assignment without >> effect. If it _does_ occur then we have to disable the warning on the >> compiler that we have less faith in. > > > Coverity does exactly that. :-( From owner-svn-src-head@freebsd.org Thu May 24 15:58:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99B52EF631D for ; Thu, 24 May 2018 15:58:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 258F574860 for ; Thu, 24 May 2018 15:58:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x243.google.com with SMTP id f21-v6so2871270iob.13 for ; Thu, 24 May 2018 08:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=lIjHncLEdGVQHMDaaGSORR5m9qycmpQk2OOvkuNQrKo=; b=OkyHVYpKcamVfi/3+kWnAp6bqdYDyb7AQVuuPhDZg+k/Bv6oDwHPrGMYunWCU9+lpr Tj6J3T/oewfF8g/nABL67y8YzO24ChV/ihYFG4N87ePEymg9j3fm4bX1fcs/tTsr1r/E kKZcrrSSuIwBTrC2b9tJ4excco1oZphRCq9ySw9nfN422KnpIw6AcwhjfpiFsVeFu3LM czB9SbVvmSeU1ck355gBdgdVGA/ZURtjxWv9Nxulq6xRk0zfgaZIuYudjEYFagQq1bmQ xHqFKRM9EPxC2zLBFoyeUm246TMOL63N3WK5trTZCOkqoGqw36x7mu8VcNQd/DIfXhVA RzWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=lIjHncLEdGVQHMDaaGSORR5m9qycmpQk2OOvkuNQrKo=; b=fXlntgdxLw94VclNo1phiqvUxJEe1NSQdbj7cLLBQGZVox9DxLvuVGFI5er7+hC7a9 BS072VxDNxewSuTb78IaOdGXyd6tHMw2U3HMqmf7VWc/8DMspJYdMrGNU4bSCzZ9pLq1 q4XfwppzjYru/h6wJ+0jQv/V0W+yyqg4wg9q0Qt23m0fUs3FrwkxLMuLG/rSkMZqyWHS J/68Xm2RYOjbvExPxUv3ugqlDHDcmD2T6qXwINy7Dzl8rikCD1a89354oxpD+7PrBHGy yK9GwxfI76KPmYwokiCLo6vppl0FSG3apvWd4PxrCGPmjiJx7uIAtiHnS7Al1PJf1/8W AZEA== X-Gm-Message-State: ALKqPwdbpS6lvVB00+VeRMazUyXJaGYL0aZX4Do+kOdOwTjbyoDzgMIA hk0m2csFhmJoZ9gkM1Bi4RjZq4YYWVPdrmuM6x5mWg== X-Google-Smtp-Source: ADUXVKJysdfQfpFl9NkN+6LELWxtiNtTyfUy0ghglTX9vh8j1D2XHZCB+SaxCGuyYj6cjmyAf4epyIaUPJUKVnqqQjE= X-Received: by 2002:a6b:5a0d:: with SMTP id o13-v6mr7185100iob.39.1527177493458; Thu, 24 May 2018 08:58:13 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:d028:0:0:0:0:0 with HTTP; Thu, 24 May 2018 08:58:12 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> From: Warner Losh Date: Thu, 24 May 2018 09:58:12 -0600 X-Google-Sender-Auth: ILXSzuMLQv1qiY0EUYL0vqHw60w Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Matthew Macy Cc: Michael Tuexen , Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:58:15 -0000 On Thu, May 24, 2018 at 12:53 AM, Matthew Macy wrote: > On Wed, May 23, 2018 at 11:42 PM, Michael Tuexen > wrote: > >> On 24. May 2018, at 08:36, Matthew Macy wrote: > >> > >> On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen > >> wrote: > >>>> On 24. May 2018, at 06:51, Matthew Macy wrote: > >>>> > >>>> Warnings find bugs PERIOD. Although most are not useful, I've found > >>> Some warnings indicate bugs, some warnings are just wrong. If you > >>> have a "may be used uninitialized" warning being a false positive, you > >>> may silences the warning by just set it to zero in the declaration and > >>> you silence it. Other compilers might then correctly report an > >>> assignment without affect... > >> > >> I have yet to see a double assignment be flagged as assignment without > >> effect. If it _does_ occur then we have to disable the warning on the > >> compiler that we have less faith in. > > Have seen it in the past in a difference project... But you miss my > point: > > > > Not all warnings indicate bugs PERIOD. Some warning are just wrong... > > Have you read my follow up? _Many_ Many warnings are wrong. Please > respond to that on what the global policy should be. The value of any > one particular instance of a warning does not merit discussion. > The global policy has never been 'fix all warnings no matter what.' It's been 'Look at the warning. If it's a false positive, use judgement about whether or not to stifle the compiler.' There are cases I've run into that it was impossible to silence the warnings (apart form adding command line stuff) for a particular bit of code. Do it one way gcc 4.2 complains. Do it another clang complains. appease both and gcc 6 had heart-burn. So don't gratuitously commit code that fixes warnings on gcc 8. If the warning points out a legitimate bug, then that's no brainer yes. If it's a false positive, then it's less clear and often times many factors may need to be weighed. Warner > -M > > > > > > > > > > > > , in this case the assignment should be added with > >>>>> a comment /* pacify gcc */. > >>>>> > >>>>> On Wed, May 23, 2018 at 03:59:33PM -0700, Matthew Macy wrote: > >>>>> M> On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff < > glebius@freebsd.org> wrote: > >>>>> M> > The initialization isn't useful. > >>>>> M> > >>>>> M> It silences a gcc warning. So yes it is. It's this exchange which > is not useful. > >>>>> M> > >>>>> M> -M > >>>>> M> > >>>>> M> > >>>>> M> > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: > >>>>> M> > M> Talk to the gcc devs. The warning is useful even if there > are false positives. > >>>>> M> > M> > >>>>> M> > M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff < > glebius@freebsd.org> wrote: > >>>>> M> > M> > Hi, > >>>>> M> > M> > > >>>>> M> > M> > On Sat, May 19, 2018 at 05:10:52AM +0000, Matt Macy wrote: > >>>>> M> > M> > M> Author: mmacy > >>>>> M> > M> > M> Date: Sat May 19 05:10:51 2018 > >>>>> M> > M> > M> New Revision: 333860 > >>>>> M> > M> > M> URL: https://svnweb.freebsd.org/changeset/base/333860 > >>>>> M> > M> > M> > >>>>> M> > M> > M> Log: > >>>>> M> > M> > M> sendfile: annotate unused value and ensure that > npages is actually initialized > >>>>> M> > M> > M> > >>>>> M> > M> > M> Modified: > >>>>> M> > M> > M> head/sys/kern/kern_sendfile.c > >>>>> M> > M> > M> > >>>>> M> > M> > M> Modified: head/sys/kern/kern_sendfile.c > >>>>> M> > M> > M> ============================== > ================================================ > >>>>> M> > M> > M> --- head/sys/kern/kern_sendfile.c Sat May 19 > 05:09:10 2018 (r333859) > >>>>> M> > M> > M> +++ head/sys/kern/kern_sendfile.c Sat May 19 > 05:10:51 2018 (r333860) > >>>>> M> > M> > M> @@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, > struct sf_io *sfio, o > >>>>> M> > M> > M> } > >>>>> M> > M> > M> > >>>>> M> > M> > M> for (int i = 0; i < npages;) { > >>>>> M> > M> > M> - int j, a, count, rv; > >>>>> M> > M> > M> + int j, a, count, rv __unused; > >>>>> M> > M> > M> > >>>>> M> > M> > M> /* Skip valid pages. */ > >>>>> M> > M> > M> if (vm_page_is_valid(pa[i], vmoff(i, off) > & PAGE_MASK, > >>>>> M> > M> > M> @@ -688,6 +688,7 @@ retry_space: > >>>>> M> > M> > M> if (space == 0) { > >>>>> M> > M> > M> sfio = NULL; > >>>>> M> > M> > M> nios = 0; > >>>>> M> > M> > M> + npages = 0; > >>>>> M> > M> > M> goto prepend_header; > >>>>> M> > M> > M> } > >>>>> M> > M> > M> hdr_uio = NULL; > >>>>> M> > M> > > >>>>> M> > M> > This initialization is redundant and a compiler warning if > exists is wrong. > >>>>> M> > M> > > >>>>> M> > M> > If we jump down to prepend_header with nios == 0, we won't > ever use npages. > >>>>> M> > M> > > >>>>> M> > M> > -- > >>>>> M> > M> > Gleb Smirnoff > >>>>> M> > > >>>>> M> > -- > >>>>> M> > Gleb Smirnoff > >>>>> > >>>>> -- > >>>>> Gleb Smirnoff > >>>> > >>> > > > > From owner-svn-src-head@freebsd.org Thu May 24 16:00:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75C3EEF645D; Thu, 24 May 2018 16:00:20 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BD8974A2C; Thu, 24 May 2018 16:00:20 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id D5FC112010; Thu, 24 May 2018 16:00:19 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-io0-f169.google.com with SMTP id d11-v6so2893610iof.11; Thu, 24 May 2018 09:00:19 -0700 (PDT) X-Gm-Message-State: ALKqPwehGXBwKLIqk/A98t1DoeYhiu97j88Mwhqh6n8j1DL5h5ljmqQW KQ1x5qAZ+1IrKvqzjxgWxrYMQb+te8Ap6hJvyjs= X-Google-Smtp-Source: ADUXVKImno6fbgvmZZRQeNWYj3imVQl2rkFCUXNREcjvjoSYsFkgL5pAtKEXS4LfjlkMWyyK7mn4n4fgEBDIkIc6AZg= X-Received: by 2002:a6b:6707:: with SMTP id b7-v6mr2062618ioc.132.1527177619407; Thu, 24 May 2018 09:00:19 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Thu, 24 May 2018 09:00:19 -0700 (PDT) In-Reply-To: References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> From: Matthew Macy Date: Thu, 24 May 2018 09:00:19 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Warner Losh Cc: Michael Tuexen , Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 16:00:20 -0000 On Thu, May 24, 2018 at 8:58 AM, Warner Losh wrote: > > > On Thu, May 24, 2018 at 12:53 AM, Matthew Macy wrote: >> >> On Wed, May 23, 2018 at 11:42 PM, Michael Tuexen >> wrote: >> >> On 24. May 2018, at 08:36, Matthew Macy wrote: >> >> >> >> On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen >> >> wrote: >> >>>> On 24. May 2018, at 06:51, Matthew Macy wrote: >> >>>> >> >>>> Warnings find bugs PERIOD. Although most are not useful, I've found >> >>> Some warnings indicate bugs, some warnings are just wrong. If you >> >>> have a "may be used uninitialized" warning being a false positive, you >> >>> may silences the warning by just set it to zero in the declaration and >> >>> you silence it. Other compilers might then correctly report an >> >>> assignment without affect... >> >> >> >> I have yet to see a double assignment be flagged as assignment without >> >> effect. If it _does_ occur then we have to disable the warning on the >> >> compiler that we have less faith in. >> > Have seen it in the past in a difference project... But you miss my >> > point: >> > >> > Not all warnings indicate bugs PERIOD. Some warning are just wrong... >> >> Have you read my follow up? _Many_ Many warnings are wrong. Please >> respond to that on what the global policy should be. The value of any >> one particular instance of a warning does not merit discussion. > > > The global policy has never been 'fix all warnings no matter what.' It's > been 'Look at the warning. If it's a false positive, use judgement about > whether or not to stifle the compiler.' There are cases I've run into that > it was impossible to silence the warnings (apart form adding command line > stuff) for a particular bit of code. Do it one way gcc 4.2 complains. Do it > another clang complains. appease both and gcc 6 had heart-burn. > > So don't gratuitously commit code that fixes warnings on gcc 8. If the > warning points out a legitimate bug, then that's no brainer yes. If it's a > false positive, then it's less clear and often times many factors may need > to be weighed. Non-actionable warnings are actively detrimental to workflow. They hide real issues and lead to apathy by developers. If pacifying a warning is considered undesirable it should be disabled by default with perhaps a separate mode for enabling it. -M From owner-svn-src-head@freebsd.org Thu May 24 16:07:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBE71EF6AE1; Thu, 24 May 2018 16:07:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E11775519; Thu, 24 May 2018 16:07:48 +0000 (UTC) (envelope-from andrew@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A78414684; Thu, 24 May 2018 16:07:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OG7mSx055385; Thu, 24 May 2018 16:07:48 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OG7mKx055384; Thu, 24 May 2018 16:07:48 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201805241607.w4OG7mKx055384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 24 May 2018 16:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334164 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 334164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 16:07:49 -0000 Author: andrew Date: Thu May 24 16:07:47 2018 New Revision: 334164 URL: https://svnweb.freebsd.org/changeset/base/334164 Log: Remove physmap from the arm64 machdep.h. This was missed in r334162. Modified: head/sys/arm64/include/machdep.h Modified: head/sys/arm64/include/machdep.h ============================================================================== --- head/sys/arm64/include/machdep.h Thu May 24 15:47:15 2018 (r334163) +++ head/sys/arm64/include/machdep.h Thu May 24 16:07:47 2018 (r334164) @@ -45,9 +45,6 @@ enum arm64_bus { extern enum arm64_bus arm64_bus_method; -extern vm_paddr_t physmap[]; -extern u_int physmap_idx; - void dbg_init(void); void initarm(struct arm64_bootparams *); extern void (*pagezero)(void *); From owner-svn-src-head@freebsd.org Thu May 24 16:25:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D4E0EF7390; Thu, 24 May 2018 16:25:20 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D129E7623D; Thu, 24 May 2018 16:25:19 +0000 (UTC) (envelope-from brooks@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2575149BC; Thu, 24 May 2018 16:25:19 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OGPJ6L065505; Thu, 24 May 2018 16:25:19 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OGPIGh065498; Thu, 24 May 2018 16:25:18 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201805241625.w4OGPIGh065498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 24 May 2018 16:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334165 - in head/sys: amd64/linux amd64/linux32 i386/linux kern sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 i386/linux kern sys X-SVN-Commit-Revision: 334165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 16:25:20 -0000 Author: brooks Date: Thu May 24 16:25:18 2018 New Revision: 334165 URL: https://svnweb.freebsd.org/changeset/base/334165 Log: Avoid two suword() calls per auxarg entry. Instead, construct an auxargs array and copy it out all at once. Use an array of Elf_Auxinfo rather than pairs of Elf_Addr * to represent the array. This is the correct type where pairs of words just happend to work. To reduce the size of the diff, AUXARGS_ENTRY is altered to act on this array rather than introducing a new macro. Return errors on copyout() and suword() failures and handle them in the caller. Incidentally fixes AT_RANDOM and AT_EXECFN in 32-bit linux on amd64 which incorrectly used AUXARG_ENTRY instead of AUXARGS_ENTRY_32 (now removed due to the use of proper types). Reviewed by: kib Comments from: emaste, jhb Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15485 Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/i386/linux/linux_sysvec.c head/sys/kern/imgact_elf.c head/sys/kern/kern_exec.c head/sys/sys/imgact_elf.h Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Thu May 24 16:07:47 2018 (r334164) +++ head/sys/amd64/linux/linux_sysvec.c Thu May 24 16:25:18 2018 (r334165) @@ -240,11 +240,11 @@ static int linux_fixup_elf(register_t **stack_base, struct image_params *imgp) { Elf_Auxargs *args; - Elf_Addr *base; - Elf_Addr *pos; + Elf_Auxinfo *argarray, *pos; + Elf_Addr *auxbase, *base; struct ps_strings *arginfo; struct proc *p; - int issetugid; + int error, issetugid; p = imgp->proc; arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; @@ -253,7 +253,9 @@ linux_fixup_elf(register_t **stack_base, struct image_ ("unsafe linux_fixup_elf(), should be curproc")); base = (Elf64_Addr *)*stack_base; args = (Elf64_Auxargs *)imgp->auxargs; - pos = base + (imgp->args->argc + imgp->args->envc + 2); + auxbase = base + imgp->args->argc + 1 + imgp->args->envc + 1; + argarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, + M_WAITOK | M_ZERO); issetugid = p->p_flag & P_SUGID ? 1 : 0; AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, @@ -281,9 +283,17 @@ linux_fixup_elf(register_t **stack_base, struct image_ AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); imgp->auxargs = NULL; + KASSERT((pos - argarray) / sizeof(*pos) <= LINUX_AT_COUNT, + ("Too many auxargs")); + error = copyout(argarray, auxbase, sizeof(*argarray) * LINUX_AT_COUNT); + free(argarray, M_TEMP); + if (error != 0) + return (error); + base--; - suword(base, (uint64_t)imgp->args->argc); + if (suword(base, (uint64_t)imgp->args->argc) == -1) + return (EFAULT); *stack_base = (register_t *)base; return (0); Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Thu May 24 16:07:47 2018 (r334164) +++ head/sys/amd64/linux32/linux32_sysvec.c Thu May 24 16:25:18 2018 (r334165) @@ -89,12 +89,6 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(linux, 1); -#define AUXARGS_ENTRY_32(pos, id, val) \ - do { \ - suword32(pos++, id); \ - suword32(pos++, val); \ - } while (0) - /* * Allow the sendsig functions to use the ldebug() facility even though they * are not syscalls themselves. Map them to syscall 0. This is slightly less @@ -202,10 +196,10 @@ static int linux_fixup_elf(register_t **stack_base, struct image_params *imgp) { Elf32_Auxargs *args; - Elf32_Addr *base; - Elf32_Addr *pos; + Elf32_Auxinfo *argarray, *pos; + Elf32_Addr *auxbase, *base; struct linux32_ps_strings *arginfo; - int issetugid; + int error, issetugid; arginfo = (struct linux32_ps_strings *)LINUX32_PS_STRINGS; @@ -213,13 +207,15 @@ linux_fixup_elf(register_t **stack_base, struct image_ ("unsafe linux_fixup_elf(), should be curproc")); base = (Elf32_Addr *)*stack_base; args = (Elf32_Auxargs *)imgp->auxargs; - pos = base + (imgp->args->argc + imgp->args->envc + 2); + auxbase = base + (imgp->args->argc + 1 + imgp->args->envc + 1); + argarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, + M_WAITOK | M_ZERO); issetugid = imgp->proc->p_flag & P_SUGID ? 1 : 0; - AUXARGS_ENTRY_32(pos, LINUX_AT_SYSINFO_EHDR, + AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, imgp->proc->p_sysent->sv_shared_page_base); - AUXARGS_ENTRY_32(pos, LINUX_AT_SYSINFO, linux32_vsyscall); - AUXARGS_ENTRY_32(pos, LINUX_AT_HWCAP, cpu_feature); + AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO, linux32_vsyscall); + AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature); /* * Do not export AT_CLKTCK when emulating Linux kernel prior to 2.4.0, @@ -230,32 +226,40 @@ linux_fixup_elf(register_t **stack_base, struct image_ * Also see linux_times() implementation. */ if (linux_kernver(curthread) >= LINUX_KERNVER_2004000) - AUXARGS_ENTRY_32(pos, LINUX_AT_CLKTCK, stclohz); - AUXARGS_ENTRY_32(pos, AT_PHDR, args->phdr); - AUXARGS_ENTRY_32(pos, AT_PHENT, args->phent); - AUXARGS_ENTRY_32(pos, AT_PHNUM, args->phnum); - AUXARGS_ENTRY_32(pos, AT_PAGESZ, args->pagesz); - AUXARGS_ENTRY_32(pos, AT_FLAGS, args->flags); - AUXARGS_ENTRY_32(pos, AT_ENTRY, args->entry); - AUXARGS_ENTRY_32(pos, AT_BASE, args->base); - AUXARGS_ENTRY_32(pos, LINUX_AT_SECURE, issetugid); - AUXARGS_ENTRY_32(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); - AUXARGS_ENTRY_32(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); - AUXARGS_ENTRY_32(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); - AUXARGS_ENTRY_32(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); - AUXARGS_ENTRY_32(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); + AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); + AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); + AUXARGS_ENTRY(pos, AT_PHENT, args->phent); + AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum); + AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); + AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); + AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); + AUXARGS_ENTRY(pos, AT_BASE, args->base); + AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); + AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); + AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); + AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); + AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); + AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, PTROUT(imgp->canary)); if (imgp->execpathp != 0) AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp)); if (args->execfd != -1) - AUXARGS_ENTRY_32(pos, AT_EXECFD, args->execfd); - AUXARGS_ENTRY_32(pos, AT_NULL, 0); + AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); + AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); imgp->auxargs = NULL; + KASSERT((pos - argarray) / sizeof(*pos) <= AT_COUNT, + ("Too many auxargs")); + error = copyout(&argarray[0], auxbase, sizeof(*argarray) * AT_COUNT); + free(argarray, M_TEMP); + if (error != 0) + return (error); + base--; - suword32(base, (uint32_t)imgp->args->argc); + if (suword32(base, (uint32_t)imgp->args->argc) == -1) + return (EFAULT); *stack_base = (register_t *)base; return (0); } Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Thu May 24 16:07:47 2018 (r334164) +++ head/sys/i386/linux/linux_sysvec.c Thu May 24 16:25:18 2018 (r334165) @@ -207,10 +207,10 @@ linux_fixup_elf(register_t **stack_base, struct image_ { struct proc *p; Elf32_Auxargs *args; - Elf32_Addr *uplatform; + Elf32_Auxinfo *argarray, *pos; + Elf32_Addr *auxbase, *uplatform; struct ps_strings *arginfo; - register_t *pos; - int issetugid; + int error, issetugid; KASSERT(curthread->td_proc == imgp->proc, ("unsafe linux_fixup_elf(), should be curproc")); @@ -220,7 +220,9 @@ linux_fixup_elf(register_t **stack_base, struct image_ arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; uplatform = (Elf32_Addr *)((caddr_t)arginfo - linux_szplatform); args = (Elf32_Auxargs *)imgp->auxargs; - pos = *stack_base + (imgp->args->argc + imgp->args->envc + 2); + auxbase = *stack_base + imgp->args->argc + 1 + imgp->args->envc + 1; + argarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, + M_WAITOK | M_ZERO); AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, imgp->proc->p_sysent->sv_shared_page_base); @@ -259,9 +261,17 @@ linux_fixup_elf(register_t **stack_base, struct image_ free(imgp->auxargs, M_TEMP); imgp->auxargs = NULL; + KASSERT((pos - argarray) / sizeof(*pos) <= LINUX_AT_COUNT, + ("Too many auxargs")); + error = copyout(argarray, auxbase, sizeof(*argarray) * LINUX_AT_COUNT); + free(argarray, M_TEMP); + if (error != 0) + return (error); + (*stack_base)--; - suword(*stack_base, (register_t)imgp->args->argc); + if (suword(*stack_base, (register_t)imgp->args->argc) == -1) + return (EFAULT); return (0); } Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Thu May 24 16:07:47 2018 (r334164) +++ head/sys/kern/imgact_elf.c Thu May 24 16:25:18 2018 (r334165) @@ -1098,11 +1098,14 @@ int __elfN(freebsd_fixup)(register_t **stack_base, struct image_params *imgp) { Elf_Auxargs *args = (Elf_Auxargs *)imgp->auxargs; - Elf_Addr *base; - Elf_Addr *pos; + Elf_Auxinfo *argarray, *pos; + Elf_Addr *base, *auxbase; + int error; base = (Elf_Addr *)*stack_base; - pos = base + (imgp->args->argc + imgp->args->envc + 2); + auxbase = base + imgp->args->argc + 1 + imgp->args->envc + 1; + argarray = pos = malloc(AT_COUNT * sizeof(*pos), M_TEMP, + M_WAITOK | M_ZERO); if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); @@ -1142,9 +1145,17 @@ __elfN(freebsd_fixup)(register_t **stack_base, struct free(imgp->auxargs, M_TEMP); imgp->auxargs = NULL; + KASSERT((pos - argarray) / sizeof(*pos) <= AT_COUNT, + ("Too many auxargs")); + error = copyout(argarray, auxbase, sizeof(*argarray) * AT_COUNT); + free(argarray, M_TEMP); + if (error != 0) + return (error); + base--; - suword(base, (long)imgp->args->argc); + if (suword(base, imgp->args->argc) == -1) + return (EFAULT); *stack_base = (register_t *)base; return (0); } Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Thu May 24 16:07:47 2018 (r334164) +++ head/sys/kern/kern_exec.c Thu May 24 16:25:18 2018 (r334165) @@ -691,9 +691,12 @@ interpret: * Else stuff argument count as first item on stack */ if (p->p_sysent->sv_fixup != NULL) - (*p->p_sysent->sv_fixup)(&stack_base, imgp); + error = (*p->p_sysent->sv_fixup)(&stack_base, imgp); else - suword(--stack_base, imgp->args->argc); + error = suword(--stack_base, imgp->args->argc) == 0 ? + 0 : EFAULT; + if (error != 0) + goto exec_fail_dealloc; if (args->fdp != NULL) { /* Install a brand new file descriptor table. */ Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Thu May 24 16:07:47 2018 (r334164) +++ head/sys/sys/imgact_elf.h Thu May 24 16:25:18 2018 (r334165) @@ -37,7 +37,8 @@ #ifdef _KERNEL -#define AUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);} +#define AUXARGS_ENTRY(pos, id, val) \ + {(pos)->a_type = (id); (pos)->a_un.a_val = (val); (pos)++;} struct image_params; struct thread; From owner-svn-src-head@freebsd.org Thu May 24 16:29:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00261EF7468; Thu, 24 May 2018 16:29:51 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF2676451; Thu, 24 May 2018 16:29:51 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f173.google.com with SMTP id g1-v6so3024435iob.2; Thu, 24 May 2018 09:29:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=JxMfkr7H8CCYxinIZ+JsZJyVJ09pFHlgOuK9LNwYcGk=; b=PZeyxKVJT/WZ78zVKeZ0/j2OzEivEM9CT+2gxQ1Hyj3Go/DhIUi6aOqn/pCishUCZ9 TzDPTyw18BGFn+tE7NhC0PQFM3LFUVk4kgVTzqbE/GYI9F4c6Ktjj1lDZcLDvuQarXr8 TaBEVFP0/wb67t1YzyFz+/vNGHSuSozEUbvjKGnM1nAXJpkqHlrz+sa5RIoLfqyNfBFP WdPNuA6r+saRxujCAr6l+8qclF/WL5m/ZQwBNOQ5WO0WNAztMrQX5laqJnCrh6w+DoEi jEgbWpRsF4eAxaFdZjMvqUmvFJNouBPSIqxMc7RfUKwYk8FFaKcT4edJgi6/ubmspbxw Dqfw== X-Gm-Message-State: ALKqPwcsIauBnTM8zR+UGRiisWIZVl3jId892nADfmcF6IMyv7eRpP3V 2OoWIOwN5GwRiCwUDX6RHD/x9kfk X-Google-Smtp-Source: AB8JxZrMj7KbzgQdUU5hbfyabckYAAe/WR4IRcaw+eRO6vUOKBMN27plhxtwD9isnAskn3HfhUpIQA== X-Received: by 2002:a6b:8e8b:: with SMTP id q133-v6mr7350222iod.262.1527179385255; Thu, 24 May 2018 09:29:45 -0700 (PDT) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com. [209.85.223.178]) by smtp.gmail.com with ESMTPSA id 11-v6sm1726599ioo.35.2018.05.24.09.29.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 09:29:45 -0700 (PDT) Received: by mail-io0-f178.google.com with SMTP id t23-v6so3004491ioc.10; Thu, 24 May 2018 09:29:45 -0700 (PDT) X-Received: by 2002:a6b:b513:: with SMTP id e19-v6mr7630095iof.267.1527179384996; Thu, 24 May 2018 09:29:44 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:9696:0:0:0:0:0 with HTTP; Thu, 24 May 2018 09:29:44 -0700 (PDT) In-Reply-To: <1236617318.14311730.1527165002236.JavaMail.zimbra@stormshield.eu> References: <201805221554.w4MFsPQA083334@repo.freebsd.org> <822609135.13913713.1527060223167.JavaMail.zimbra@stormshield.eu> <1236617318.14311730.1527165002236.JavaMail.zimbra@stormshield.eu> From: Conrad Meyer Date: Thu, 24 May 2018 09:29:44 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat To: Emeric POUPON Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 16:29:52 -0000 On Thu, May 24, 2018 at 5:30 AM, Emeric POUPON wrote: > Actually we just store traffic profiles and the associated security policy (SP). > A SP is basically just a bunch of traffic selectors, there is no key or other sensitive information involved. Ok, thanks! Best, Conrad From owner-svn-src-head@freebsd.org Thu May 24 16:30:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA0FBEF74E4 for ; Thu, 24 May 2018 16:30:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic306-21.consmr.mail.ne1.yahoo.com (sonic306-21.consmr.mail.ne1.yahoo.com [66.163.189.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CC2D765AE for ; Thu, 24 May 2018 16:30:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1527179434; bh=F5zM+p9uCG7nAQo4kw4VL7I2ZVNMggPUSPrn8RuCVV4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=sK+10s/wTDPd9EkfSWaNg5fLaPyDoi5MJiP4pBOJuDLMe6ulI+dJ2wVBkU93z36yhkymW9S8eMMub325A+EBr6dcXGMRH1Yg/P3oHO2DjXM7RTHrygNeJJBU9x6EF/A7g97Y2aQXcsU1OYOE3aZOZgdjT1Kp/7pbhQspobz4QDAsNbyfeWgpHZRUChmVv0ySl6GQDtSngaHKYe9r1gC0mutjtYjs54XIdWnKJo2aInsTwhn1QjH3k9jZL6NOmfAqLE95N3I0r/z1UppQCJmCqmn5foTIQ72Vmp3GsvXCvL1PJ1Vno31IGj4utaygw7ZGonl+qac4IigG7cQrTrmJCA== X-YMail-OSG: 0xTXRQkVM1kgvOG0AEJzi.79vlg6wfQqIV3jRhmqLzK9OW0RBLgtukpFZ2oZJUD dBHreYovoWh.MLAhkUNvgcnia0rGUjR1sLTl810QWPmaRg1QB.yQNxv8yAIwpUGom.tSghMyH1fq 7CPLAi_0fdfsvu7zgXhJIwOEankaOSs7onHlCuvRCXTMZdU3iFWUTX2Du5rN.G8kmoWI11OBA_kj 26fiXQWkkz1CtixZyHN2r3yjduaACT4xGG6AsAKlzMRSlQy_BrQyDg0CO8nNyTYRCDZB5YWV17kc _KmfN2D8.nqLh.Wls0RbLCjBH3ax3JEzaiC0TV95qZYKyagaiwQhm2fGg2Nqq_V9aKoFcQMW2iA9 mYAQe9rT6fdJqPYKylF8CyGt3Ja9I8Z2Gq4sSiYsaaXhkemrka0TvkaqlPGNDfxtOgNAiuJRB7Yt ci4w5XvTg1WilvWEhHZ9oaiSYI7NNi.7tGAY_39UzvWbsQEA6V_2EplIBh_E2iNTxnu.m2kHMNmO lSsT7ExslPavcTVSsyDt5u0fi2TLeI7X4lAurhkq1RLV5mv54jpHa_EwMP4Nk0I4IYIfgINohJA. q3rnILNcUSECHSlvwddVL5AzS2A5wEMLoZpxdbFOQ02OBEszlpBudZRjOmAWQqj5QTOe_cXYz_E3 nnm6h5s0wdobEHaCQsBo- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Thu, 24 May 2018 16:30:34 +0000 Received: from 181.52.72.201 (EHLO [192.168.0.6]) ([181.52.72.201]) by smtp412.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID b6d68994c9fa2ddef0bc4fa91c81ef24; Thu, 24 May 2018 16:30:30 +0000 (UTC) Subject: Re: svn commit: r333860 - head/sys/kern To: Matthew Macy , Warner Losh Cc: Michael Tuexen , Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> From: Pedro Giffuni Message-ID: <9b7c8c0f-4c33-1a14-f0db-5370c3e5def7@FreeBSD.org> Date: Thu, 24 May 2018 11:30:37 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 16:30:44 -0000 On 05/24/18 11:00, Matthew Macy wrote: > On Thu, May 24, 2018 at 8:58 AM, Warner Losh wrote: >> >> On Thu, May 24, 2018 at 12:53 AM, Matthew Macy wrote: >>> On Wed, May 23, 2018 at 11:42 PM, Michael Tuexen >>> wrote: >>>>> On 24. May 2018, at 08:36, Matthew Macy wrote: >>>>> >>>>> On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen >>>>> wrote: >>>>>>> On 24. May 2018, at 06:51, Matthew Macy wrote: >>>>>>> >>>>>>> Warnings find bugs PERIOD. Although most are not useful, I've found >>>>>> Some warnings indicate bugs, some warnings are just wrong. If you >>>>>> have a "may be used uninitialized" warning being a false positive, you >>>>>> may silences the warning by just set it to zero in the declaration and >>>>>> you silence it. Other compilers might then correctly report an >>>>>> assignment without affect... >>>>> I have yet to see a double assignment be flagged as assignment without >>>>> effect. If it _does_ occur then we have to disable the warning on the >>>>> compiler that we have less faith in. >>>> Have seen it in the past in a difference project... But you miss my >>>> point: >>>> >>>> Not all warnings indicate bugs PERIOD. Some warning are just wrong... >>> Have you read my follow up? _Many_ Many warnings are wrong. Please >>> respond to that on what the global policy should be. The value of any >>> one particular instance of a warning does not merit discussion. >> >> The global policy has never been 'fix all warnings no matter what.' It's >> been 'Look at the warning. If it's a false positive, use judgement about >> whether or not to stifle the compiler.' There are cases I've run into that >> it was impossible to silence the warnings (apart form adding command line >> stuff) for a particular bit of code. Do it one way gcc 4.2 complains. Do it >> another clang complains. appease both and gcc 6 had heart-burn. >> >> So don't gratuitously commit code that fixes warnings on gcc 8. If the >> warning points out a legitimate bug, then that's no brainer yes. If it's a >> false positive, then it's less clear and often times many factors may need >> to be weighed. > Non-actionable warnings are actively detrimental to workflow. They > hide real issues and lead to apathy by developers. If pacifying a > warning is considered undesirable it should be disabled by default > with perhaps a separate mode for enabling it. False positives are compiler bugs. It does happen, with GCC more than with clang, that the compiler has too many bugs and it's a bad practice to pessimize code to work around them.  At very least you should add a comment when adding unnecessary initializations, something like /* workaround GCC */, but dropping broken warnings is best. Pedro. From owner-svn-src-head@freebsd.org Thu May 24 16:31:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60D7BEF7698; Thu, 24 May 2018 16:31:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12F2776789; Thu, 24 May 2018 16:31:19 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E820414AE7; Thu, 24 May 2018 16:31:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OGVI73066468; Thu, 24 May 2018 16:31:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OGVIN8066467; Thu, 24 May 2018 16:31:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201805241631.w4OGVIN8066467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 24 May 2018 16:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334166 - head/sys/cam/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/nvme X-SVN-Commit-Revision: 334166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 16:31:19 -0000 Author: imp Date: Thu May 24 16:31:18 2018 New Revision: 334166 URL: https://svnweb.freebsd.org/changeset/base/334166 Log: We can't release the refcount outside of the periph lock. We're dropping the periph lock then dropping the refcount. However, that violates the locking protocol and is racy. This seems to be the cause of weird occasional panics with a bogus assert. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D15517 Modified: head/sys/cam/nvme/nvme_da.c Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Thu May 24 16:25:18 2018 (r334165) +++ head/sys/cam/nvme/nvme_da.c Thu May 24 16:31:18 2018 (r334166) @@ -336,6 +336,8 @@ ndaclose(struct disk *dp) while (softc->refcount != 0) cam_periph_sleep(periph, &softc->refcount, PRIBIO, "ndaclose", 1); + KASSERT(softc->outstanding_cmds == 0, + ("nda %d outstanding commands", softc->outstanding_cmds)); cam_periph_unlock(periph); cam_periph_release(periph); return (0); @@ -986,10 +988,11 @@ ndastart(struct cam_periph *periph, union ccb *start_c out: start_ccb->ccb_h.flags |= CAM_UNLOCKED; softc->outstanding_cmds++; - softc->refcount++; + softc->refcount++; /* For submission only */ cam_periph_unlock(periph); xpt_action(start_ccb); cam_periph_lock(periph); + softc->refcount--; /* Submission done */ /* May have more work to do, so ensure we stay scheduled */ ndaschedule(periph); @@ -1085,6 +1088,7 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb bp1 = TAILQ_FIRST(&queue); cam_iosched_bio_complete(softc->cam_iosched, bp1, done_ccb); xpt_release_ccb(done_ccb); + softc->outstanding_cmds--; ndaschedule(periph); cam_periph_unlock(periph); while ((bp2 = TAILQ_FIRST(&queue)) != NULL) { @@ -1100,11 +1104,6 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb biodone(bp2); } } - /* - * Release the periph refcount taken in mdastart() for each CCB. - */ - KASSERT(softc->refcount >= 1, ("ndadone softc %p refcount %d", softc, softc->refcount)); - softc->refcount--; return; } case NDA_CCB_DUMP: From owner-svn-src-head@freebsd.org Thu May 24 16:34:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD591EF7887; Thu, 24 May 2018 16:34:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E3CB76C43; Thu, 24 May 2018 16:34:06 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F5D514B55; Thu, 24 May 2018 16:34:06 +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 w4OGY6hP070543; Thu, 24 May 2018 16:34:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OGY6cN070542; Thu, 24 May 2018 16:34:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805241634.w4OGY6cN070542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 May 2018 16:34:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334167 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 334167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 16:34:07 -0000 Author: emaste Date: Thu May 24 16:34:06 2018 New Revision: 334167 URL: https://svnweb.freebsd.org/changeset/base/334167 Log: if_muge: Add LAN78xx family USB ids but attach only to LAN7800 This driver was developed for the LAN7800 and the register-compatible LAN7515 and has only been tested on those devices. Adding support for other members of the family should be straightforward, once we have devices to test. With this change the driver will probe but fail to attach due to the Chip ID check, but will leave a hint leading to the driver that needs work. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15537 Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Thu May 24 16:31:18 2018 (r334166) +++ head/sys/dev/usb/net/if_muge.c Thu May 24 16:34:06 2018 (r334167) @@ -122,6 +122,8 @@ SYSCTL_INT(_hw_usb_muge, OID_AUTO, debug, CTLFLAG_RWTU static const struct usb_device_id lan78xx_devs[] = { #define MUGE_DEV(p,i) { USB_VPI(USB_VENDOR_SMC2, USB_PRODUCT_SMC2_##p, i) } MUGE_DEV(LAN7800_ETH, 0), + MUGE_DEV(LAN7801_ETH, 0), + MUGE_DEV(LAN7850_ETH, 0), #undef MUGE_DEV }; @@ -174,7 +176,8 @@ struct muge_softc { uint32_t sc_pfilter_table[MUGE_NUM_PFILTER_ADDRS_][2]; uint32_t sc_flags; -#define MUGE_FLAG_LINK 0x0001 +#define MUGE_FLAG_LINK 0x0001 +#define MUGE_FLAG_INIT_DONE 0x0002 }; #define MUGE_IFACE_IDX 0 @@ -1125,6 +1128,7 @@ lan78xx_chip_init(struct muge_softc *sc) buf |= ETH_FCT_TX_CTL_EN_; err = lan78xx_write_reg(sc, ETH_FCT_RX_CTL, buf); + sc->sc_flags |= MUGE_FLAG_INIT_DONE; return (0); init_failed: @@ -2116,7 +2120,7 @@ muge_attach(device_t dev) muge_config, MUGE_N_TRANSFER, sc, &sc->sc_mtx); if (err) { device_printf(dev, "error: allocating USB transfers failed\n"); - goto detach; + goto err; } ue->ue_sc = sc; @@ -2128,12 +2132,22 @@ muge_attach(device_t dev) err = uether_ifattach(ue); if (err) { device_printf(dev, "error: could not attach interface\n"); - goto detach; + goto err_usbd; } + + /* Wait for lan78xx_chip_init from post-attach callback to complete. */ + uether_ifattach_wait(ue); + if (!(sc->sc_flags & MUGE_FLAG_INIT_DONE)) + goto err_attached; + return (0); -detach: - muge_detach(dev); +err_attached: + uether_ifdetach(ue); +err_usbd: + usbd_transfer_unsetup(sc->sc_xfer, MUGE_N_TRANSFER); +err: + mtx_destroy(&sc->sc_mtx); return (ENXIO); } From owner-svn-src-head@freebsd.org Thu May 24 16:34:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAF1DEF790B; Thu, 24 May 2018 16:34:50 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 546A976D8D; Thu, 24 May 2018 16:34:50 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f54.google.com (mail-it0-f54.google.com [209.85.214.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 1C1D11242B; Thu, 24 May 2018 16:34:50 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f54.google.com with SMTP id y189-v6so3182839itb.2; Thu, 24 May 2018 09:34:50 -0700 (PDT) X-Gm-Message-State: ALKqPwfazeQIeDnKggLMYgQmPs8Rk7Ed2dsSosEU5tcD2rhdFnkXnyqr 5rl2ORqK3TIXfI831plXpmf8HczzDi4Gdh01hh0= X-Google-Smtp-Source: AB8JxZrkVfdNdxcq74dNuoUwhzmqdi+p1Y87kHmkN0fKY3YMo9UwbdlqLmBPhZn9v+IbCnquuKk15KTBFYFiVKH+3yk= X-Received: by 2002:a24:5a85:: with SMTP id v127-v6mr10237919ita.128.1527179689570; Thu, 24 May 2018 09:34:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Thu, 24 May 2018 09:34:49 -0700 (PDT) In-Reply-To: <9b7c8c0f-4c33-1a14-f0db-5370c3e5def7@FreeBSD.org> References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> <9b7c8c0f-4c33-1a14-f0db-5370c3e5def7@FreeBSD.org> From: Matthew Macy Date: Thu, 24 May 2018 09:34:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333860 - head/sys/kern To: Pedro Giffuni Cc: Warner Losh , Michael Tuexen , Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 16:34:50 -0000 > > False positives are compiler bugs. No they're not. No more than missed optimization opportunities. They're limitations in the control flow analysis. > > It does happen, with GCC more than with clang, that the compiler has too > many bugs and it's a bad practice to pessimize code to work around them. It doesn't pessimize the compiled output. It may make the code less readable in the opinion of some. I've found that 10% of the warnings were actually legitimate issues. It's unfortunate that the majority are just noise that have to be waded through. > At > very least you should add a comment when adding unnecessary initializations, > something like /* workaround GCC */, but dropping broken warnings is best. That's legitimate. From owner-svn-src-head@freebsd.org Thu May 24 17:04:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5DF3EF8890; Thu, 24 May 2018 17:04:27 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98DCE78616; Thu, 24 May 2018 17:04:27 +0000 (UTC) (envelope-from brooks@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7633815046; Thu, 24 May 2018 17:04:27 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OH4Re4085646; Thu, 24 May 2018 17:04:27 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OH4Ro1085645; Thu, 24 May 2018 17:04:27 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201805241704.w4OH4Ro1085645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 24 May 2018 17:04:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334168 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 334168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 17:04:28 -0000 Author: brooks Date: Thu May 24 17:04:27 2018 New Revision: 334168 URL: https://svnweb.freebsd.org/changeset/base/334168 Log: Don't implement break(2) at all on aarch64 and riscv. This should have been done when they were removed from libc, but was overlooked in the runup to 11.0. No users should exist. Approved by: andrew Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15539 Modified: head/sys/vm/vm_unix.c Modified: head/sys/vm/vm_unix.c ============================================================================== --- head/sys/vm/vm_unix.c Thu May 24 16:34:06 2018 (r334167) +++ head/sys/vm/vm_unix.c Thu May 24 17:04:27 2018 (r334168) @@ -65,14 +65,10 @@ struct obreak_args { char *nsize; }; #endif - -/* - * MPSAFE - */ -/* ARGSUSED */ int sys_obreak(struct thread *td, struct obreak_args *uap) { +#if !defined(__aarch64__) && !defined(__riscv__) struct vmspace *vm = td->td_proc->p_vmspace; vm_map_t map = &vm->vm_map; vm_offset_t new, old, base; @@ -230,6 +226,9 @@ done: VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); return (error); +#else /* defined(__aarch64__) || defined(__riscv__) */ + return (ENOSYS); +#endif /* defined(__aarch64__) || defined(__riscv__) */ } #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-head@freebsd.org Thu May 24 17:05:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4297EF8949; Thu, 24 May 2018 17:05:42 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 763B078805; Thu, 24 May 2018 17:05:42 +0000 (UTC) (envelope-from brooks@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 576791504C; Thu, 24 May 2018 17:05:42 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OH5giY085738; Thu, 24 May 2018 17:05:42 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OH5gHV085737; Thu, 24 May 2018 17:05:42 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201805241705.w4OH5gHV085737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 24 May 2018 17:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334169 - head X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 334169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 17:05:42 -0000 Author: brooks Date: Thu May 24 17:05:41 2018 New Revision: 334169 URL: https://svnweb.freebsd.org/changeset/base/334169 Log: exect() was removed in 2018, not 2017. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu May 24 17:04:27 2018 (r334168) +++ head/Makefile.inc1 Thu May 24 17:05:41 2018 (r334169) @@ -808,7 +808,7 @@ _cleanobj_fast_depend_hack: .PHONY # 20180404 r332048 sigreturn # 20180405 r332080 shmat # 20180406 r332119 setlogin -# 20170411 r332443 exect +# 20180411 r332443 exect .for f in exect fstat fstatat fstatfs getdirentries getfsstat setlogin shmat sigreturn statfs .if exists(${OBJTOP}/lib/libc/.depend.${f}.o) @if egrep -qw '${f}\.[sS]' \ From owner-svn-src-head@freebsd.org Thu May 24 17:06:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62B62EF89A0; Thu, 24 May 2018 17:06:02 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06EE67891B; Thu, 24 May 2018 17:06:02 +0000 (UTC) (envelope-from cem@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC0661504D; Thu, 24 May 2018 17:06:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OH61kR085796; Thu, 24 May 2018 17:06:01 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OH61Sd085792; Thu, 24 May 2018 17:06:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201805241706.w4OH61Sd085792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 24 May 2018 17:06:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334170 - in head/sys: arm/conf conf dev/asmc kern modules/asmc X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: arm/conf conf dev/asmc kern modules/asmc X-SVN-Commit-Revision: 334170 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 17:06:02 -0000 Author: cem Date: Thu May 24 17:06:00 2018 New Revision: 334170 URL: https://svnweb.freebsd.org/changeset/base/334170 Log: Yank crufty INTR_FILTER option It was introduced to the tree in r169320 and r169321 in May 2007. It never got much use and never became a kernel default. The code duplicates the default path quite a bit, with slight modifications. Just yank out the cruft. Whatever goals were being aimed for can probably be met within the existing framework, without a flag day option. Mostly mechanical change: 'unifdef -m -UINTR_FILTER'. Reviewed by: mmacy Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D15546 Modified: head/sys/arm/conf/CRB head/sys/conf/options head/sys/dev/asmc/asmc.c head/sys/kern/kern_intr.c head/sys/modules/asmc/Makefile Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Thu May 24 17:05:41 2018 (r334169) +++ head/sys/arm/conf/CRB Thu May 24 17:06:00 2018 (r334170) @@ -52,7 +52,6 @@ options CD9660 # ISO 9660 Filesystem options PSEUDOFS # Pseudo-filesystem framework options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support -options INTR_FILTER options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu May 24 17:05:41 2018 (r334169) +++ head/sys/conf/options Thu May 24 17:06:00 2018 (r334170) @@ -904,9 +904,6 @@ HWPMC_DEBUG opt_global.h HWPMC_HOOKS HWPMC_MIPS_BACKTRACE opt_hwpmc_hooks.h -# Interrupt filtering -INTR_FILTER - # 802.11 support layer IEEE80211_DEBUG opt_wlan.h IEEE80211_DEBUG_REFCNT opt_wlan.h Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Thu May 24 17:05:41 2018 (r334169) +++ head/sys/dev/asmc/asmc.c Thu May 24 17:06:00 2018 (r334170) @@ -57,8 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_intr_filter.h" - /* * Device interface. */ @@ -85,9 +83,6 @@ static int asmc_temp_getvalue(device_t dev, const cha static int asmc_sms_read(device_t, const char *key, int16_t *val); static void asmc_sms_calibrate(device_t dev); static int asmc_sms_intrfast(void *arg); -#ifdef INTR_FILTER -static void asmc_sms_handler(void *arg); -#endif static void asmc_sms_printintr(device_t dev, uint8_t); static void asmc_sms_task(void *arg, int pending); #ifdef DEBUG @@ -563,13 +558,11 @@ asmc_attach(device_t dev) * We only need to do this for the non INTR_FILTER case. */ sc->sc_sms_tq = NULL; -#ifndef INTR_FILTER TASK_INIT(&sc->sc_sms_task, 0, asmc_sms_task, sc); sc->sc_sms_tq = taskqueue_create_fast("asmc_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->sc_sms_tq); taskqueue_start_threads(&sc->sc_sms_tq, 1, PI_REALTIME, "%s sms taskq", device_get_nameunit(dev)); -#endif /* * Allocate an IRQ for the SMS. */ @@ -584,11 +577,7 @@ asmc_attach(device_t dev) ret = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC | INTR_MPSAFE, -#ifdef INTR_FILTER - asmc_sms_intrfast, asmc_sms_handler, -#else asmc_sms_intrfast, NULL, -#endif dev, &sc->sc_cookie); if (ret) { @@ -1241,23 +1230,10 @@ asmc_sms_intrfast(void *arg) sc->sc_sms_intrtype = type; asmc_sms_printintr(dev, type); -#ifdef INTR_FILTER - return (FILTER_SCHEDULE_THREAD | FILTER_HANDLED); -#else taskqueue_enqueue(sc->sc_sms_tq, &sc->sc_sms_task); -#endif return (FILTER_HANDLED); } -#ifdef INTR_FILTER -static void -asmc_sms_handler(void *arg) -{ - struct asmc_softc *sc = device_get_softc(arg); - - asmc_sms_task(sc, 0); -} -#endif static void Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Thu May 24 17:05:41 2018 (r334169) +++ head/sys/kern/kern_intr.c Thu May 24 17:06:00 2018 (r334170) @@ -101,24 +101,11 @@ static struct mtx event_lock; MTX_SYSINIT(intr_event_list, &event_lock, "intr event list", MTX_DEF); static void intr_event_update(struct intr_event *ie); -#ifdef INTR_FILTER -static int intr_event_schedule_thread(struct intr_event *ie, - struct intr_thread *ithd); -static int intr_filter_loop(struct intr_event *ie, - struct trapframe *frame, struct intr_thread **ithd); -static struct intr_thread *ithread_create(const char *name, - struct intr_handler *ih); -#else static int intr_event_schedule_thread(struct intr_event *ie); static struct intr_thread *ithread_create(const char *name); -#endif static void ithread_destroy(struct intr_thread *ithread); static void ithread_execute_handlers(struct proc *p, struct intr_event *ie); -#ifdef INTR_FILTER -static void priv_ithread_execute_handler(struct proc *p, - struct intr_handler *ih); -#endif static void ithread_loop(void *); static void ithread_update(struct intr_thread *ithd); static void start_softintr(void *); @@ -506,7 +493,6 @@ intr_event_destroy(struct intr_event *ie) return (0); } -#ifndef INTR_FILTER static struct intr_thread * ithread_create(const char *name) { @@ -530,32 +516,7 @@ ithread_create(const char *name) CTR2(KTR_INTR, "%s: created %s", __func__, name); return (ithd); } -#else -static struct intr_thread * -ithread_create(const char *name, struct intr_handler *ih) -{ - struct intr_thread *ithd; - struct thread *td; - int error; - ithd = malloc(sizeof(struct intr_thread), M_ITHREAD, M_WAITOK | M_ZERO); - - error = kproc_kthread_add(ithread_loop, ih, &intrproc, - &td, RFSTOPPED | RFHIGHPID, - 0, "intr", "%s", name); - if (error) - panic("kproc_create() failed with %d", error); - thread_lock(td); - sched_class(td, PRI_ITHD); - TD_SET_IWAIT(td); - thread_unlock(td); - td->td_pflags |= TDP_ITHREAD; - ithd->it_thread = td; - CTR2(KTR_INTR, "%s: created %s", __func__, name); - return (ithd); -} -#endif - static void ithread_destroy(struct intr_thread *ithread) { @@ -572,7 +533,6 @@ ithread_destroy(struct intr_thread *ithread) thread_unlock(td); } -#ifndef INTR_FILTER int intr_event_add_handler(struct intr_event *ie, const char *name, driver_filter_t filter, driver_intr_t handler, void *arg, u_char pri, @@ -646,91 +606,7 @@ intr_event_add_handler(struct intr_event *ie, const ch *cookiep = ih; return (0); } -#else -int -intr_event_add_handler(struct intr_event *ie, const char *name, - driver_filter_t filter, driver_intr_t handler, void *arg, u_char pri, - enum intr_type flags, void **cookiep) -{ - struct intr_handler *ih, *temp_ih; - struct intr_thread *it; - if (ie == NULL || name == NULL || (handler == NULL && filter == NULL)) - return (EINVAL); - - /* Allocate and populate an interrupt handler structure. */ - ih = malloc(sizeof(struct intr_handler), M_ITHREAD, M_WAITOK | M_ZERO); - ih->ih_filter = filter; - ih->ih_handler = handler; - ih->ih_argument = arg; - strlcpy(ih->ih_name, name, sizeof(ih->ih_name)); - ih->ih_event = ie; - ih->ih_pri = pri; - if (flags & INTR_EXCL) - ih->ih_flags = IH_EXCLUSIVE; - if (flags & INTR_MPSAFE) - ih->ih_flags |= IH_MPSAFE; - if (flags & INTR_ENTROPY) - ih->ih_flags |= IH_ENTROPY; - - /* We can only have one exclusive handler in a event. */ - mtx_lock(&ie->ie_lock); - if (!TAILQ_EMPTY(&ie->ie_handlers)) { - if ((flags & INTR_EXCL) || - (TAILQ_FIRST(&ie->ie_handlers)->ih_flags & IH_EXCLUSIVE)) { - mtx_unlock(&ie->ie_lock); - free(ih, M_ITHREAD); - return (EINVAL); - } - } - - /* For filtered handlers, create a private ithread to run on. */ - if (filter != NULL && handler != NULL) { - mtx_unlock(&ie->ie_lock); - it = ithread_create("intr: newborn", ih); - mtx_lock(&ie->ie_lock); - it->it_event = ie; - ih->ih_thread = it; - ithread_update(it); /* XXX - do we really need this?!?!? */ - } else { /* Create the global per-event thread if we need one. */ - while (ie->ie_thread == NULL && handler != NULL) { - if (ie->ie_flags & IE_ADDING_THREAD) - msleep(ie, &ie->ie_lock, 0, "ithread", 0); - else { - ie->ie_flags |= IE_ADDING_THREAD; - mtx_unlock(&ie->ie_lock); - it = ithread_create("intr: newborn", ih); - mtx_lock(&ie->ie_lock); - ie->ie_flags &= ~IE_ADDING_THREAD; - ie->ie_thread = it; - it->it_event = ie; - ithread_update(it); - wakeup(ie); - } - } - } - - /* Add the new handler to the event in priority order. */ - TAILQ_FOREACH(temp_ih, &ie->ie_handlers, ih_next) { - if (temp_ih->ih_pri > ih->ih_pri) - break; - } - if (temp_ih == NULL) - TAILQ_INSERT_TAIL(&ie->ie_handlers, ih, ih_next); - else - TAILQ_INSERT_BEFORE(temp_ih, ih, ih_next); - intr_event_update(ie); - - CTR3(KTR_INTR, "%s: added %s to %s", __func__, ih->ih_name, - ie->ie_name); - mtx_unlock(&ie->ie_lock); - - if (cookiep != NULL) - *cookiep = ih; - return (0); -} -#endif - /* * Append a description preceded by a ':' to the name of the specified * interrupt handler. @@ -846,7 +722,6 @@ _intr_drain(int irq) } -#ifndef INTR_FILTER int intr_event_remove_handler(void *cookie) { @@ -997,169 +872,7 @@ intr_event_schedule_thread(struct intr_event *ie) return (0); } -#else -int -intr_event_remove_handler(void *cookie) -{ - struct intr_handler *handler = (struct intr_handler *)cookie; - struct intr_event *ie; - struct intr_thread *it; -#ifdef INVARIANTS - struct intr_handler *ih; -#endif -#ifdef notyet - int dead; -#endif - if (handler == NULL) - return (EINVAL); - ie = handler->ih_event; - KASSERT(ie != NULL, - ("interrupt handler \"%s\" has a NULL interrupt event", - handler->ih_name)); - mtx_lock(&ie->ie_lock); - CTR3(KTR_INTR, "%s: removing %s from %s", __func__, handler->ih_name, - ie->ie_name); -#ifdef INVARIANTS - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) - if (ih == handler) - goto ok; - mtx_unlock(&ie->ie_lock); - panic("interrupt handler \"%s\" not found in interrupt event \"%s\"", - ih->ih_name, ie->ie_name); -ok: -#endif - /* - * If there are no ithreads (per event and per handler), then - * just remove the handler and return. - * XXX: Note that an INTR_FAST handler might be running on another CPU! - */ - if (ie->ie_thread == NULL && handler->ih_thread == NULL) { - TAILQ_REMOVE(&ie->ie_handlers, handler, ih_next); - mtx_unlock(&ie->ie_lock); - free(handler, M_ITHREAD); - return (0); - } - - /* Private or global ithread? */ - it = (handler->ih_thread) ? handler->ih_thread : ie->ie_thread; - /* - * If the interrupt thread is already running, then just mark this - * handler as being dead and let the ithread do the actual removal. - * - * During a cold boot while cold is set, msleep() does not sleep, - * so we have to remove the handler here rather than letting the - * thread do it. - */ - thread_lock(it->it_thread); - if (!TD_AWAITING_INTR(it->it_thread) && !cold) { - handler->ih_flags |= IH_DEAD; - - /* - * Ensure that the thread will process the handler list - * again and remove this handler if it has already passed - * it on the list. - * - * The release part of the following store ensures - * that the update of ih_flags is ordered before the - * it_need setting. See the comment before - * atomic_cmpset_acq(&ithd->it_need, ...) operation in - * the ithread_execute_handlers(). - */ - atomic_store_rel_int(&it->it_need, 1); - } else - TAILQ_REMOVE(&ie->ie_handlers, handler, ih_next); - thread_unlock(it->it_thread); - while (handler->ih_flags & IH_DEAD) - msleep(handler, &ie->ie_lock, 0, "iev_rmh", 0); - /* - * At this point, the handler has been disconnected from the event, - * so we can kill the private ithread if any. - */ - if (handler->ih_thread) { - ithread_destroy(handler->ih_thread); - handler->ih_thread = NULL; - } - intr_event_update(ie); -#ifdef notyet - /* - * XXX: This could be bad in the case of ppbus(8). Also, I think - * this could lead to races of stale data when servicing an - * interrupt. - */ - dead = 1; - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { - if (handler != NULL) { - dead = 0; - break; - } - } - if (dead) { - ithread_destroy(ie->ie_thread); - ie->ie_thread = NULL; - } -#endif - mtx_unlock(&ie->ie_lock); - free(handler, M_ITHREAD); - return (0); -} - -static int -intr_event_schedule_thread(struct intr_event *ie, struct intr_thread *it) -{ - struct intr_entropy entropy; - struct thread *td; - struct thread *ctd; - struct proc *p; - - /* - * If no ithread or no handlers, then we have a stray interrupt. - */ - if (ie == NULL || TAILQ_EMPTY(&ie->ie_handlers) || it == NULL) - return (EINVAL); - - ctd = curthread; - td = it->it_thread; - p = td->td_proc; - - /* - * If any of the handlers for this ithread claim to be good - * sources of entropy, then gather some. - */ - if (ie->ie_flags & IE_ENTROPY) { - entropy.event = (uintptr_t)ie; - entropy.td = ctd; - random_harvest_queue(&entropy, sizeof(entropy), 2, RANDOM_INTERRUPT); - } - - KASSERT(p != NULL, ("ithread %s has no process", ie->ie_name)); - - /* - * Set it_need to tell the thread to keep running if it is already - * running. Then, lock the thread and see if we actually need to - * put it on the runqueue. - * - * Use store_rel to arrange that the store to ih_need in - * swi_sched() is before the store to it_need and prepare for - * transfer of this order to loads in the ithread. - */ - atomic_store_rel_int(&it->it_need, 1); - thread_lock(td); - if (TD_AWAITING_INTR(td)) { - CTR3(KTR_INTR, "%s: schedule pid %d (%s)", __func__, p->p_pid, - td->td_name); - TD_CLR_IWAIT(td); - sched_add(td, SRQ_INTR); - } else { - CTR5(KTR_INTR, "%s: pid %d (%s): it_need %d, state %d", - __func__, p->p_pid, td->td_name, it->it_need, td->td_state); - } - thread_unlock(td); - - return (0); -} -#endif - /* * Allow interrupt event binding for software interrupt handlers -- a no-op, * since interrupts are generated in software rather than being directed by @@ -1231,11 +944,7 @@ swi_sched(void *cookie, int flags) if (!(flags & SWI_DELAY)) { VM_CNT_INC(v_soft); -#ifdef INTR_FILTER - error = intr_event_schedule_thread(ie, ie->ie_thread); -#else error = intr_event_schedule_thread(ie); -#endif KASSERT(error == 0, ("stray software interrupt")); } } @@ -1253,39 +962,7 @@ swi_remove(void *cookie) return (intr_event_remove_handler(cookie)); } -#ifdef INTR_FILTER -static void -priv_ithread_execute_handler(struct proc *p, struct intr_handler *ih) -{ - struct intr_event *ie; - ie = ih->ih_event; - /* - * If this handler is marked for death, remove it from - * the list of handlers and wake up the sleeper. - */ - if (ih->ih_flags & IH_DEAD) { - mtx_lock(&ie->ie_lock); - TAILQ_REMOVE(&ie->ie_handlers, ih, ih_next); - ih->ih_flags &= ~IH_DEAD; - wakeup(ih); - mtx_unlock(&ie->ie_lock); - return; - } - - /* Execute this handler. */ - CTR6(KTR_INTR, "%s: pid %d exec %p(%p) for %s flg=%x", - __func__, p->p_pid, (void *)ih->ih_handler, ih->ih_argument, - ih->ih_name, ih->ih_flags); - - if (!(ih->ih_flags & IH_MPSAFE)) - mtx_lock(&Giant); - ih->ih_handler(ih->ih_argument); - if (!(ih->ih_flags & IH_MPSAFE)) - mtx_unlock(&Giant); -} -#endif - /* * This is a public function for use by drivers that mux interrupt * handlers for child devices from their interrupt handler. @@ -1380,7 +1057,6 @@ ithread_execute_handlers(struct proc *p, struct intr_e ie->ie_post_ithread(ie->ie_source); } -#ifndef INTR_FILTER /* * This is the main code for interrupt threads. */ @@ -1554,222 +1230,6 @@ intr_event_handle(struct intr_event *ie, struct trapfr td->td_intr_nesting_level--; return (0); } -#else -/* - * This is the main code for interrupt threads. - */ -static void -ithread_loop(void *arg) -{ - struct intr_thread *ithd; - struct intr_handler *ih; - struct intr_event *ie; - struct thread *td; - struct proc *p; - int priv; - int wake; - - td = curthread; - p = td->td_proc; - ih = (struct intr_handler *)arg; - priv = (ih->ih_thread != NULL) ? 1 : 0; - ithd = (priv) ? ih->ih_thread : ih->ih_event->ie_thread; - KASSERT(ithd->it_thread == td, - ("%s: ithread and proc linkage out of sync", __func__)); - ie = ithd->it_event; - ie->ie_count = 0; - wake = 0; - - /* - * As long as we have interrupts outstanding, go through the - * list of handlers, giving each one a go at it. - */ - for (;;) { - /* - * If we are an orphaned thread, then just die. - */ - if (ithd->it_flags & IT_DEAD) { - CTR3(KTR_INTR, "%s: pid %d (%s) exiting", __func__, - p->p_pid, td->td_name); - free(ithd, M_ITHREAD); - kthread_exit(); - } - - /* - * Service interrupts. If another interrupt arrives while - * we are running, it will set it_need to note that we - * should make another pass. - * - * The load_acq part of the following cmpset ensures - * that the load of ih_need in ithread_execute_handlers() - * is ordered after the load of it_need here. - */ - while (atomic_cmpset_acq_int(&ithd->it_need, 1, 0) != 0) { - if (priv) - priv_ithread_execute_handler(p, ih); - else - ithread_execute_handlers(p, ie); - } - WITNESS_WARN(WARN_PANIC, NULL, "suspending ithread"); - mtx_assert(&Giant, MA_NOTOWNED); - - /* - * Processed all our interrupts. Now get the sched - * lock. This may take a while and it_need may get - * set again, so we have to check it again. - */ - thread_lock(td); - if (atomic_load_acq_int(&ithd->it_need) == 0 && - (ithd->it_flags & (IT_DEAD | IT_WAIT)) == 0) { - TD_SET_IWAIT(td); - ie->ie_count = 0; - mi_switch(SW_VOL | SWT_IWAIT, NULL); - } - if (ithd->it_flags & IT_WAIT) { - wake = 1; - ithd->it_flags &= ~IT_WAIT; - } - thread_unlock(td); - if (wake) { - wakeup(ithd); - wake = 0; - } - } -} - -/* - * Main loop for interrupt filter. - * - * Some architectures (i386, amd64 and arm) require the optional frame - * parameter, and use it as the main argument for fast handler execution - * when ih_argument == NULL. - * - * Return value: - * o FILTER_STRAY: No filter recognized the event, and no - * filter-less handler is registered on this - * line. - * o FILTER_HANDLED: A filter claimed the event and served it. - * o FILTER_SCHEDULE_THREAD: No filter claimed the event, but there's at - * least one filter-less handler on this line. - * o FILTER_HANDLED | - * FILTER_SCHEDULE_THREAD: A filter claimed the event, and asked for - * scheduling the per-handler ithread. - * - * In case an ithread has to be scheduled, in *ithd there will be a - * pointer to a struct intr_thread containing the thread to be - * scheduled. - */ - -static int -intr_filter_loop(struct intr_event *ie, struct trapframe *frame, - struct intr_thread **ithd) -{ - struct intr_handler *ih; - void *arg; - int ret, thread_only; - - ret = 0; - thread_only = 0; - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { - /* - * Execute fast interrupt handlers directly. - * To support clock handlers, if a handler registers - * with a NULL argument, then we pass it a pointer to - * a trapframe as its argument. - */ - arg = ((ih->ih_argument == NULL) ? frame : ih->ih_argument); - - CTR5(KTR_INTR, "%s: exec %p/%p(%p) for %s", __func__, - ih->ih_filter, ih->ih_handler, arg, ih->ih_name); - - if (ih->ih_filter != NULL) - ret = ih->ih_filter(arg); - else { - thread_only = 1; - continue; - } - KASSERT(ret == FILTER_STRAY || - ((ret & (FILTER_SCHEDULE_THREAD | FILTER_HANDLED)) != 0 && - (ret & ~(FILTER_SCHEDULE_THREAD | FILTER_HANDLED)) == 0), - ("%s: incorrect return value %#x from %s", __func__, ret, - ih->ih_name)); - if (ret & FILTER_STRAY) - continue; - else { - *ithd = ih->ih_thread; - return (ret); - } - } - - /* - * No filters handled the interrupt and we have at least - * one handler without a filter. In this case, we schedule - * all of the filter-less handlers to run in the ithread. - */ - if (thread_only) { - *ithd = ie->ie_thread; - return (FILTER_SCHEDULE_THREAD); - } - return (FILTER_STRAY); -} - -/* - * Main interrupt handling body. - * - * Input: - * o ie: the event connected to this interrupt. - * o frame: some archs (i.e. i386) pass a frame to some. - * handlers as their main argument. - * Return value: - * o 0: everything ok. - * o EINVAL: stray interrupt. - */ -int -intr_event_handle(struct intr_event *ie, struct trapframe *frame) -{ - struct intr_thread *ithd; - struct trapframe *oldframe; - struct thread *td; - int thread; - - ithd = NULL; - td = curthread; - - if (ie == NULL || TAILQ_EMPTY(&ie->ie_handlers)) - return (EINVAL); - - td->td_intr_nesting_level++; - thread = 0; - critical_enter(); - oldframe = td->td_intr_frame; - td->td_intr_frame = frame; - thread = intr_filter_loop(ie, frame, &ithd); - if (thread & FILTER_HANDLED) { - if (ie->ie_post_filter != NULL) - ie->ie_post_filter(ie->ie_source); - } else { - if (ie->ie_pre_ithread != NULL) - ie->ie_pre_ithread(ie->ie_source); - } - td->td_intr_frame = oldframe; - critical_exit(); - - /* Interrupt storm logic */ - if (thread & FILTER_STRAY) { - ie->ie_count++; - if (ie->ie_count < intr_storm_threshold) - printf("Interrupt stray detection not present\n"); - } - - /* Schedule an ithread if needed. */ - if (thread & FILTER_SCHEDULE_THREAD) { - if (intr_event_schedule_thread(ie, ithd) != 0) - panic("%s: impossible stray interrupt", __func__); - } - td->td_intr_nesting_level--; - return (0); -} -#endif #ifdef DDB /* Modified: head/sys/modules/asmc/Makefile ============================================================================== --- head/sys/modules/asmc/Makefile Thu May 24 17:05:41 2018 (r334169) +++ head/sys/modules/asmc/Makefile Thu May 24 17:06:00 2018 (r334170) @@ -3,6 +3,6 @@ .PATH: ${SRCTOP}/sys/dev/asmc KMOD= asmc -SRCS= asmc.c opt_acpi.h opt_intr_filter.h acpi_if.h bus_if.h device_if.h +SRCS= asmc.c opt_acpi.h acpi_if.h bus_if.h device_if.h .include From owner-svn-src-head@freebsd.org Thu May 24 17:08:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4EA3EF8AEE; Thu, 24 May 2018 17:08:56 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6642F78B7F; Thu, 24 May 2018 17:08:56 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 409F01505A; Thu, 24 May 2018 17:08:56 +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 w4OH8uD1085935; Thu, 24 May 2018 17:08:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OH8umj085934; Thu, 24 May 2018 17:08:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805241708.w4OH8umj085934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 May 2018 17:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334171 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 334171 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 17:08:56 -0000 Author: emaste Date: Thu May 24 17:08:55 2018 New Revision: 334171 URL: https://svnweb.freebsd.org/changeset/base/334171 Log: UPDATING: remove EOL whitespace in 20180523 entry Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu May 24 17:06:00 2018 (r334170) +++ head/UPDATING Thu May 24 17:08:55 2018 (r334171) @@ -53,7 +53,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: 20180523: The on-disk format for hwpmc callchain records has changed to include - threadid corresponding to a given record. This changes the field offsets + threadid corresponding to a given record. This changes the field offsets and thus requires that libpmcstat be rebuilt before using a kernel later than r334108. From owner-svn-src-head@freebsd.org Thu May 24 17:00:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3507EF868A; Thu, 24 May 2018 17:00:26 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CD7878195; Thu, 24 May 2018 17:00:26 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 0D238143C; Thu, 24 May 2018 12:00:24 -0500 (CDT) Date: Thu, 24 May 2018 12:00:23 -0500 From: Mark Linimon To: Pedro Giffuni Cc: Andrew Gallatin , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: Deorbiting i386 Message-ID: <20180524170022.GA31540@lonesome.com> References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <4e79566e-b188-8480-bcd1-d69494a13cf5@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e79566e-b188-8480-bcd1-d69494a13cf5@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Thu, 24 May 2018 17:21:42 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 17:00:27 -0000 On Thu, May 24, 2018 at 11:18:38AM -0500, Pedro Giffuni wrote: > And while I like to see sparc64s still kicking around, they are stopping us > from getting rid of GCC once and for all. False. mips and powerpc still build with gcc. I understand there will be an effort at BSDCan to work out the remaining wrinkles for the crossbuild toolchain for those archs. That is what has prevented use from the long-deserved nuking of gcc4.2.1, not sparc64. mcl From owner-svn-src-head@freebsd.org Thu May 24 17:54:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B058EF9DA0; Thu, 24 May 2018 17:54:09 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 076B17ACC9; Thu, 24 May 2018 17:54:09 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCB6715891; Thu, 24 May 2018 17:54:08 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OHs8Lh011508; Thu, 24 May 2018 17:54:08 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OHs8NZ011507; Thu, 24 May 2018 17:54:08 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805241754.w4OHs8NZ011507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 17:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334172 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 334172 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 17:54:09 -0000 Author: mmacy Date: Thu May 24 17:54:08 2018 New Revision: 334172 URL: https://svnweb.freebsd.org/changeset/base/334172 Log: if_delgroups: add missed unlock introduced by r334118 Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Thu May 24 17:08:55 2018 (r334171) +++ head/sys/net/if.c Thu May 24 17:54:08 2018 (r334172) @@ -1557,6 +1557,7 @@ if_delgroups(struct ifnet *ifp) ifglfree = 1; } + IFNET_WUNLOCK(); epoch_wait_preempt(net_epoch_preempt); free(ifgm, M_TEMP); if (ifglfree) { From owner-svn-src-head@freebsd.org Thu May 24 18:02:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13577EFA231; Thu, 24 May 2018 18:02:04 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B99897B220; Thu, 24 May 2018 18:02:03 +0000 (UTC) (envelope-from trasz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AA9F15919; Thu, 24 May 2018 18:02:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OI23qk016045; Thu, 24 May 2018 18:02:03 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OI23qd016042; Thu, 24 May 2018 18:02:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201805241802.w4OI23qd016042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 24 May 2018 18:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334173 - in head: share/man/man4 sys/dev/usb/template X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/usb/template X-SVN-Commit-Revision: 334173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 18:02:04 -0000 Author: trasz Date: Thu May 24 18:02:02 2018 New Revision: 334173 URL: https://svnweb.freebsd.org/changeset/base/334173 Log: Clarify that USB bus power consumption is measured in mA at 5V. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/usb_template.4 head/sys/dev/usb/template/usb_template.c Modified: head/share/man/man4/usb_template.4 ============================================================================== --- head/share/man/man4/usb_template.4 Thu May 24 17:54:08 2018 (r334172) +++ head/share/man/man4/usb_template.4 Thu May 24 18:02:02 2018 (r334173) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 23, 2018 +.Dd May 24, 2018 .Dt USB_TEMPLATE 4 .Os . @@ -101,7 +101,7 @@ tunables: Currently selected template. Set to -1 to make the device disappear from the USB host point of view. .It Va hw.usb.template_power -USB bus power consumption in mA. +USB bus power consumption in mA at 5V. Must be between 0 and 500. Setting to 0 marks the device as self-powered. Defaults to 500mA. Modified: head/sys/dev/usb/template/usb_template.c ============================================================================== --- head/sys/dev/usb/template/usb_template.c Thu May 24 17:54:08 2018 (r334172) +++ head/sys/dev/usb/template/usb_template.c Thu May 24 18:02:02 2018 (r334173) @@ -120,7 +120,7 @@ SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW, SYSCTL_PROC(_hw_usb, OID_AUTO, template_power, CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, NULL, 0, sysctl_hw_usb_template_power, - "I", "USB bus power consumption in mA"); + "I", "USB bus power consumption in mA at 5V"); static int usb_template_power = 500; /* 500mA */ From owner-svn-src-head@freebsd.org Thu May 24 18:02:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6179FEFA261; Thu, 24 May 2018 18:02:29 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-vk0-x232.google.com (mail-vk0-x232.google.com [IPv6:2607:f8b0:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE0D27B4C8; Thu, 24 May 2018 18:02:28 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-vk0-x232.google.com with SMTP id j7-v6so1568711vkc.9; Thu, 24 May 2018 11:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=I9WP1OuA0/7fFFUa2Hi62jr1/Q+EZrT2k5nh2b+aJWQ=; b=ARiu6Ac/CNrGPdyTlVWUpYyYUfer/jx6OyeW/BF2RZP6Npg84rcfknD4g3RjquLWXr HtsNdCgy4Nq8rq/ZhhkN8Crf8rf0Eod0xYPff3a1ec6NrukW0i5OX1oSQcPxRs8ul5bD RaR1Pb5ZTuUaGgGVf9VHiyNYf0d+0cImwb2e5pe9mefBIGObl+oPvhPDjHKrkAkSV8yw HjrXk5aT29OajoE4VzZZaXrCSu3/7X6IOnmMDEn8YQgenpvH+8mJB/f+Oew9AFJzAKbp rpRSosiav6HIa149LTDWx8YYb3fdednqz24XQNUhHg0qw0yZsmiuO0Ny6oA1HW1Rzwyf stmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=I9WP1OuA0/7fFFUa2Hi62jr1/Q+EZrT2k5nh2b+aJWQ=; b=oIYKm3CRMK5RzIphmX8veDInGzZgE+rMR5y9E51+U07pzXkUwDYCh3KAj02pHLiMGm AwdHhMXLz9GDG4jz2/I0dE/yP3e0hi4miQHbxmz8UiUDMGKjEe46D9EHJjcrMqHlIRci wPBLYZbi2WRgeTkKpSjWR0NI4/9GD6I8e2FnfCfPJxnAG7s1l6Aaqjk3WAkNHadKe9kV svO+7owYN/wKSFTrWQVSxXlVAH7RsLJ/7WbbjjgRyGdutZdz1ldQWIRJClbKm8OLklA6 GBiqDaPyAnD8dUwYwMxGKA18E4IM7BgJosizgEm85rOLTqNHkAU321aXExRobC2qMZfQ netw== X-Gm-Message-State: ALKqPwehbLsEMXyzKuBYIixgRWQ7ZWe4dQhopzoicqGpAGbGp8Ho2aq1 VD2v74xIUilaO2avfR3BZI/Asuv9A+oAfsvEqo4= X-Google-Smtp-Source: AB8JxZq6XUtAOd7m6FYE4SH+VsNZibpOEOZBi4nQg5fbNtklu7SrzvA6OrLem+JPqdTwBaUSzFmjYH0TI09tHmTyVLA= X-Received: by 2002:a1f:218b:: with SMTP id h133-v6mr5265577vkh.31.1527184948316; Thu, 24 May 2018 11:02:28 -0700 (PDT) MIME-Version: 1.0 Sender: etnapierala@gmail.com Received: by 2002:ab0:5a81:0:0:0:0:0 with HTTP; Thu, 24 May 2018 11:02:27 -0700 (PDT) In-Reply-To: <94801dec-73b4-63f3-6f01-b0e175073d6e@selasky.org> References: <201805232006.w4NK64jS044384@repo.freebsd.org> <9B0033E1-56EC-4CA0-BC28-056871B32B0A@panasas.com> <94801dec-73b4-63f3-6f01-b0e175073d6e@selasky.org> From: Edward Napierala Date: Thu, 24 May 2018 19:02:27 +0100 X-Google-Sender-Auth: RRB_d_axXw0F61jt3x59qbCj2QQ Message-ID: Subject: Re: svn commit: r334115 - in head: share/man/man4 sys/dev/usb/template To: Hans Petter Selasky Cc: "H. Schmalzbauer - OmniLAN" , Ravi Pokala , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 18:02:29 -0000 2018-05-24 11:01 GMT+01:00 Hans Petter Selasky : > On 05/24/18 11:59, Edward Napierala wrote: > >> 2018-05-24 8:41 GMT+01:00 H. Schmalzbauer - OmniLAN < >> h.schmalzbauer@omnilan.de>: >> >> Am 23.05.2018 um 22:35 schrieb Ravi Pokala: >>> >>> Hi Traz, >>>> >>>> You're referring to power consumption in terms of (milli)Amps. That's >>>> not >>>> right; power is measured in Watts. What you're actually talking about = is >>>> *current*. And it looks like in some situations USB devices can draw >>>> more >>>> than 500mA. >>>> >>>> >>> Since the voltage isn't a variable when talking about USB power, speaki= ng >>> of "power" while refering to current seems valid to me =E2=80=93 it's 5= V only >>> and >>> those who read that don't even need to do any math in head. >>> I never read 2500mW in USB world, 500mA is common. >>> Just my 2=C2=A2 >>> >>> >> I've just did some googling, and it seems you're right - while from >> physics >> point of view mA is definitely current and not power, pretty much >> everywhere I look the USB power (reported in bMaxPower) is specified in >> mA, >> not mW. Thus, I'm leaning toward leaving it as it is - wrong from a >> physics point of view, but aligned with the the USB naming convention. >> >> > Even though implict, we could specify mA at 5Volt in the sysctl > description. Good idea, done! From owner-svn-src-head@freebsd.org Thu May 24 18:22:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30243EFA68D; Thu, 24 May 2018 18:22:06 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D10177BDCE; Thu, 24 May 2018 18:22:05 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B242C15DCB; Thu, 24 May 2018 18:22:05 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OIM5x7026434; Thu, 24 May 2018 18:22:05 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OIM5GD026433; Thu, 24 May 2018 18:22:05 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805241822.w4OIM5GD026433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 18:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334174 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 18:22:06 -0000 Author: mmacy Date: Thu May 24 18:22:05 2018 New Revision: 334174 URL: https://svnweb.freebsd.org/changeset/base/334174 Log: AF_UNIX in connectat unp and unp2 can be the same Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Thu May 24 18:02:02 2018 (r334173) +++ head/sys/kern/uipc_usrreq.c Thu May 24 18:22:05 2018 (r334174) @@ -1610,14 +1610,18 @@ unp_connectat(int fd, struct socket *so, struct sockad mac_socketpeer_set_from_socket(so, so2); mac_socketpeer_set_from_socket(so2, so); #endif - } else - unp_pcb_lock2(unp, unp2); - + } else { + if (unp == unp2) + UNP_PCB_LOCK(unp); + else + unp_pcb_lock2(unp, unp2); + } KASSERT(unp2 != NULL && so2 != NULL && unp2->unp_socket == so2 && sotounpcb(so2) == unp2, ("%s: unp2 %p so2 %p", __func__, unp2, so2)); error = unp_connect2(so, so2, PRU_CONNECT); - UNP_PCB_UNLOCK(unp2); + if (unp != unp2) + UNP_PCB_UNLOCK(unp2); UNP_PCB_UNLOCK(unp); bad2: mtx_unlock(vplock); From owner-svn-src-head@freebsd.org Thu May 24 18:22:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 984D3EFA6B6; Thu, 24 May 2018 18:22:14 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 038237BEC4; Thu, 24 May 2018 18:22:13 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9913915DD1; Thu, 24 May 2018 18:22:13 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OIMDKG026489; Thu, 24 May 2018 18:22:13 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OIMDpU026488; Thu, 24 May 2018 18:22:13 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805241822.w4OIMDpU026488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 18:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334175 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334175 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 18:22:14 -0000 Author: mmacy Date: Thu May 24 18:22:13 2018 New Revision: 334175 URL: https://svnweb.freebsd.org/changeset/base/334175 Log: AF_UNIX: evidently Samba likes to connect a unix socket to itself, fix locking Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Thu May 24 18:22:05 2018 (r334174) +++ head/sys/kern/uipc_usrreq.c Thu May 24 18:22:13 2018 (r334175) @@ -1069,6 +1069,13 @@ uipc_send(struct socket *so, int flags, struct mbuf *m break; } } + if (__predict_false(unp == unp2)) { + if (unp->unp_socket == NULL) { + error = ENOTCONN; + break; + } + goto connect_self; + } unp_pcb_owned_lock2(unp, unp2, freed); if (__predict_false(freed)) { UNP_PCB_UNLOCK(unp); @@ -1088,6 +1095,7 @@ uipc_send(struct socket *so, int flags, struct mbuf *m error = ENOTCONN; break; } + connect_self: if (unp2->unp_flags & UNP_WANTCRED) control = unp_addsockcred(td, control); if (unp->unp_addr != NULL) @@ -1107,7 +1115,8 @@ uipc_send(struct socket *so, int flags, struct mbuf *m } if (nam != NULL) unp_disconnect(unp, unp2); - UNP_PCB_UNLOCK(unp2); + if (__predict_true(unp != unp2)) + UNP_PCB_UNLOCK(unp2); UNP_PCB_UNLOCK(unp); break; } From owner-svn-src-head@freebsd.org Thu May 24 18:32:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0604EFAB73; Thu, 24 May 2018 18:32:55 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82A517C89C; Thu, 24 May 2018 18:32:55 +0000 (UTC) (envelope-from brooks@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63D2315FA4; Thu, 24 May 2018 18:32:55 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OIWtPo032660; Thu, 24 May 2018 18:32:55 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OIWtNV032659; Thu, 24 May 2018 18:32:55 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201805241832.w4OIWtNV032659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 24 May 2018 18:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334176 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 334176 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 18:32:56 -0000 Author: brooks Date: Thu May 24 18:32:54 2018 New Revision: 334176 URL: https://svnweb.freebsd.org/changeset/base/334176 Log: Indicate the brk/sbrk are deprecated and not portable. More firmly suggest mmap(2) instead. Include the history of arm64 and riscv shipping without brk/sbrk. Mention that sbrk(0) produces unreliable results. Reviewed by: emaste, Marcin Cieślak MFC after: 3 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15535 Modified: head/lib/libc/sys/brk.2 Modified: head/lib/libc/sys/brk.2 ============================================================================== --- head/lib/libc/sys/brk.2 Thu May 24 18:22:13 2018 (r334175) +++ head/lib/libc/sys/brk.2 Thu May 24 18:32:54 2018 (r334176) @@ -28,7 +28,7 @@ .\" @(#)brk.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd December 15, 2015 +.Dd May 24, 2018 .Dt BRK 2 .Os .Sh NAME @@ -51,6 +51,10 @@ and .Fn sbrk functions are legacy interfaces from before the advent of modern virtual memory management. +They are deprecated and not present on the arm64 or riscv architectures. +The +.Xr mmap 2 +interface should be used to allocate pages instead. .Ef .Pp The @@ -152,6 +156,11 @@ The .Fn brk function appeared in .At v7 . +.Fx 11.0 +introduced the arm64 and riscv architectures which do not support +.Fn brk +or +.Fn sbrk . .Sh BUGS Mixing .Fn brk @@ -168,3 +177,9 @@ It is not possible to distinguish this from a failure caused by exceeding the maximum size of the data segment without consulting .Xr getrlimit 2 . +.Pp +.Fn sbrk +is sometimes used to monitor heap use by calling with an argument of 0. +The result is unlikely to reflect actual utilization in combination with an +.Xr mmap 2 +based malloc. From owner-svn-src-head@freebsd.org Thu May 24 18:49:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF1B2EFB27B; Thu, 24 May 2018 18:49:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7797D4B2; Thu, 24 May 2018 18:49:20 +0000 (UTC) (envelope-from bdrewery@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5EB5E16163; Thu, 24 May 2018 18:49:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OInKvA038468; Thu, 24 May 2018 18:49:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OInKV0038467; Thu, 24 May 2018 18:49:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201805241849.w4OInKV0038467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 24 May 2018 18:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334177 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 334177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 18:49:21 -0000 Author: bdrewery Date: Thu May 24 18:49:19 2018 New Revision: 334177 URL: https://svnweb.freebsd.org/changeset/base/334177 Log: rescue: Restore 'make depend' call to fix WITH_META_MODE after r334008. The rescue/crunchgen build avoids linking binaries for the objects it is building by doing 'make foo.o bar.o' rather than 'make all'. This breaks the implicit 'beforebuild: depend' dependency which ensured that all source files were generated and up-to-date before building the object files. This manifested as a WITH_META_MODE build problem for bin/sh in the rescue build with syntax.{c,h} not properly being regenerated or recognized as changed in the dependency graph. Sponsored by: Dell EMC MFC after: 1 week Reported by: many Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Thu May 24 18:32:54 2018 (r334176) +++ head/share/mk/bsd.crunchgen.mk Thu May 24 18:49:19 2018 (r334177) @@ -122,10 +122,8 @@ ${OUTPUTS}: ${CONF} ${CRUNCHGEN} -fq -m ${OUTMK} -c ${OUTC} ${CONF} # Avoid redundantly calling 'make objs' which we've done by our # own dependencies. - # Also avoid unneeded 'make depend' call. sed -i '' \ -e "s/^\(${PROG}:.*\) \$$(SUBMAKE_TARGETS)/\1/" \ - -e '/$$(CRUNCHMAKE) $$(BUILDOPTS).* \ &&.*/d' \ ${OUTMK} # These 2 targets cannot use .MAKE since they depend on the generated From owner-svn-src-head@freebsd.org Thu May 24 20:26:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 610BBEFD408; Thu, 24 May 2018 20:26:40 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8C2082224; Thu, 24 May 2018 20:26:38 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DDED17205; Thu, 24 May 2018 20:26:38 +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 w4OKQbhT088804; Thu, 24 May 2018 20:26:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OKQbug088803; Thu, 24 May 2018 20:26:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201805242026.w4OKQbug088803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 24 May 2018 20:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334179 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 334179 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 20:26:40 -0000 Author: markj Date: Thu May 24 20:26:37 2018 New Revision: 334179 URL: https://svnweb.freebsd.org/changeset/base/334179 Log: Update r334154 with review feedback from D15490. An old revision was committed by accident. Differential Revision: https://reviews.freebsd.org/D15490 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu May 24 18:53:29 2018 (r334178) +++ head/sys/vm/vm_pageout.c Thu May 24 20:26:37 2018 (r334179) @@ -1111,16 +1111,16 @@ dolaundry: * Compute the number of pages we want to try to move from the * active queue to either the inactive or laundry queue. * - * When scanning active pages, we make clean pages count more heavily - * towards the page shortage than dirty pages. This is because dirty - * pages must be laundered before they can be reused and thus have less - * utility when attempting to quickly alleviate a shortage. However, - * this weighting also causes the scan to deactivate dirty pages more - * aggressively, improving the effectiveness of clustering and - * ensuring that they can eventually be reused. + * When scanning active pages during a shortage, we make clean pages + * count more heavily towards the page shortage than dirty pages. + * This is because dirty pages must be laundered before they can be + * reused and thus have less utility when attempting to quickly + * alleviate a free page shortage. However, this weighting also + * causes the scan to deactivate dirty pages more aggressively, + * improving the effectiveness of clustering. */ static int -vm_pageout_scan_active_target(struct vm_domain *vmd) +vm_pageout_active_target(struct vm_domain *vmd) { int shortage; @@ -1169,12 +1169,12 @@ vm_pageout_scan_active(struct vm_domain *vmd, int page * candidates. Held pages may be deactivated. * * To avoid requeuing each page that remains in the active queue, we - * implement the CLOCK algorithm. To maintain consistency in the - * generic page queue code, pages are inserted at the tail of the - * active queue. We thus use two hands, represented by marker pages: - * scans begin at the first hand, which precedes the second hand in - * the queue. When the two hands meet, they are moved back to the - * head and tail of the queue, respectively, and scanning resumes. + * implement the CLOCK algorithm. To keep the implementation of the + * enqueue operation consistent for all page queues, we use two hands, + * represented by marker pages. Scans begin at the first hand, which + * precedes the second hand in the queue. When the two hands meet, + * they are moved back to the head and tail of the queue, respectively, + * and scanning resumes. */ max_scan = page_shortage > 0 ? pq->pq_cnt : min_scan; mtx = NULL; @@ -1254,9 +1254,12 @@ act_scan: * through the inactive queue before moving to the * laundry queues. This gives them some extra time to * be reactivated, potentially avoiding an expensive - * pageout. During a page shortage, the inactive queue - * is necessarily small, so we may move dirty pages - * directly to the laundry queue. + * pageout. However, during a page shortage, the + * inactive queue is necessarily small, and so dirty + * pages would only spend a trivial amount of time in + * the inactive queue. Therefore, we might as well + * place them directly in the laundry queue to reduce + * queuing overhead. */ if (page_shortage <= 0) vm_page_deactivate(m); @@ -1941,7 +1944,7 @@ vm_pageout_worker(void *arg) * indicates that we must aggressively deactivate pages to avoid * a shortfall. */ - shortage = vm_pageout_scan_active_target(vmd) + addl_shortage; + shortage = vm_pageout_active_target(vmd) + addl_shortage; vm_pageout_scan_active(vmd, shortage); /* From owner-svn-src-head@freebsd.org Thu May 24 19:22:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 118A9EFC3A6; Thu, 24 May 2018 19:22:39 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 991817EF97; Thu, 24 May 2018 19:22:38 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by mail-io0-x242.google.com with SMTP id e20-v6so3652745iof.4; Thu, 24 May 2018 12:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+B9bSDHO9KRjqvKuIRa7gv+grt3B0RLaEozYoWcXmdk=; b=THuw/oLIHxlu5eAJiDAe6UGKZ3JYPgyjZOpf2p3qA+MlfNB1DI0gOqxwo0nlUAqCyF QjzBC4+v2DE+PLTl3CWo6Vh9jvJNddY2NMagT+EgpEttl9gzNPWjAJEnjvOv97s/s+xU 2eBZabFm4lZo9wjMWJWRzBXl2ZcRtGeL++4WmfXkrvvD5oCS3uPHXotOxFbz8lnkrNo7 vRtAj2MK7Y0SxlNTnPnJ3OhArAIO2d3kmr2WAnbW6ooz1Fm/LqVndAKcFu/+t0E39250 K35stXo4kxZ7YDWqC2PAYe3WuXYW72phVn0EJb126kQgH2rgCkhFPwrTOdL5XrtsM1Mm M30A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+B9bSDHO9KRjqvKuIRa7gv+grt3B0RLaEozYoWcXmdk=; b=hwQr+xgSqtcYi4zbqLxzhPl6QWsp6hniXFfCf1H4amCC0eBgCxWLvAvsUosfZpvaNh PDS3qdntq/uNCvcss25voDfBdaINQALWU1kZsvfhUshJzHgXkXHimCu1SvEePELKe5zt ABNFQ24syBlk3u+/BeYs5kyhSAUAR9wp+wZip3qyeFe3BcrUunXb1FA/qz85pt5SKVfP h0RfI4bikCQiuxucgQCnRAA1fp+R2yRk+EYHwyO2VSwrE5jK+Fv+zY2odvGwKILuqZla z5XGbg1UynH5UoshdrzncX3Z0dCItYGkQbhhVgIUDUVjlc76l4J/Uz40/E0j4/50i+/R Hjvw== X-Gm-Message-State: ALKqPwdu4vNwCnjSmyfnc7Lsmlb5iBUrEcRq+oZYnDWWWnBFYjurDLTz p7OMVuMiWEj5Si++Fc5ialmNUDwhkkP7S9I/p3qIEA== X-Google-Smtp-Source: ADUXVKLxarFDBLO9k9rsiTXy9rWWFkLRtxAu80ob1OLUHFrCBkOxzVJAhCnnsbBC9wTl70BkZQSF4/jriYgk/0Zy8IU= X-Received: by 2002:a6b:6707:: with SMTP id b7-v6mr2792351ioc.132.1527189757877; Thu, 24 May 2018 12:22:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Thu, 24 May 2018 12:22:37 -0700 (PDT) In-Reply-To: <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> From: Matthew Macy Date: Thu, 24 May 2018 12:22:37 -0700 Message-ID: Subject: Re: Deorbiting i386 To: Andrew Gallatin Cc: Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Thu, 24 May 2018 20:30:13 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 19:22:39 -0000 On Thu, May 24, 2018 at 8:51 AM, Andrew Gallatin wrote: > On 05/23/18 20:09, Pedro Giffuni wrote: >> >> FWIW; >> >> On 23/05/2018 17:18, Cy Schubert wrote: >>> >>> In message <20180523202228.GC58848@spindle.one-eyed-alien.net>, Brooks >>> Davis wr >>> ites: >>>> >>>> >>>> --QRj9sO5tAVLaXnSD >>>> Content-Type: text/plain; charset=us-ascii >>>> Content-Disposition: inline >>>> Content-Transfer-Encoding: quoted-printable >>>> >>>> On Thu, May 24, 2018 at 02:53:16AM +0700, Eugene Grosbein wrote: >>>>> >>>>> 24.05.2018 2:30, Cy Schubert wrote: >>>>> =20 >>>>>> >>>>>> Except for old computers and old software that segfaults on 64-bit, >>>>>> how= >>>> >>>> many people still use i386? >>>>>> >>>>>> =20 >>>>>> Full disclosure: I'd like to see i386 deorbited before I retire. >>>>> >>>>> =20 >>>>> Plese don't. I routinely use FreeBSD11/i386 for cheap VPS hosts having >>>>> le= >>>> >>>> ss than 2G memory >>>>> >>>>> because amd64 has noticeable overhead. I even have ZFS-only i386 VPS, >>>>> her= >>>> >>>> e is live example with 1G only: >>>>> >>>>> =20 >>>>> Mem: 10M Active, 69M Inact, 230M Wired, 685M Free >>>>> ARC: 75M Total, 1953K MFU, 31M MRU, 172K Anon, 592K Header, 42M Other >>>>> 3500K Compressed, 29M Uncompressed, 8.61:1 Ratio >>>>> Swap: 1024M Total, 1024M Free >>>>> =20 >>>>> The VPS has only 20G of disk space and ZFS compression gives >>>>> compressratio 2.22x for ports, 2.51x for src, 2.29x for obj >>>>> and 1.95x for installed i386 system plus other software and data. >>>> >>>> I think we're quite a ways from being ready to axe i386. >>>> >>>> For VPS applications, we should probably get x32 support in place which >>>> should give us the best of both worlds. >>>> >>>> That said, we either need to rev the i386 ABI to use a 64-bit time_t or >>>> kill it in the not to distant future or we risk embedded systems failing >>>> in place in 2038. If we assume a 15 year life for most equipment to >>>> fail electrically or mechanically that says FreeBSD 13 shouldn't support >>>> the current i386 ABI. >>> >>> Rereading this, I'm confused. FreeBSD 13? 2023? Either works for me, >>> though 2023 is more reasonable and gives people more than enough time >>> to migrate. >>> >>> >> IMHO, we shouldn't at all plan to deorbit i386: it is a platform that is >> very easy to test on Jenkins/bhyve. If we want to keep FreeBSD multiplatform >> it is way easier to test and find bugs on i386 than on other 32 bit >> platforms. It is fully functional and much more than historic value. >> >> X32 sadly didn't catch on linux on AFAICT, although I wouldn't object to >> it appearing on FreeBSD. >> >> Pedro > > On the other hand, supporting all these architectures makes it rather > challenging to make changes to the kernel & feel like you've tested > them sufficiently. Even build testing a header file change can take > the better part of a day with make universe. I'm quite jealous of > Dragonfly's amd64 only approach for this reason. > > I realize this may be seen as ironic, as I'm one of the people that > dragged FreeBSD into the multiplatform world with the FreeBSD/alpha > port 20 years ago. On the other hand, I was happy to retire > FreeBSD/alpha when the Alpha stopped being commercially viable. > I always viewed NetBSD as the proper place for "historical" platforms > to run BSD. I wish we could retire some of the minor/historical > platforms that we have now. > Additional platforms don't come without a cost. When I was doing i386-xen and sun4v alc would routinely break the port and I was _fine_ with that. He shouldn't be slowing down for something marginal. When it was clear to me that sun4v was never going to get much uptake I asked that it be removed. i386 is definitely on the wane, but so long as it's used by more than a handful of people it will be supported. All you need to know about sparc64 vitality is that HEAD didn't boot for 3 months until last week. -M From owner-svn-src-head@freebsd.org Thu May 24 20:41:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DE34EFD9FA; Thu, 24 May 2018 20:41:21 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com [IPv6:2607:f8b0:400d:c0d::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C0E982DFC; Thu, 24 May 2018 20:41:21 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qt0-x233.google.com with SMTP id 32-v6so3852031qtr.13; Thu, 24 May 2018 13:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=r1uAJvqBN3pKMlVSaSGg0jC7raerWh+/6Hw8CeG0JYk=; b=Wj5Lrw5w/rY2yk/fzCjgsLrMvXVUfvhWM+jGP+Ord4PFmJhFMf7HjDCGZzcFvAEjBI gLe8l05X/My0VJ+IKwwVcUUbimU2R2H/sMCZ0WwOYXg2RlasWVGNFu3AhlI56qXXtoYY 40wHlkivxJOJ/3QJkr5yLpbo5yJpRXibOtkzQ7ecBdNyjPhkskX1nQeI0oud4M8VhKN1 bo6swdBziuWvRcACBvr78EhVYJ/IzQM+ZSRWLXV2EAAbvJgYvvZ2RbxBdNgwTnsQajsz pNy6imXu0H1AyO8kvV+6NGwe/C0qYkiJcKv/J5NImvVA0mfth6VhOzgennk9OfbuE5C/ dIAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=r1uAJvqBN3pKMlVSaSGg0jC7raerWh+/6Hw8CeG0JYk=; b=lnolFk7oQYSAfQsMpawmDFpEvsDvwXBIfRs916a0byp9LdtIOZ2U6rww+XcbquXYZb dPvGSa8ohY20jpfM49ar010Y+/yb+UN8SGwatYsYv80FX/24OfpzSH+Uq3ctMhyx+RGK nmslv60GVlVMaF+HZD7mrUHC9k9IyhmS+GT2OHKF3eMG7mT/Xmu3IgI9u1CxYSwUtKxW 0VFfWRnlHId2VvRAQoVCec3lYiD4g+KddEis4zoFdr07tOprc9acg8OkIIOu3cwbcZDF Qp7Q0a5wvs2PuO1242fu5fq2+l6vFIBHrECtB0hzs9MVZJzFAgMkGDddaNFWRPMVPBZm 7iTA== X-Gm-Message-State: ALKqPwdlTOT4IiaLImVw7UAbQNBZJjpryrHMI1SMgLjKWmhUrS6VvwSP tQk4XC3WFxUEvEN19CC6x/ur2yKZ X-Google-Smtp-Source: ADUXVKInlP6wb1K36sp7p0aOa0yqIIz4KBnYvyyHvj72rRg52eITGmNu3Yke4otOjHlaywiyagmBgQ== X-Received: by 2002:ac8:2315:: with SMTP id a21-v6mr8899341qta.73.1527194480378; Thu, 24 May 2018 13:41:20 -0700 (PDT) Received: from mbp-eth.home ([177.53.86.172]) by smtp.gmail.com with ESMTPSA id 29-v6sm18390545qto.42.2018.05.24.13.41.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 13:41:19 -0700 (PDT) Subject: Re: svn commit: r333407 - head/share/mk To: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805091344.w49Dist5061908@repo.freebsd.org> From: Renato Botelho Message-ID: <33986467-cec5-a6b5-8a05-a4f07f557742@gmail.com> Date: Thu, 24 May 2018 17:41:15 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201805091344.w49Dist5061908@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 20:41:21 -0000 On 09/05/18 10:44, Brad Davis wrote: > Author: brd > Date: Wed May 9 13:44:54 2018 > New Revision: 333407 > URL: https://svnweb.freebsd.org/changeset/base/333407 > > Log: > Enable directory creation with FILESDIR. > > This is part of packaging base work. > > Reviewed by: will > Approved by: bapt (mentor), allanjude (mentor) > Differential Revision: https://reviews.freebsd.org/D15130 > > Modified: > head/share/mk/bsd.files.mk > head/share/mk/bsd.own.mk > > Modified: head/share/mk/bsd.files.mk > ============================================================================== > --- head/share/mk/bsd.files.mk Wed May 9 12:25:23 2018 (r333406) > +++ head/share/mk/bsd.files.mk Wed May 9 13:44:54 2018 (r333407) > @@ -67,7 +67,7 @@ STAGE_AS_${file:T}= ${${group}NAME_${file:T}} > STAGE_DIR.${file:T}= ${STAGE_OBJTOP}${${group}DIR_${file:T}} > stage_as.${file:T}: ${file} > > -installfiles-${group}: _${group}INS_${file:T} > +installfiles-${group}: installdirs-${group} _${group}INS_${file:T} > _${group}INS_${file:T}: ${file} > ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \ > -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ > @@ -77,10 +77,24 @@ _${group}INS_${file:T}: ${file} > _${group}FILES+= ${file} > .endif > .endfor > + > + > +installdirs-${group}: > + @echo installing dirs ${group}DIR ${${group}DIR} I'm seeing this message while running `make -s installworld`. -- Renato Botelho From owner-svn-src-head@freebsd.org Thu May 24 20:43:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5651EEFDAF1; Thu, 24 May 2018 20:43:42 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2F4583174; Thu, 24 May 2018 20:43:41 +0000 (UTC) (envelope-from alc@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1E731753C; Thu, 24 May 2018 20:43:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OKhftC098686; Thu, 24 May 2018 20:43:41 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OKhfhp098685; Thu, 24 May 2018 20:43:41 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201805242043.w4OKhfhp098685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 24 May 2018 20:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334180 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 334180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 20:43:42 -0000 Author: alc Date: Thu May 24 20:43:41 2018 New Revision: 334180 URL: https://svnweb.freebsd.org/changeset/base/334180 Log: Eliminate an unused parameter from vm_fault_populate(). Reviewed by: kib MFC after: 10 days Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Thu May 24 20:26:37 2018 (r334179) +++ head/sys/vm/vm_fault.c Thu May 24 20:43:41 2018 (r334180) @@ -377,8 +377,8 @@ vm_fault_populate_cleanup(vm_object_t object, vm_pinde } static int -vm_fault_populate(struct faultstate *fs, vm_offset_t vaddr, vm_prot_t prot, - int fault_type, int fault_flags, boolean_t wired, vm_page_t *m_hold) +vm_fault_populate(struct faultstate *fs, vm_prot_t prot, int fault_type, + int fault_flags, boolean_t wired, vm_page_t *m_hold) { vm_page_t m; vm_pindex_t map_first, map_last, pager_first, pager_last, pidx; @@ -740,8 +740,8 @@ RetryFault:; if (fs.object == fs.first_object && (fs.first_object->flags & OBJ_POPULATE) != 0 && fs.first_object->shadow_count == 0) { - rv = vm_fault_populate(&fs, vaddr, prot, - fault_type, fault_flags, wired, m_hold); + rv = vm_fault_populate(&fs, prot, fault_type, + fault_flags, wired, m_hold); switch (rv) { case KERN_SUCCESS: case KERN_FAILURE: From owner-svn-src-head@freebsd.org Thu May 24 21:11:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23912EFE533; Thu, 24 May 2018 21:11:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB2BC8414A; Thu, 24 May 2018 21:11:24 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADE36178CC; Thu, 24 May 2018 21:11:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OLBO4A009830; Thu, 24 May 2018 21:11:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OLBOtv009829; Thu, 24 May 2018 21:11:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201805242111.w4OLBOtv009829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 24 May 2018 21:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334181 - in head/sys: conf mips/mips X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: conf mips/mips X-SVN-Commit-Revision: 334181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 21:11:25 -0000 Author: imp Date: Thu May 24 21:11:24 2018 New Revision: 334181 URL: https://svnweb.freebsd.org/changeset/base/334181 Log: Make memmove an alias for memcpy memcpy was an alias for bcopy with arg swap. This code handles overlapping copies, so making memmove an alias is safe. We can eliminate the call from libkern's memmove to this bcopy as a result. Differential Revision: https://reviews.freebsd.org/D15374 Modified: head/sys/conf/files.mips head/sys/mips/mips/bcopy.S Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Thu May 24 20:43:41 2018 (r334180) +++ head/sys/conf/files.mips Thu May 24 21:11:24 2018 (r334181) @@ -61,7 +61,6 @@ libkern/ffsll.c standard libkern/fls.c standard libkern/flsl.c standard libkern/flsll.c standard -libkern/memmove.c standard libkern/cmpdi2.c optional mips | mipshf | mipsel | mipselhf libkern/ucmpdi2.c optional mips | mipshf | mipsel | mipselhf libkern/ashldi3.c standard Modified: head/sys/mips/mips/bcopy.S ============================================================================== --- head/sys/mips/mips/bcopy.S Thu May 24 20:43:41 2018 (r334180) +++ head/sys/mips/mips/bcopy.S Thu May 24 21:11:24 2018 (r334181) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #define SIZEREG a2 LEAF(memcpy) +XLEAF(memmove) .set noat .set noreorder From owner-svn-src-head@freebsd.org Thu May 24 21:11:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA49AEFE577; Thu, 24 May 2018 21:11:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EABD84267; Thu, 24 May 2018 21:11:34 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DE5F178DD; Thu, 24 May 2018 21:11:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OLBYfS009939; Thu, 24 May 2018 21:11:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OLBXoo009938; Thu, 24 May 2018 21:11:33 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201805242111.w4OLBXoo009938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 24 May 2018 21:11:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334183 - in head/sys: conf i386/i386 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: conf i386/i386 X-SVN-Commit-Revision: 334183 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 21:11:34 -0000 Author: imp Date: Thu May 24 21:11:33 2018 New Revision: 334183 URL: https://svnweb.freebsd.org/changeset/base/334183 Log: Make memmove and bcopy share code Make memmove the primary interface, but have bcopy be an alternative entry point that jumps into memmove. This will slightly pessimize bcopy calls, but those are about to get much rarer. Return dst always, but it will be ignored by bcopy callers. We can remove just the alt entry point if we ever remove bcopy entirely. Differential Revision: https://reviews.freebsd.org/D15374 Modified: head/sys/conf/files.i386 head/sys/i386/i386/support.s Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu May 24 21:11:28 2018 (r334182) +++ head/sys/conf/files.i386 Thu May 24 21:11:33 2018 (r334183) @@ -553,7 +553,6 @@ kern/subr_sfbuf.c standard libkern/divdi3.c standard libkern/ffsll.c standard libkern/flsll.c standard -libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard libkern/qdivrem.c standard Modified: head/sys/i386/i386/support.s ============================================================================== --- head/sys/i386/i386/support.s Thu May 24 21:11:28 2018 (r334182) +++ head/sys/i386/i386/support.s Thu May 24 21:11:33 2018 (r334183) @@ -146,6 +146,7 @@ ENTRY(fillw) END(fillw) /* + * memmove(dst, src, cnt) (return dst) * bcopy(src, dst, cnt) * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 */ @@ -156,6 +157,15 @@ ENTRY(bcopy) pushl %edi movl 8(%ebp),%esi movl 12(%ebp),%edi + jmp 1f +ALTENTRY(memmove) + pushl %ebp + movl %esp,%ebp + pushl %esi + pushl %edi + movl 8(%ebp),%edi + movl 12(%ebp),%esi +1: movl 16(%ebp),%ecx movl %edi,%eax @@ -172,6 +182,7 @@ ENTRY(bcopy) movsb popl %edi popl %esi + movl 8(%ebp),%eax /* return dst for memmove */ popl %ebp ret @@ -194,6 +205,7 @@ ENTRY(bcopy) popl %edi popl %esi cld + movl 8(%ebp),%eax /* return dst for memmove */ popl %ebp ret END(bcopy) From owner-svn-src-head@freebsd.org Thu May 24 21:11:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26C6FEFE570; Thu, 24 May 2018 21:11:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E58D84208; Thu, 24 May 2018 21:11:30 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B217178D3; Thu, 24 May 2018 21:11:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OLBT1Y009884; Thu, 24 May 2018 21:11:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OLBTRv009882; Thu, 24 May 2018 21:11:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201805242111.w4OLBTRv009882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 24 May 2018 21:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334182 - in head/sys: conf sparc64/sparc64 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: conf sparc64/sparc64 X-SVN-Commit-Revision: 334182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 21:11:33 -0000 Author: imp Date: Thu May 24 21:11:28 2018 New Revision: 334182 URL: https://svnweb.freebsd.org/changeset/base/334182 Log: Define memmove and make bcopy alt entry point Make a memmove entry point just before bcopy and have it swap its args before continuing into the body of bcopy. Adjust the returns to return dst (original %o0 swapped to %o1) from both entry points. bcopy users will ignore them. Since these are in the branch delay slot, it should take no additional time. I use %o6 for this rather than just move %o1 back to %o2 at the end since my sparc64 assembler knowledge is weak. Also eliminate wrapper call from memmove to bcopy. Differential Revision: https://reviews.freebsd.org/D15374 Modified: head/sys/conf/files.sparc64 head/sys/sparc64/sparc64/support.S Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Thu May 24 21:11:24 2018 (r334181) +++ head/sys/conf/files.sparc64 Thu May 24 21:11:28 2018 (r334182) @@ -71,7 +71,6 @@ libkern/ffsll.c standard libkern/fls.c standard libkern/flsl.c standard libkern/flsll.c standard -libkern/memmove.c standard sparc64/central/central.c optional central sparc64/ebus/ebus.c optional ebus sparc64/ebus/epic.c optional epic ebus Modified: head/sys/sparc64/sparc64/support.S ============================================================================== --- head/sys/sparc64/sparc64/support.S Thu May 24 21:11:24 2018 (r334181) +++ head/sys/sparc64/sparc64/support.S Thu May 24 21:11:28 2018 (r334182) @@ -265,10 +265,18 @@ ENTRY(bcmp) END(bcmp) /* + * void *memmove(void *dst, const void *src, size_t len) * void bcopy(const void *src, void *dst, size_t len) */ -ENTRY(bcopy) +ENTRY(memmove) /* + * Swap src/dst for memmove/bcopy differences + */ + mov %o0, %o6 + mov %o1, %o0 + mov %o6, %o1 +ALTENTRY(bcopy) + /* * Check for overlap, and copy backwards if so. */ sub %o1, %o0, %g1 @@ -290,15 +298,15 @@ ENTRY(bcopy) ba %xcc, 1b stb %g1, [%o1] 2: retl - nop + mov %o6, %o0 /* * Do the fast version. */ 3: _MEMCPY(%o1, %o0, %o2, EMPTY, EMPTY, EMPTY, EMPTY) retl - nop -END(bcopy) + mov %o6, %o0 +END(memmove) /* * void bzero(void *b, size_t len) From owner-svn-src-head@freebsd.org Thu May 24 21:11:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 035FDEFE5B7; Thu, 24 May 2018 21:11:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33EDA8435F; Thu, 24 May 2018 21:11:38 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 929CE178E0; Thu, 24 May 2018 21:11:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OLBc0i009989; Thu, 24 May 2018 21:11:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OLBc4q009988; Thu, 24 May 2018 21:11:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201805242111.w4OLBc4q009988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 24 May 2018 21:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334184 - head/sys/libkern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/libkern X-SVN-Commit-Revision: 334184 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 21:11:41 -0000 Author: imp Date: Thu May 24 21:11:38 2018 New Revision: 334184 URL: https://svnweb.freebsd.org/changeset/base/334184 Log: This is no unreferenced, so retire it. Differential Revision: https://reviews.freebsd.org/D15374 Deleted: head/sys/libkern/memmove.c From owner-svn-src-head@freebsd.org Thu May 24 21:13:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B19DEFE73B; Thu, 24 May 2018 21:13:47 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF9AB848C2; Thu, 24 May 2018 21:13:46 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D13CA17A24; Thu, 24 May 2018 21:13:46 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OLDkEr014694; Thu, 24 May 2018 21:13:46 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OLDk6f014693; Thu, 24 May 2018 21:13:46 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805242113.w4OLDk6f014693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 21:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334185 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334185 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 21:13:47 -0000 Author: mmacy Date: Thu May 24 21:13:46 2018 New Revision: 334185 URL: https://svnweb.freebsd.org/changeset/base/334185 Log: AF_UNIX: It is possible for UNIX datagram sockets to be connected to themselves. The updated code assumed that that could not happen and would try to lock the unp mutex twice. There may be a lingering issue here but this fixes it for the reporter. PR: 228458 Reported by: marieheleneka at gmail.com Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Thu May 24 21:11:38 2018 (r334184) +++ head/sys/kern/uipc_usrreq.c Thu May 24 21:13:46 2018 (r334185) @@ -722,7 +722,9 @@ uipc_close(struct socket *so) } unp2 = unp->unp_conn; unp_pcb_hold(unp); - if (unp2 != NULL) { + if (__predict_false(unp == unp2)) { + unp_disconnect(unp, unp2); + } else if (unp2 != NULL) { unp_pcb_hold(unp2); unp_pcb_owned_lock2(unp, unp2, freed); unp_disconnect(unp, unp2); @@ -747,9 +749,13 @@ uipc_connect2(struct socket *so1, struct socket *so2) KASSERT(unp != NULL, ("uipc_connect2: unp == NULL")); unp2 = so2->so_pcb; KASSERT(unp2 != NULL, ("uipc_connect2: unp2 == NULL")); - unp_pcb_lock2(unp, unp2); + if (unp != unp2) + unp_pcb_lock2(unp, unp2); + else + UNP_PCB_LOCK(unp); error = unp_connect2(so1, so2, PRU_CONNECT2); - UNP_PCB_UNLOCK(unp2); + if (unp != unp2) + UNP_PCB_UNLOCK(unp2); UNP_PCB_UNLOCK(unp); return (error); } @@ -783,29 +789,30 @@ uipc_detach(struct socket *so) mtx_lock(vplock); } UNP_PCB_LOCK(unp); - if ((unp2 = unp->unp_conn) != NULL) { - unp_pcb_owned_lock2(unp, unp2, freeunp); - if (freeunp) - unp2 = NULL; - } if (unp->unp_vnode != vp && unp->unp_vnode != NULL) { if (vplock) mtx_unlock(vplock); UNP_PCB_UNLOCK(unp); - if (unp2) - UNP_PCB_UNLOCK(unp2); goto restart; } if ((unp->unp_flags & UNP_NASCENT) != 0) { - if (unp2) - UNP_PCB_UNLOCK(unp2); goto teardown; } if ((vp = unp->unp_vnode) != NULL) { VOP_UNP_DETACH(vp); unp->unp_vnode = NULL; } + if (__predict_false(unp == unp->unp_conn)) { + unp_disconnect(unp, unp); + unp2 = NULL; + goto connect_self; + } + if ((unp2 = unp->unp_conn) != NULL) { + unp_pcb_owned_lock2(unp, unp2, freeunp); + if (freeunp) + unp2 = NULL; + } unp_pcb_hold(unp); if (unp2 != NULL) { unp_pcb_hold(unp2); @@ -813,6 +820,7 @@ uipc_detach(struct socket *so) if (unp_pcb_rele(unp2) == 0) UNP_PCB_UNLOCK(unp2); } + connect_self: UNP_PCB_UNLOCK(unp); UNP_REF_LIST_LOCK(); while (!LIST_EMPTY(&unp->unp_refs)) { @@ -864,6 +872,10 @@ uipc_disconnect(struct socket *so) UNP_PCB_UNLOCK(unp); return (0); } + if (unp == unp2) { + if (unp_pcb_rele(unp) == 0) + UNP_PCB_UNLOCK(unp); + } unp_pcb_owned_lock2(unp, unp2, freed); if (__predict_false(freed)) { UNP_PCB_UNLOCK(unp); @@ -1925,7 +1937,9 @@ unp_drop(struct unpcb *unp) if (so) so->so_error = ECONNRESET; unp2 = unp->unp_conn; - if (unp2 != NULL) { + if (unp2 == unp) { + unp_disconnect(unp, unp2); + } else if (unp2 != NULL) { unp_pcb_hold(unp2); unp_pcb_owned_lock2(unp, unp2, freed); unp_disconnect(unp, unp2); From owner-svn-src-head@freebsd.org Thu May 24 21:22:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D6E0EFE934; Thu, 24 May 2018 21:22:04 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4119784DD0; Thu, 24 May 2018 21:22:04 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23F8E17B99; Thu, 24 May 2018 21:22:04 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OLM4cJ019449; Thu, 24 May 2018 21:22:04 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OLM3HL019447; Thu, 24 May 2018 21:22:03 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805242122.w4OLM3HL019447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 21:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334186 - in head: . lib/libpmcstat X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: . lib/libpmcstat X-SVN-Commit-Revision: 334186 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 21:22:04 -0000 Author: mmacy Date: Thu May 24 21:22:03 2018 New Revision: 334186 URL: https://svnweb.freebsd.org/changeset/base/334186 Log: libpmcstat: Don't build pmu tables on !amd64 until the corresponding util routines have been written and tested. Currently building them breaks the build on power64 Reported by: emaste Modified: head/Makefile.inc1 head/lib/libpmcstat/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu May 24 21:13:46 2018 (r334185) +++ head/Makefile.inc1 Thu May 24 21:22:03 2018 (r334186) @@ -2029,8 +2029,7 @@ _tcsh=bin/csh _libmagic=lib/libmagic .endif -.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "powerpc") +.if ${MACHINE_CPUARCH} == "amd64" _jevents=lib/libpmcstat/pmu-events .endif Modified: head/lib/libpmcstat/Makefile ============================================================================== --- head/lib/libpmcstat/Makefile Thu May 24 21:13:46 2018 (r334185) +++ head/lib/libpmcstat/Makefile Thu May 24 21:22:03 2018 (r334186) @@ -15,8 +15,8 @@ INCS= libpmcstat.h CFLAGS+= -I${.CURDIR} -.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "powerpc") +.if ${MACHINE_CPUARCH} == "amd64" + .if ${MACHINE_CPUARCH} == "aarch64" EVENT_ARCH="arm64" .elif ${MACHINE_CPUARCH} == "amd64" From owner-svn-src-head@freebsd.org Thu May 24 21:38:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1472DEFF1CA; Thu, 24 May 2018 21:38:19 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B96C385E0D; Thu, 24 May 2018 21:38:18 +0000 (UTC) (envelope-from cognet@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B63517D6A; Thu, 24 May 2018 21:38:18 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OLcIld024878; Thu, 24 May 2018 21:38:18 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OLcIYl024877; Thu, 24 May 2018 21:38:18 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201805242138.w4OLcIYl024877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Thu, 24 May 2018 21:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334189 - head/sys/contrib/ck/include X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/contrib/ck/include X-SVN-Commit-Revision: 334189 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 21:38:19 -0000 Author: cognet Date: Thu May 24 21:38:18 2018 New Revision: 334189 URL: https://svnweb.freebsd.org/changeset/base/334189 Log: Import CK as of commit 0f017230ccc86929f56bf44ef2dca93d7df8076b. This brings us the renaming of fields in ck_queue, so that our own LIST/SLIST/TAILQ/etc won't accidentally work with them. Modified: head/sys/contrib/ck/include/ck_queue.h Directory Properties: head/sys/contrib/ck/ (props changed) Modified: head/sys/contrib/ck/include/ck_queue.h ============================================================================== --- head/sys/contrib/ck/include/ck_queue.h Thu May 24 21:37:04 2018 (r334188) +++ head/sys/contrib/ck/include/ck_queue.h Thu May 24 21:38:18 2018 (r334189) @@ -125,7 +125,7 @@ */ #define CK_SLIST_HEAD(name, type) \ struct name { \ - struct type *slh_first; /* first element */ \ + struct type *cslh_first; /* first element */ \ } #define CK_SLIST_HEAD_INITIALIZER(head) \ @@ -133,20 +133,20 @@ struct name { \ #define CK_SLIST_ENTRY(type) \ struct { \ - struct type *sle_next; /* next element */ \ + struct type *csle_next; /* next element */ \ } /* * Singly-linked List functions. */ #define CK_SLIST_EMPTY(head) \ - (ck_pr_load_ptr(&(head)->slh_first) == NULL) + (ck_pr_load_ptr(&(head)->cslh_first) == NULL) #define CK_SLIST_FIRST(head) \ - (ck_pr_load_ptr(&(head)->slh_first)) + (ck_pr_load_ptr(&(head)->cslh_first)) #define CK_SLIST_NEXT(elm, field) \ - ck_pr_load_ptr(&((elm)->field.sle_next)) + ck_pr_load_ptr(&((elm)->field.csle_next)) #define CK_SLIST_FOREACH(var, head, field) \ for ((var) = CK_SLIST_FIRST((head)); \ @@ -159,59 +159,59 @@ struct { \ (var) = (tvar)) #define CK_SLIST_FOREACH_PREVPTR(var, varp, head, field) \ - for ((varp) = &(head)->slh_first; \ + for ((varp) = &(head)->cslh_first; \ ((var) = ck_pr_load_ptr(varp)) != NULL && (ck_pr_fence_load(), 1); \ - (varp) = &(var)->field.sle_next) + (varp) = &(var)->field.csle_next) #define CK_SLIST_INIT(head) do { \ - ck_pr_store_ptr(&(head)->slh_first, NULL); \ + ck_pr_store_ptr(&(head)->cslh_first, NULL); \ ck_pr_fence_store(); \ } while (0) #define CK_SLIST_INSERT_AFTER(a, b, field) do { \ - (b)->field.sle_next = (a)->field.sle_next; \ + (b)->field.csle_next = (a)->field.csle_next; \ ck_pr_fence_store(); \ - ck_pr_store_ptr(&(a)->field.sle_next, b); \ + ck_pr_store_ptr(&(a)->field.csle_next, b); \ } while (0) #define CK_SLIST_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.sle_next = (head)->slh_first; \ + (elm)->field.csle_next = (head)->cslh_first; \ ck_pr_fence_store(); \ - ck_pr_store_ptr(&(head)->slh_first, elm); \ + ck_pr_store_ptr(&(head)->cslh_first, elm); \ } while (0) #define CK_SLIST_REMOVE_AFTER(elm, field) do { \ - ck_pr_store_ptr(&(elm)->field.sle_next, \ - (elm)->field.sle_next->field.sle_next); \ + ck_pr_store_ptr(&(elm)->field.csle_next, \ + (elm)->field.csle_next->field.csle_next); \ } while (0) #define CK_SLIST_REMOVE(head, elm, type, field) do { \ - if ((head)->slh_first == (elm)) { \ + if ((head)->cslh_first == (elm)) { \ CK_SLIST_REMOVE_HEAD((head), field); \ } else { \ - struct type *curelm = (head)->slh_first; \ - while (curelm->field.sle_next != (elm)) \ - curelm = curelm->field.sle_next; \ + struct type *curelm = (head)->cslh_first; \ + while (curelm->field.csle_next != (elm)) \ + curelm = curelm->field.csle_next; \ CK_SLIST_REMOVE_AFTER(curelm, field); \ } \ } while (0) #define CK_SLIST_REMOVE_HEAD(head, field) do { \ - ck_pr_store_ptr(&(head)->slh_first, \ - (head)->slh_first->field.sle_next); \ + ck_pr_store_ptr(&(head)->cslh_first, \ + (head)->cslh_first->field.csle_next); \ } while (0) #define CK_SLIST_MOVE(head1, head2, field) do { \ - ck_pr_store_ptr(&(head1)->slh_first, (head2)->slh_first); \ + ck_pr_store_ptr(&(head1)->cslh_first, (head2)->cslh_first); \ } while (0) /* * This operation is not applied atomically. */ #define CK_SLIST_SWAP(a, b, type) do { \ - struct type *swap_first = (a)->slh_first; \ - (a)->slh_first = (b)->slh_first; \ - (b)->slh_first = swap_first; \ + struct type *swap_first = (a)->cslh_first; \ + (a)->cslh_first = (b)->cslh_first; \ + (b)->cslh_first = swap_first; \ } while (0) /* @@ -219,33 +219,33 @@ struct { \ */ #define CK_STAILQ_HEAD(name, type) \ struct name { \ - struct type *stqh_first;/* first element */ \ - struct type **stqh_last;/* addr of last next element */ \ + struct type *cstqh_first;/* first element */ \ + struct type **cstqh_last;/* addr of last next element */ \ } #define CK_STAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).stqh_first } + { NULL, &(head).cstqh_first } #define CK_STAILQ_ENTRY(type) \ struct { \ - struct type *stqe_next; /* next element */ \ + struct type *cstqe_next; /* next element */ \ } /* * Singly-linked Tail queue functions. */ #define CK_STAILQ_CONCAT(head1, head2) do { \ - if ((head2)->stqh_first != NULL) { \ - ck_pr_store_ptr((head1)->stqh_last, (head2)->stqh_first); \ + if ((head2)->cstqh_first != NULL) { \ + ck_pr_store_ptr((head1)->cstqh_last, (head2)->cstqh_first); \ ck_pr_fence_store(); \ - (head1)->stqh_last = (head2)->stqh_last; \ + (head1)->cstqh_last = (head2)->cstqh_last; \ CK_STAILQ_INIT((head2)); \ } \ } while (0) -#define CK_STAILQ_EMPTY(head) (ck_pr_load_ptr(&(head)->stqh_first) == NULL) +#define CK_STAILQ_EMPTY(head) (ck_pr_load_ptr(&(head)->cstqh_first) == NULL) -#define CK_STAILQ_FIRST(head) (ck_pr_load_ptr(&(head)->stqh_first)) +#define CK_STAILQ_FIRST(head) (ck_pr_load_ptr(&(head)->cstqh_first)) #define CK_STAILQ_FOREACH(var, head, field) \ for((var) = CK_STAILQ_FIRST((head)); \ @@ -259,67 +259,67 @@ struct { \ (var) = (tvar)) #define CK_STAILQ_INIT(head) do { \ - ck_pr_store_ptr(&(head)->stqh_first, NULL); \ + ck_pr_store_ptr(&(head)->cstqh_first, NULL); \ ck_pr_fence_store(); \ - (head)->stqh_last = &(head)->stqh_first; \ + (head)->cstqh_last = &(head)->cstqh_first; \ } while (0) #define CK_STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ - (elm)->field.stqe_next = (tqelm)->field.stqe_next; \ + (elm)->field.cstqe_next = (tqelm)->field.cstqe_next; \ ck_pr_fence_store(); \ - ck_pr_store_ptr(&(tqelm)->field.stqe_next, elm); \ - if ((elm)->field.stqe_next == NULL) \ - (head)->stqh_last = &(elm)->field.stqe_next; \ + ck_pr_store_ptr(&(tqelm)->field.cstqe_next, elm); \ + if ((elm)->field.cstqe_next == NULL) \ + (head)->cstqh_last = &(elm)->field.cstqe_next; \ } while (0) #define CK_STAILQ_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.stqe_next = (head)->stqh_first; \ + (elm)->field.cstqe_next = (head)->cstqh_first; \ ck_pr_fence_store(); \ - ck_pr_store_ptr(&(head)->stqh_first, elm); \ - if ((elm)->field.stqe_next == NULL) \ - (head)->stqh_last = &(elm)->field.stqe_next; \ + ck_pr_store_ptr(&(head)->cstqh_first, elm); \ + if ((elm)->field.cstqe_next == NULL) \ + (head)->cstqh_last = &(elm)->field.cstqe_next; \ } while (0) #define CK_STAILQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.stqe_next = NULL; \ + (elm)->field.cstqe_next = NULL; \ ck_pr_fence_store(); \ - ck_pr_store_ptr((head)->stqh_last, (elm)); \ - (head)->stqh_last = &(elm)->field.stqe_next; \ + ck_pr_store_ptr((head)->cstqh_last, (elm)); \ + (head)->cstqh_last = &(elm)->field.cstqe_next; \ } while (0) #define CK_STAILQ_NEXT(elm, field) \ - (ck_pr_load_ptr(&(elm)->field.stqe_next)) + (ck_pr_load_ptr(&(elm)->field.cstqe_next)) #define CK_STAILQ_REMOVE(head, elm, type, field) do { \ - if ((head)->stqh_first == (elm)) { \ + if ((head)->cstqh_first == (elm)) { \ CK_STAILQ_REMOVE_HEAD((head), field); \ } else { \ - struct type *curelm = (head)->stqh_first; \ - while (curelm->field.stqe_next != (elm)) \ - curelm = curelm->field.stqe_next; \ + struct type *curelm = (head)->cstqh_first; \ + while (curelm->field.cstqe_next != (elm)) \ + curelm = curelm->field.cstqe_next; \ CK_STAILQ_REMOVE_AFTER(head, curelm, field); \ } \ } while (0) #define CK_STAILQ_REMOVE_AFTER(head, elm, field) do { \ - ck_pr_store_ptr(&(elm)->field.stqe_next, \ - (elm)->field.stqe_next->field.stqe_next); \ - if ((elm)->field.stqe_next == NULL) \ - (head)->stqh_last = &(elm)->field.stqe_next; \ + ck_pr_store_ptr(&(elm)->field.cstqe_next, \ + (elm)->field.cstqe_next->field.cstqe_next); \ + if ((elm)->field.cstqe_next == NULL) \ + (head)->cstqh_last = &(elm)->field.cstqe_next; \ } while (0) #define CK_STAILQ_REMOVE_HEAD(head, field) do { \ - ck_pr_store_ptr(&(head)->stqh_first, \ - (head)->stqh_first->field.stqe_next); \ - if ((head)->stqh_first == NULL) \ - (head)->stqh_last = &(head)->stqh_first; \ + ck_pr_store_ptr(&(head)->cstqh_first, \ + (head)->cstqh_first->field.cstqe_next); \ + if ((head)->cstqh_first == NULL) \ + (head)->cstqh_last = &(head)->cstqh_first; \ } while (0) #define CK_STAILQ_MOVE(head1, head2, field) do { \ - ck_pr_store_ptr(&(head1)->stqh_first, (head2)->stqh_first); \ - (head1)->stqh_last = (head2)->stqh_last; \ - if ((head2)->stqh_last == &(head2)->stqh_first) \ - (head1)->stqh_last = &(head1)->stqh_first; \ + ck_pr_store_ptr(&(head1)->cstqh_first, (head2)->cstqh_first); \ + (head1)->cstqh_last = (head2)->cstqh_last; \ + if ((head2)->cstqh_last == &(head2)->cstqh_first) \ + (head1)->cstqh_last = &(head1)->cstqh_first; \ } while (0) /* @@ -327,15 +327,15 @@ struct { \ */ #define CK_STAILQ_SWAP(head1, head2, type) do { \ struct type *swap_first = CK_STAILQ_FIRST(head1); \ - struct type **swap_last = (head1)->stqh_last; \ + struct type **swap_last = (head1)->cstqh_last; \ CK_STAILQ_FIRST(head1) = CK_STAILQ_FIRST(head2); \ - (head1)->stqh_last = (head2)->stqh_last; \ + (head1)->cstqh_last = (head2)->cstqh_last; \ CK_STAILQ_FIRST(head2) = swap_first; \ - (head2)->stqh_last = swap_last; \ + (head2)->cstqh_last = swap_last; \ if (CK_STAILQ_EMPTY(head1)) \ - (head1)->stqh_last = &(head1)->stqh_first; \ + (head1)->cstqh_last = &(head1)->cstqh_first; \ if (CK_STAILQ_EMPTY(head2)) \ - (head2)->stqh_last = &(head2)->stqh_first; \ + (head2)->cstqh_last = &(head2)->cstqh_first; \ } while (0) /* @@ -343,7 +343,7 @@ struct { \ */ #define CK_LIST_HEAD(name, type) \ struct name { \ - struct type *lh_first; /* first element */ \ + struct type *clh_first; /* first element */ \ } #define CK_LIST_HEAD_INITIALIZER(head) \ @@ -351,13 +351,13 @@ struct name { \ #define CK_LIST_ENTRY(type) \ struct { \ - struct type *le_next; /* next element */ \ - struct type **le_prev; /* address of previous next element */ \ + struct type *cle_next; /* next element */ \ + struct type **cle_prev; /* address of previous next element */ \ } -#define CK_LIST_FIRST(head) ck_pr_load_ptr(&(head)->lh_first) +#define CK_LIST_FIRST(head) ck_pr_load_ptr(&(head)->clh_first) #define CK_LIST_EMPTY(head) (CK_LIST_FIRST(head) == NULL) -#define CK_LIST_NEXT(elm, field) ck_pr_load_ptr(&(elm)->field.le_next) +#define CK_LIST_NEXT(elm, field) ck_pr_load_ptr(&(elm)->field.cle_next) #define CK_LIST_FOREACH(var, head, field) \ for ((var) = CK_LIST_FIRST((head)); \ @@ -370,59 +370,59 @@ struct { \ (var) = (tvar)) #define CK_LIST_INIT(head) do { \ - ck_pr_store_ptr(&(head)->lh_first, NULL); \ + ck_pr_store_ptr(&(head)->clh_first, NULL); \ ck_pr_fence_store(); \ } while (0) #define CK_LIST_INSERT_AFTER(listelm, elm, field) do { \ - (elm)->field.le_next = (listelm)->field.le_next; \ - (elm)->field.le_prev = &(listelm)->field.le_next; \ + (elm)->field.cle_next = (listelm)->field.cle_next; \ + (elm)->field.cle_prev = &(listelm)->field.cle_next; \ ck_pr_fence_store(); \ - if ((listelm)->field.le_next != NULL) \ - (listelm)->field.le_next->field.le_prev = &(elm)->field.le_next;\ - ck_pr_store_ptr(&(listelm)->field.le_next, elm); \ + if ((listelm)->field.cle_next != NULL) \ + (listelm)->field.cle_next->field.cle_prev = &(elm)->field.cle_next;\ + ck_pr_store_ptr(&(listelm)->field.cle_next, elm); \ } while (0) #define CK_LIST_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.le_prev = (listelm)->field.le_prev; \ - (elm)->field.le_next = (listelm); \ + (elm)->field.cle_prev = (listelm)->field.cle_prev; \ + (elm)->field.cle_next = (listelm); \ ck_pr_fence_store(); \ - ck_pr_store_ptr((listelm)->field.le_prev, (elm)); \ - (listelm)->field.le_prev = &(elm)->field.le_next; \ + ck_pr_store_ptr((listelm)->field.cle_prev, (elm)); \ + (listelm)->field.cle_prev = &(elm)->field.cle_next; \ } while (0) #define CK_LIST_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.le_next = (head)->lh_first; \ + (elm)->field.cle_next = (head)->clh_first; \ ck_pr_fence_store(); \ - if ((elm)->field.le_next != NULL) \ - (head)->lh_first->field.le_prev = &(elm)->field.le_next; \ - ck_pr_store_ptr(&(head)->lh_first, elm); \ - (elm)->field.le_prev = &(head)->lh_first; \ + if ((elm)->field.cle_next != NULL) \ + (head)->clh_first->field.cle_prev = &(elm)->field.cle_next; \ + ck_pr_store_ptr(&(head)->clh_first, elm); \ + (elm)->field.cle_prev = &(head)->clh_first; \ } while (0) #define CK_LIST_REMOVE(elm, field) do { \ - ck_pr_store_ptr((elm)->field.le_prev, (elm)->field.le_next); \ - if ((elm)->field.le_next != NULL) \ - (elm)->field.le_next->field.le_prev = (elm)->field.le_prev; \ + ck_pr_store_ptr((elm)->field.cle_prev, (elm)->field.cle_next); \ + if ((elm)->field.cle_next != NULL) \ + (elm)->field.cle_next->field.cle_prev = (elm)->field.cle_prev; \ } while (0) #define CK_LIST_MOVE(head1, head2, field) do { \ - ck_pr_store_ptr(&(head1)->lh_first, (head2)->lh_first); \ - if ((head1)->lh_first != NULL) \ - (head1)->lh_first->field.le_prev = &(head1)->lh_first; \ + ck_pr_store_ptr(&(head1)->clh_first, (head2)->clh_first); \ + if ((head1)->clh_first != NULL) \ + (head1)->clh_first->field.cle_prev = &(head1)->clh_first; \ } while (0) /* * This operation is not applied atomically. */ #define CK_LIST_SWAP(head1, head2, type, field) do { \ - struct type *swap_tmp = (head1)->lh_first; \ - (head1)->lh_first = (head2)->lh_first; \ - (head2)->lh_first = swap_tmp; \ - if ((swap_tmp = (head1)->lh_first) != NULL) \ - swap_tmp->field.le_prev = &(head1)->lh_first; \ - if ((swap_tmp = (head2)->lh_first) != NULL) \ - swap_tmp->field.le_prev = &(head2)->lh_first; \ + struct type *swap_tmp = (head1)->clh_first; \ + (head1)->clh_first = (head2)->clh_first; \ + (head2)->clh_first = swap_tmp; \ + if ((swap_tmp = (head1)->clh_first) != NULL) \ + swap_tmp->field.cle_prev = &(head1)->clh_first; \ + if ((swap_tmp = (head2)->clh_first) != NULL) \ + swap_tmp->field.cle_prev = &(head2)->clh_first; \ } while (0) #endif /* CK_QUEUE_H */ From owner-svn-src-head@freebsd.org Thu May 24 21:49:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FC8EEFF460; Thu, 24 May 2018 21:49:36 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE2A786322; Thu, 24 May 2018 21:49:35 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 456622225B; Thu, 24 May 2018 17:49:35 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Thu, 24 May 2018 17:49:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=6ZapGw RapyQwWVEkPSEopGQsfRYK7UaMNIiiAg53bHQ=; b=dSPpq7k4AoYDOp1ksdWHhP It8Qfv/XZvGQsFVq23gpiZUz3VyxUu41etaePf80q5ba6eVYbaH3pyEu2M8j9mkH BJfosaOgbs/8gBD2rihKt/+UAc8bRaZfCHxaIxR0HT9iIy0dTR8ZuMYjIVHGdONv /VJ4xFtxA1g87HaASha3cSyyUcLA8LT8fji8Bzy4rO0aXqK8TyFb0gE3ZZJUhdxL Zkv5Z1dPVYFQ8o82CIzOcRXU48v9WDk/EKhcsmtlmH3+N5P6i/QlO9CbEkxhTT1J eNsiqlmpf1LNPNCRjo+EF1fOHFgxo3t26IwVImlBgG5xbXH7X71ft/xU/ba/2AdQ == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id D585D4296; Thu, 24 May 2018 17:49:34 -0400 (EDT) Message-Id: <1527198574.2589977.1383976152.746F18AB@webmail.messagingengine.com> From: Brad Davis To: Renato Botelho , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-29e6b281 In-Reply-To: <33986467-cec5-a6b5-8a05-a4f07f557742@gmail.com> Date: Thu, 24 May 2018 15:49:34 -0600 References: <201805091344.w49Dist5061908@repo.freebsd.org> <33986467-cec5-a6b5-8a05-a4f07f557742@gmail.com> Subject: Re: svn commit: r333407 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 21:49:36 -0000 On Thu, May 24, 2018, at 2:41 PM, Renato Botelho wrote: > On 09/05/18 10:44, Brad Davis wrote: > > Author: brd > > Date: Wed May 9 13:44:54 2018 > > New Revision: 333407 > > URL: https://svnweb.freebsd.org/changeset/base/333407 > > > > Log: > > Enable directory creation with FILESDIR. > > > > This is part of packaging base work. > > > > Reviewed by: will > > Approved by: bapt (mentor), allanjude (mentor) > > Differential Revision: https://reviews.freebsd.org/D15130 > > > > Modified: > > head/share/mk/bsd.files.mk > > head/share/mk/bsd.own.mk > > > > Modified: head/share/mk/bsd.files.mk > > ============================================================================== > > --- head/share/mk/bsd.files.mk Wed May 9 12:25:23 2018 (r333406) > > +++ head/share/mk/bsd.files.mk Wed May 9 13:44:54 2018 (r333407) > > @@ -67,7 +67,7 @@ STAGE_AS_${file:T}= ${${group}NAME_${file:T}} > > STAGE_DIR.${file:T}= ${STAGE_OBJTOP}${${group}DIR_${file:T}} > > stage_as.${file:T}: ${file} > > > > -installfiles-${group}: _${group}INS_${file:T} > > +installfiles-${group}: installdirs-${group} _${group}INS_${file:T} > > _${group}INS_${file:T}: ${file} > > ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \ > > -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ > > @@ -77,10 +77,24 @@ _${group}INS_${file:T}: ${file} > > _${group}FILES+= ${file} > > .endif > > .endfor > > + > > + > > +installdirs-${group}: > > + @echo installing dirs ${group}DIR ${${group}DIR} > > I'm seeing this message while running `make -s installworld`. Sounds like a bug in make? Regards, Brad Davis From owner-svn-src-head@freebsd.org Thu May 24 22:12:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3BCBEFF9DC; Thu, 24 May 2018 22:12:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E7FA86DF9; Thu, 24 May 2018 22:12:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w4OMCYlY097585 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 24 May 2018 15:12:34 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w4OMCYNk097584; Thu, 24 May 2018 15:12:34 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 24 May 2018 15:12:34 -0700 From: Gleb Smirnoff To: Olivier Houchard Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334189 - head/sys/contrib/ck/include Message-ID: <20180524221234.GC71675@FreeBSD.org> References: <201805242138.w4OLcIYl024877@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201805242138.w4OLcIYl024877@repo.freebsd.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 22:12:37 -0000 On Thu, May 24, 2018 at 09:38:18PM +0000, Olivier Houchard wrote: O> Author: cognet O> Date: Thu May 24 21:38:18 2018 O> New Revision: 334189 O> URL: https://svnweb.freebsd.org/changeset/base/334189 O> O> Log: O> Import CK as of commit 0f017230ccc86929f56bf44ef2dca93d7df8076b. O> This brings us the renaming of fields in ck_queue, so that our own O> LIST/SLIST/TAILQ/etc won't accidentally work with them. Indeed, this broke kernel build :) -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu May 24 22:15:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCC5AEFFA92; Thu, 24 May 2018 22:15:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 692A986F99; Thu, 24 May 2018 22:15:48 +0000 (UTC) (envelope-from bdrewery@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4763A183C2; Thu, 24 May 2018 22:15:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4OMFm9D044951; Thu, 24 May 2018 22:15:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4OMFm54044950; Thu, 24 May 2018 22:15:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201805242215.w4OMFm54044950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 24 May 2018 22:15:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334190 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 334190 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 22:15:48 -0000 Author: bdrewery Date: Thu May 24 22:15:47 2018 New Revision: 334190 URL: https://svnweb.freebsd.org/changeset/base/334190 Log: Fix exit code for mismatches after r333013. The -c flag still does the wrong thing versus the older version due to lack of pipefail support. Reported by: antoine Modified: head/usr.bin/grep/zgrep.sh Modified: head/usr.bin/grep/zgrep.sh ============================================================================== --- head/usr.bin/grep/zgrep.sh Thu May 24 21:38:18 2018 (r334189) +++ head/usr.bin/grep/zgrep.sh Thu May 24 22:15:47 2018 (r334190) @@ -138,19 +138,21 @@ then fi fi +ret=0 # call grep ... if [ $# -lt 1 ] then # ... on stdin - ${cattool} ${catargs} - | ${grep} ${grep_args} -- "${pattern}" - + ${cattool} ${catargs} - | ${grep} ${grep_args} -- "${pattern}" - || ret=$? else # ... on all files given on the command line if [ ${silent} -lt 1 -a $# -gt 1 ]; then grep_args="-H ${grep_args}" fi for file; do - ${cattool} ${catargs} -- "${file}" | ${grep} --label="${file}" ${grep_args} -- "${pattern}" - + ${cattool} ${catargs} -- "${file}" | + ${grep} --label="${file}" ${grep_args} -- "${pattern}" - || ret=$? done fi -exit 0 +exit ${ret} From owner-svn-src-head@freebsd.org Thu May 24 22:16:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9142FEFFAF4; Thu, 24 May 2018 22:16:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32218870ED; Thu, 24 May 2018 22:16:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 00C0014CEC; Thu, 24 May 2018 22:16:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id BB4C356AC; Thu, 24 May 2018 22:16:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id CN9GVlURYx1n; Thu, 24 May 2018 22:16:45 +0000 (UTC) Subject: Re: svn commit: r333407 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com D0EE256A6 To: Renato Botelho , Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805091344.w49Dist5061908@repo.freebsd.org> <33986467-cec5-a6b5-8a05-a4f07f557742@gmail.com> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: <0f21371e-d987-684a-51b1-d6b7c5a2953a@FreeBSD.org> Date: Thu, 24 May 2018 15:16:45 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <33986467-cec5-a6b5-8a05-a4f07f557742@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HwZDiaVMwVZ4o0lPtyjPjR8q9oMhR61W7" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 22:16:49 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HwZDiaVMwVZ4o0lPtyjPjR8q9oMhR61W7 Content-Type: multipart/mixed; boundary="eqpBlDHxLRSJf82mjMvlQv3SmAXtrTuj7"; protected-headers="v1" From: Bryan Drewery To: Renato Botelho , Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <0f21371e-d987-684a-51b1-d6b7c5a2953a@FreeBSD.org> Subject: Re: svn commit: r333407 - head/share/mk References: <201805091344.w49Dist5061908@repo.freebsd.org> <33986467-cec5-a6b5-8a05-a4f07f557742@gmail.com> In-Reply-To: <33986467-cec5-a6b5-8a05-a4f07f557742@gmail.com> --eqpBlDHxLRSJf82mjMvlQv3SmAXtrTuj7 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/24/2018 1:41 PM, Renato Botelho wrote: > On 09/05/18 10:44, Brad Davis wrote: >> Author: brd >> Date: Wed May 9 13:44:54 2018 >> New Revision: 333407 >> URL: https://svnweb.freebsd.org/changeset/base/333407 >> >> Log: >> Enable directory creation with FILESDIR. >> =20 >> This is part of packaging base work. >> =20 >> Reviewed by: will >> Approved by: bapt (mentor), allanjude (mentor) >> Differential Revision: https://reviews.freebsd.org/D15130 >> >> Modified: >> head/share/mk/bsd.files.mk >> head/share/mk/bsd.own.mk >> >> Modified: head/share/mk/bsd.files.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/share/mk/bsd.files.mk Wed May 9 12:25:23 2018 (r333406) >> +++ head/share/mk/bsd.files.mk Wed May 9 13:44:54 2018 (r333407) >> @@ -67,7 +67,7 @@ STAGE_AS_${file:T}=3D ${${group}NAME_${file:T}} >> STAGE_DIR.${file:T}=3D ${STAGE_OBJTOP}${${group}DIR_${file:T}} >> stage_as.${file:T}: ${file} >> =20 >> -installfiles-${group}: _${group}INS_${file:T} >> +installfiles-${group}: installdirs-${group} _${group}INS_${file:T} >> _${group}INS_${file:T}: ${file} >> ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \ >> -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \= >> @@ -77,10 +77,24 @@ _${group}INS_${file:T}: ${file} >> _${group}FILES+=3D ${file} >> .endif >> .endfor >> + >> + >> +installdirs-${group}: >> + @echo installing dirs ${group}DIR ${${group}DIR} >=20 > I'm seeing this message while running `make -s installworld`. >=20 Needs to use ${ECHO} rather than echo. --=20 Regards, Bryan Drewery --eqpBlDHxLRSJf82mjMvlQv3SmAXtrTuj7-- --HwZDiaVMwVZ4o0lPtyjPjR8q9oMhR61W7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJbBznOAAoJEDXXcbtuRpfPzm8IAKMrd0sA8zW3d14go3jF5SIp ao8ufOGLtS8oe9aMX5cWA3o0k5s4XNIx315verfZ/KcScJzPvVhY4n2SbI/eEDDE Xcv0jssWZnRaLrkvPCkeZKkrirR5ahCs6IQiOs+nqdfz7wv8NvcJ/cI2SsKP+1dr cwr/SrVc5x0UI96wAimPV/DmB9ZMy4dXzPBh8OVsyxMrSNzN9oJXZ6dWgyITZ9tu FhCM3lWZ1kdJ6vzjkD1BFbbRvp993EYrl1MDd/qD0Bk93TMXcqgLhXlwN3kRfqOp blywSCsSZK4BYoWjB1Weki7OIpaq96z8eLgK5Ag6vALBjpV0TsrH+GIsqiYhnh8= =GSp/ -----END PGP SIGNATURE----- --HwZDiaVMwVZ4o0lPtyjPjR8q9oMhR61W7-- From owner-svn-src-head@freebsd.org Thu May 24 22:36:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1650F6B231; Thu, 24 May 2018 22:36:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9CBE87A7E; Thu, 24 May 2018 22:36:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 8357D14826; Thu, 24 May 2018 22:36:21 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Matt Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334128 - in head: . lib/libpmcstat lib/libpmcstat/pmu-events lib/libpmcstat/pmu-events/arch lib/libpmcstat/pmu-events/arch/arm64 lib/libpmcstat/pmu-events/arch/arm64/arm lib/libpmcstat... Date: Thu, 24 May 2018 15:36:07 -0700 Message-ID: <2291583.vLXA4fx7TA@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201805240430.w4O4U6Js001134@repo.freebsd.org> References: <201805240430.w4O4U6Js001134@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 22:36:22 -0000 On Thursday, May 24, 2018 04:30:06 AM Matt Macy wrote: > Author: mmacy > Date: Thu May 24 04:30:06 2018 > New Revision: 334128 > URL: https://svnweb.freebsd.org/changeset/base/334128 > > Log: > libpmcstat: compile in events based on json description Please provide more detail for commits like this in the future. Some questions I have some of which probably should have been answered in the log: - Why does this matter? For example, does this provide counters for a CPUs we don't currently support counters on? - Does this supplant the existing tables of counters in hwpmc or is this a different set of counters (or how do these counter tables interact with our existing tables in general)? - What is the origin of these json files? What is the license? These seem to come straight from the Linux kernel which should be acknowledged via Obtained from: at the very least. It does seem that the jevents source is explicitly BSD licensed (2 clause). This is noted in the git logs in the Linux tree. However, I couldn't find a clear statement on the json files themselves and what their license is. Are you aware of a license for those or do they fall under the GPLv2 "default" license in /COPYING of the Linux source tree? -- John Baldwin From owner-svn-src-head@freebsd.org Thu May 24 22:36:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67C44F6B23C; Thu, 24 May 2018 22:36:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E3EF87A97; Thu, 24 May 2018 22:36:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id D7BC914827; Thu, 24 May 2018 22:36:22 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Olivier Houchard Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334189 - head/sys/contrib/ck/include Date: Thu, 24 May 2018 15:14:17 -0700 Message-ID: <2821798.ZKtbhg5vPF@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201805242138.w4OLcIYl024877@repo.freebsd.org> References: <201805242138.w4OLcIYl024877@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 22:36:23 -0000 On Thursday, May 24, 2018 09:38:18 PM Olivier Houchard wrote: > Author: cognet > Date: Thu May 24 21:38:18 2018 > New Revision: 334189 > URL: https://svnweb.freebsd.org/changeset/base/334189 > > Log: > Import CK as of commit 0f017230ccc86929f56bf44ef2dca93d7df8076b. > This brings us the renaming of fields in ck_queue, so that our own > LIST/SLIST/TAILQ/etc won't accidentally work with them. Thanks. -- John Baldwin From owner-svn-src-head@freebsd.org Thu May 24 22:51:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 250A0F6B814; Thu, 24 May 2018 22:51:12 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9140683C7; Thu, 24 May 2018 22:51:11 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 8E55714921; Thu, 24 May 2018 22:51:11 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f48.google.com with SMTP id 144-v6so4493839iti.5; Thu, 24 May 2018 15:51:11 -0700 (PDT) X-Gm-Message-State: ALKqPwfNTC4t7W1azTiKkG7UXaF15ljUuTdrQ2h3d9wF+BWVwG7jZhvV AAhNWh5klVSCFUt1udFy8MHKLs15WlkwwXhtF2Q= X-Google-Smtp-Source: ADUXVKIDbU+bMFQxKvxw5fo4jVmvdPlbdJqA2JeR9mi+JXfnbsUMrXlYHSbB6LsK/8qS3X3DmF9i+4zLZTnlc/pRLrw= X-Received: by 2002:a24:29cc:: with SMTP id p195-v6mr2553602itp.132.1527202271111; Thu, 24 May 2018 15:51:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Thu, 24 May 2018 15:51:10 -0700 (PDT) In-Reply-To: <2291583.vLXA4fx7TA@ralph.baldwin.cx> References: <201805240430.w4O4U6Js001134@repo.freebsd.org> <2291583.vLXA4fx7TA@ralph.baldwin.cx> From: Matthew Macy Date: Thu, 24 May 2018 15:51:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334128 - in head: . lib/libpmcstat lib/libpmcstat/pmu-events lib/libpmcstat/pmu-events/arch lib/libpmcstat/pmu-events/arch/arm64 lib/libpmcstat/pmu-events/arch/arm64/arm lib/libpmcstat... To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 22:51:12 -0000 On Thu, May 24, 2018 at 3:36 PM, John Baldwin wrote: > On Thursday, May 24, 2018 04:30:06 AM Matt Macy wrote: >> Author: mmacy >> Date: Thu May 24 04:30:06 2018 >> New Revision: 334128 >> URL: https://svnweb.freebsd.org/changeset/base/334128 >> >> Log: >> libpmcstat: compile in events based on json description > > Please provide more detail for commits like this in the future. Some questions > I have some of which probably should have been answered in the log: > > - Why does this matter? For example, does this provide counters for a CPUs > we don't currently support counters on? > - Does this supplant the existing tables of counters in hwpmc or is this > a different set of counters (or how do these counter tables interact with > our existing tables in general)? > - What is the origin of these json files? What is the license? These seem to > come straight from the Linux kernel which should be acknowledged via > Obtained from: at the very least. It does seem that the jevents source is > explicitly BSD licensed (2 clause). This is noted in the git logs in the > Linux tree. However, I couldn't find a clear statement on the json files > themselves and what their license is. Are you aware of a license for those > or do they fall under the GPLv2 "default" license in /COPYING of the Linux > source tree? At least the Intel ones come from Intel where everything is BSD licensed. If the others are GPL I'll move it all to a port. From owner-svn-src-head@freebsd.org Thu May 24 22:51:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4442DF6B9F3; Thu, 24 May 2018 22:51:58 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA48A68582; Thu, 24 May 2018 22:51:57 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by mail-it0-x244.google.com with SMTP id z6-v6so4505567iti.4; Thu, 24 May 2018 15:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=104Ya1p9khRetROox8xcRW2AngN2OTCPOEYtMVGgbF8=; b=Y9OlkjXsW5PAhAOIT7ARxBg9Y7g0xVc9Gy60Km+etY9qEDzDghNxhm+4cYqaYmMnZV RWdWL/OYI9wg8B8gIpu7PoP2MN81FYRFP8slc4jWkaaCoV+9aY1vrUddDOFWOrB65ut2 vvWUf+Wj5y9guRGAdt5h3vEJpwbrfIN6OJ9ic96uVQD75flNII9ctnng+eEm7tH9AEJV iA06hrJNGed8Z/q+E4e3KlvrjWhD/l3ngW76JqLd3Qa7ilcrfL1TK71qTUaKMRY3b1Fg 5eTVoFCPO+NN6U5SfPxdOOAchE+9Kj43NzcaDV+MokRjRrnXxzLI/86rfIzovvXznbIJ Pfvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=104Ya1p9khRetROox8xcRW2AngN2OTCPOEYtMVGgbF8=; b=nxd7FJX9B/VpH38pJWrqQVzsO32ITypImFRpk2ZJuux/qQsOtBSAp7AAz85h9Ne4s6 NwIkCGkOXftWAGHH8/+JU7emRWKWNXuCFkpOImya9kByECpk2BmedOtsffpYwpoqW6fq c39GJAGqkb74irOiKED1lncDQ1dKQ/67mnltHfEPVDXfreLzDe1hJ4LTyFucoowS2JNr lK5nj+SvxDQFZ5SQfVv8bEIa/XkIWKuuPz/MJqTqHMGONodEOyOwD0aaSR/pWyBBFAPL bts67w+ctVG4ASETIcojOY0mUsIaboT7q1VQPYZT6PKPRkl6UsshjXqKIUmqtwfLoNsF HieA== X-Gm-Message-State: ALKqPwdZcQbWAUrpIttbnwXFsrB2Uzfg715BBbYVy/NdCWb+w8wFu7XS 88Wm7FUgTpxaAYzl6hx2y9AshUcw1GdTkDEF+TKndA== X-Google-Smtp-Source: AB8JxZqqknAqc8qEeD21dR8sMPp+acx9yIf7RxiE/wsAyYtFF45eqPU+3ox1jyxbzjakBti/BhgWkOPPkoAPxIihcFg= X-Received: by 2002:a24:4455:: with SMTP id o82-v6mr11048582ita.4.1527202316994; Thu, 24 May 2018 15:51:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Thu, 24 May 2018 15:51:56 -0700 (PDT) In-Reply-To: <2821798.ZKtbhg5vPF@ralph.baldwin.cx> References: <201805242138.w4OLcIYl024877@repo.freebsd.org> <2821798.ZKtbhg5vPF@ralph.baldwin.cx> From: Matthew Macy Date: Thu, 24 May 2018 15:51:56 -0700 Message-ID: Subject: Re: svn commit: r334189 - head/sys/contrib/ck/include To: John Baldwin Cc: Olivier Houchard , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 22:51:58 -0000 I asked for this, so working on a fix. Let me know if you're already about to commit. On Thu, May 24, 2018 at 3:14 PM, John Baldwin wrote: > On Thursday, May 24, 2018 09:38:18 PM Olivier Houchard wrote: >> Author: cognet >> Date: Thu May 24 21:38:18 2018 >> New Revision: 334189 >> URL: https://svnweb.freebsd.org/changeset/base/334189 >> >> Log: >> Import CK as of commit 0f017230ccc86929f56bf44ef2dca93d7df8076b. >> This brings us the renaming of fields in ck_queue, so that our own >> LIST/SLIST/TAILQ/etc won't accidentally work with them. > > Thanks. > > -- > John Baldwin > From owner-svn-src-head@freebsd.org Thu May 24 23:20:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED32FF6D206; Thu, 24 May 2018 23:20:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F1B569170; Thu, 24 May 2018 23:20:10 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BB6B18D55; Thu, 24 May 2018 23:20:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4ONKAnW075121; Thu, 24 May 2018 23:20:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4ONKAAG075120; Thu, 24 May 2018 23:20:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201805242320.w4ONKAAG075120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 24 May 2018 23:20:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334192 - head/sys/libkern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/libkern X-SVN-Commit-Revision: 334192 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 23:20:11 -0000 Author: imp Date: Thu May 24 23:20:10 2018 New Revision: 334192 URL: https://svnweb.freebsd.org/changeset/base/334192 Log: Protect bzero call against macro expansion Shortly, we'll be moving to defining bzero and memset in terms of __builting_memset. To do that, we can't have macro calls to bzero in the fallback impelmentation of memset. Normal calls to bzero are fine. All 4 architectures that use this have their own copies of bzero, so there's no mutual recursion issue between memset and bcopy. Modified: head/sys/libkern/memset.c Modified: head/sys/libkern/memset.c ============================================================================== --- head/sys/libkern/memset.c Thu May 24 23:11:25 2018 (r334191) +++ head/sys/libkern/memset.c Thu May 24 23:20:10 2018 (r334192) @@ -38,7 +38,7 @@ memset(void *b, int c, size_t len) char *bb; if (c == 0) - bzero(b, len); + (bzero)(b, len); else for (bb = (char *)b; len--; ) *bb++ = c; From owner-svn-src-head@freebsd.org Thu May 24 23:21:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81113F6D444; Thu, 24 May 2018 23:21:26 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C7CA6935F; Thu, 24 May 2018 23:21:26 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7F2018E85; Thu, 24 May 2018 23:21:25 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4ONLPcP077029; Thu, 24 May 2018 23:21:25 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4ONLOiB077019; Thu, 24 May 2018 23:21:24 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805242321.w4ONLOiB077019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 23:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334193 - in head/sys: dev/hwpmc net netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: dev/hwpmc net netinet netinet6 X-SVN-Commit-Revision: 334193 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 23:21:26 -0000 Author: mmacy Date: Thu May 24 23:21:23 2018 New Revision: 334193 URL: https://svnweb.freebsd.org/changeset/base/334193 Log: CK: update consumers to use CK macros across the board r334189 changed the fields to have names distinct from those in queue.h in order to expose the oversights as compile time errors Modified: head/sys/dev/hwpmc/hwpmc_mod.c head/sys/net/if_lagg.c head/sys/net/if_lagg.h head/sys/net/if_llatbl.c head/sys/net/if_llatbl.h head/sys/net/if_var.h head/sys/netinet/in_debug.c head/sys/netinet6/in6.c head/sys/netinet6/in6_var.h Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Thu May 24 23:20:10 2018 (r334192) +++ head/sys/dev/hwpmc/hwpmc_mod.c Thu May 24 23:21:23 2018 (r334193) @@ -175,7 +175,7 @@ static LIST_HEAD(pmc_ownerhash, pmc_owner) *pmc_ownerh * List of PMC owners with system-wide sampling PMCs. */ -static LIST_HEAD(, pmc_owner) pmc_ss_owners; +static CK_LIST_HEAD(, pmc_owner) pmc_ss_owners; /* * List of free thread entries. This is protected by the spin @@ -5435,7 +5435,7 @@ pmc_initialize(void) mtx_init(&pmc_processhash_mtx, "pmc-process-hash", "pmc-leaf", MTX_SPIN); - LIST_INIT(&pmc_ss_owners); + CK_LIST_INIT(&pmc_ss_owners); pmc_ss_count = 0; /* allocate a pool of spin mutexes */ @@ -5583,7 +5583,7 @@ pmc_cleanup(void) pmc_ownerhash = NULL; } - KASSERT(LIST_EMPTY(&pmc_ss_owners), + KASSERT(CK_LIST_EMPTY(&pmc_ss_owners), ("[pmc,%d] Global SS owner list not empty", __LINE__)); KASSERT(pmc_ss_count == 0, ("[pmc,%d] Global SS count not empty", __LINE__)); Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Thu May 24 23:20:10 2018 (r334192) +++ head/sys/net/if_lagg.c Thu May 24 23:21:23 2018 (r334193) @@ -496,7 +496,7 @@ lagg_clone_create(struct if_clone *ifc, int unit, cadd lagg_proto_attach(sc, LAGG_PROTO_DEFAULT); - SLIST_INIT(&sc->sc_ports); + CK_SLIST_INIT(&sc->sc_ports); /* Initialise pseudo media types */ ifmedia_init(&sc->sc_media, 0, lagg_media_change, @@ -554,7 +554,7 @@ lagg_clone_destroy(struct ifnet *ifp) EVENTHANDLER_DEREGISTER(vlan_unconfig, sc->vlan_detach); /* Shutdown and remove lagg ports */ - while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL) + while ((lp = CK_SLIST_FIRST(&sc->sc_ports)) != NULL) lagg_port_destroy(lp, 1); /* Unhook the aggregation protocol */ @@ -656,7 +656,7 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet * return (EPROTONOSUPPORT); /* Allow the first Ethernet member to define the MTU */ - if (SLIST_EMPTY(&sc->sc_ports)) + if (CK_SLIST_EMPTY(&sc->sc_ports)) sc->sc_ifp->if_mtu = ifp->if_mtu; else if (sc->sc_ifp->if_mtu != ifp->if_mtu) { if_printf(sc->sc_ifp, "invalid MTU for %s\n", @@ -693,7 +693,7 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet * bcopy(IF_LLADDR(ifp), lp->lp_lladdr, ETHER_ADDR_LEN); lp->lp_ifcapenable = ifp->if_capenable; - if (SLIST_EMPTY(&sc->sc_ports)) { + if (CK_SLIST_EMPTY(&sc->sc_ports)) { bcopy(IF_LLADDR(ifp), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); lagg_proto_lladdr(sc); EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); @@ -702,7 +702,7 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet * } lagg_setflags(lp, 1); - if (SLIST_EMPTY(&sc->sc_ports)) + if (CK_SLIST_EMPTY(&sc->sc_ports)) sc->sc_primary = lp; /* Change the interface type */ @@ -728,16 +728,16 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet * LAGG_RLOCK(); CK_SLIST_FOREACH(tlp, &sc->sc_ports, lp_entries) { if (tlp->lp_ifp->if_index < ifp->if_index && ( - SLIST_NEXT(tlp, lp_entries) == NULL || - SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index > + CK_SLIST_NEXT(tlp, lp_entries) == NULL || + ((struct lagg_port*)CK_SLIST_NEXT(tlp, lp_entries))->lp_ifp->if_index > ifp->if_index)) break; } LAGG_RUNLOCK(); if (tlp != NULL) - SLIST_INSERT_AFTER(tlp, lp, lp_entries); + CK_SLIST_INSERT_AFTER(tlp, lp, lp_entries); else - SLIST_INSERT_HEAD(&sc->sc_ports, lp, lp_entries); + CK_SLIST_INSERT_HEAD(&sc->sc_ports, lp, lp_entries); sc->sc_count++; lagg_setmulti(lp); @@ -827,7 +827,7 @@ lagg_port_destroy(struct lagg_port *lp, int rundelport if (lp == sc->sc_primary) { uint8_t lladdr[ETHER_ADDR_LEN]; - if ((lp0 = SLIST_FIRST(&sc->sc_ports)) == NULL) + if ((lp0 = CK_SLIST_FIRST(&sc->sc_ports)) == NULL) bzero(&lladdr, ETHER_ADDR_LEN); else bcopy(lp0->lp_lladdr, lladdr, ETHER_ADDR_LEN); @@ -1802,7 +1802,7 @@ lagg_link_active(struct lagg_softc *sc, struct lagg_po rval = lp; goto found; } - if ((lp_next = SLIST_NEXT(lp, lp_entries)) != NULL && + if ((lp_next = CK_SLIST_NEXT(lp, lp_entries)) != NULL && LAGG_PORTACTIVE(lp_next)) { rval = lp_next; goto found; @@ -1858,10 +1858,10 @@ lagg_rr_start(struct lagg_softc *sc, struct mbuf *m) p = atomic_fetchadd_32(&sc->sc_seq, 1); p %= sc->sc_count; - lp = SLIST_FIRST(&sc->sc_ports); + lp = CK_SLIST_FIRST(&sc->sc_ports); while (p--) - lp = SLIST_NEXT(lp, lp_entries); + lp = CK_SLIST_NEXT(lp, lp_entries); /* * Check the port's link state. This will return the next active Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Thu May 24 23:20:10 2018 (r334192) +++ head/sys/net/if_lagg.h Thu May 24 23:21:23 2018 (r334193) @@ -217,7 +217,7 @@ struct lagg_softc { uint32_t sc_flags; int sc_destroying; /* destroying lagg */ - SLIST_HEAD(__tplhd, lagg_port) sc_ports; /* list of interfaces */ + CK_SLIST_HEAD(__tplhd, lagg_port) sc_ports; /* list of interfaces */ SLIST_ENTRY(lagg_softc) sc_entries; eventhandler_tag vlan_attach; @@ -251,7 +251,7 @@ struct lagg_port { const struct sockaddr *, struct route *); struct lagg_counters port_counters; /* ifp counters copy */ - SLIST_ENTRY(lagg_port) lp_entries; + CK_SLIST_ENTRY(lagg_port) lp_entries; struct epoch_context lp_epoch_ctx; }; Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Thu May 24 23:20:10 2018 (r334192) +++ head/sys/net/if_llatbl.c Thu May 24 23:21:23 2018 (r334193) @@ -207,7 +207,7 @@ htable_prefix_free_cb(struct lltable *llt, struct llen if (llt->llt_match_prefix(pmd->addr, pmd->mask, pmd->flags, lle)) { LLE_WLOCK(lle); - LIST_INSERT_HEAD(&pmd->dchain, lle, lle_chain); + CK_LIST_INSERT_HEAD(&pmd->dchain, lle, lle_chain); } return (0); @@ -233,7 +233,7 @@ htable_prefix_free(struct lltable *llt, const struct s llentries_unlink(llt, &pmd.dchain); IF_AFDATA_WUNLOCK(llt->llt_ifp); - LIST_FOREACH_SAFE(lle, &pmd.dchain, lle_chain, next) + CK_LIST_FOREACH_SAFE(lle, &pmd.dchain, lle_chain, next) lltable_free_entry(llt, lle); } @@ -250,7 +250,7 @@ llentries_unlink(struct lltable *llt, struct llentries { struct llentry *lle, *next; - LIST_FOREACH_SAFE(lle, head, lle_chain, next) + CK_LIST_FOREACH_SAFE(lle, head, lle_chain, next) llt->llt_unlink_entry(lle); } @@ -496,7 +496,7 @@ lltable_free_cb(struct lltable *llt, struct llentry *l dchain = (struct llentries *)farg; LLE_WLOCK(lle); - LIST_INSERT_HEAD(dchain, lle, lle_chain); + CK_LIST_INSERT_HEAD(dchain, lle, lle_chain); return (0); } @@ -521,7 +521,7 @@ lltable_free(struct lltable *llt) llentries_unlink(llt, &dchain); IF_AFDATA_WUNLOCK(llt->llt_ifp); - LIST_FOREACH_SAFE(lle, &dchain, lle_chain, next) { + CK_LIST_FOREACH_SAFE(lle, &dchain, lle_chain, next) { if (callout_stop(&lle->lle_timer) > 0) LLE_REMREF(lle); llentry_free(lle); @@ -846,7 +846,7 @@ llatbl_lle_show(struct llentry_sa *la) lle = &la->base; db_printf("lle=%p\n", lle); - db_printf(" lle_next=%p\n", lle->lle_next.le_next); + db_printf(" lle_next=%p\n", lle->lle_next.cle_next); db_printf(" lle_lock=%p\n", &lle->lle_lock); db_printf(" lle_tbl=%p\n", lle->lle_tbl); db_printf(" lle_head=%p\n", lle->lle_head); Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Thu May 24 23:20:10 2018 (r334192) +++ head/sys/net/if_llatbl.h Thu May 24 23:21:23 2018 (r334193) @@ -35,13 +35,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include struct ifnet; struct sysctl_req; struct rt_msghdr; struct rt_addrinfo; struct llentry; -LIST_HEAD(llentries, llentry); +CK_LIST_HEAD(llentries, llentry); #define LLE_MAX_LINKHDR 24 /* Full IB header */ /* @@ -49,7 +50,7 @@ LIST_HEAD(llentries, llentry); * a shared lock */ struct llentry { - LIST_ENTRY(llentry) lle_next; + CK_LIST_ENTRY(llentry) lle_next; union { struct in_addr addr4; struct in6_addr addr6; @@ -77,7 +78,7 @@ struct llentry { int lle_refcnt; char *ll_addr; /* link-layer address */ - LIST_ENTRY(llentry) lle_chain; /* chain of deleted items */ + CK_LIST_ENTRY(llentry) lle_chain; /* chain of deleted items */ struct callout lle_timer; struct rwlock lle_lock; struct mtx req_mtx; Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu May 24 23:20:10 2018 (r334192) +++ head/sys/net/if_var.h Thu May 24 23:21:23 2018 (r334193) @@ -238,9 +238,9 @@ typedef void (if_snd_tag_free_t)(struct m_snd_tag *); */ struct ifnet { /* General book keeping of interface lists. */ - STAILQ_ENTRY(ifnet) if_link; /* all struct ifnets are chained (CK_) */ + CK_STAILQ_ENTRY(ifnet) if_link; /* all struct ifnets are chained (CK_) */ LIST_ENTRY(ifnet) if_clones; /* interfaces of a cloner */ - STAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if (CK_) */ + CK_STAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if (CK_) */ /* protected by if_addr_lock */ u_char if_alloctype; /* if_type at time of allocation */ @@ -452,18 +452,18 @@ struct ifg_group { char ifg_group[IFNAMSIZ]; u_int ifg_refcnt; void *ifg_pf_kif; - STAILQ_HEAD(, ifg_member) ifg_members; /* (CK_) */ - STAILQ_ENTRY(ifg_group) ifg_next; /* (CK_) */ + CK_STAILQ_HEAD(, ifg_member) ifg_members; /* (CK_) */ + CK_STAILQ_ENTRY(ifg_group) ifg_next; /* (CK_) */ }; struct ifg_member { - STAILQ_ENTRY(ifg_member) ifgm_next; /* (CK_) */ + CK_STAILQ_ENTRY(ifg_member) ifgm_next; /* (CK_) */ struct ifnet *ifgm_ifp; }; struct ifg_list { struct ifg_group *ifgl_group; - STAILQ_ENTRY(ifg_list) ifgl_next; /* (CK_) */ + CK_STAILQ_ENTRY(ifg_list) ifgl_next; /* (CK_) */ }; #ifdef _SYS_EVENTHANDLER_H_ Modified: head/sys/netinet/in_debug.c ============================================================================== --- head/sys/netinet/in_debug.c Thu May 24 23:20:10 2018 (r334192) +++ head/sys/netinet/in_debug.c Thu May 24 23:21:23 2018 (r334193) @@ -93,7 +93,7 @@ in_show_in_ifaddr(struct in_ifaddr *ia) IA_DB_RPINTF("%p", ia_hash.le_next); IA_DB_RPINTF("%p", ia_hash.le_prev); IA_DB_RPINTF_DPTR("%p", ia_hash.le_prev); - IA_DB_RPINTF("%p", ia_link.stqe_next); + IA_DB_RPINTF("%p", ia_link.cstqe_next); IA_DB_RPINTF_PTR("%p", ia_addr); IA_DB_RPINTF_PTR("%p", ia_dstaddr); IA_DB_RPINTF_PTR("%p", ia_sockmask); Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Thu May 24 23:20:10 2018 (r334192) +++ head/sys/netinet6/in6.c Thu May 24 23:21:23 2018 (r334193) @@ -1125,7 +1125,7 @@ in6_alloc_ifa(struct ifnet *ifp, struct in6_aliasreq * ifa_ref(&ia->ia_ifa); /* in6_ifaddrhead */ IN6_IFADDR_WLOCK(); CK_STAILQ_INSERT_TAIL(&V_in6_ifaddrhead, ia, ia_link); - LIST_INSERT_HEAD(IN6ADDR_HASH(&ia->ia_addr.sin6_addr), ia, ia6_hash); + CK_LIST_INSERT_HEAD(IN6ADDR_HASH(&ia->ia_addr.sin6_addr), ia, ia6_hash); IN6_IFADDR_WUNLOCK(); return (ia); @@ -1334,7 +1334,7 @@ in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *if */ IN6_IFADDR_WLOCK(); CK_STAILQ_REMOVE(&V_in6_ifaddrhead, ia, in6_ifaddr, ia_link); - LIST_REMOVE(ia, ia6_hash); + CK_LIST_REMOVE(ia, ia6_hash); IN6_IFADDR_WUNLOCK(); /* @@ -1499,7 +1499,7 @@ in6ifa_ifwithaddr(const struct in6_addr *addr, uint32_ struct in6_ifaddr *ia; IN6_IFADDR_RLOCK(&in6_ifa_tracker); - LIST_FOREACH(ia, IN6ADDR_HASH(addr), ia6_hash) { + CK_LIST_FOREACH(ia, IN6ADDR_HASH(addr), ia6_hash) { if (IN6_ARE_ADDR_EQUAL(IA6_IN6(ia), addr)) { if (zoneid != 0 && zoneid != ia->ia_addr.sin6_scope_id) @@ -1676,7 +1676,7 @@ in6_localip(struct in6_addr *in6) struct in6_ifaddr *ia; IN6_IFADDR_RLOCK(&in6_ifa_tracker); - LIST_FOREACH(ia, IN6ADDR_HASH(in6), ia6_hash) { + CK_LIST_FOREACH(ia, IN6ADDR_HASH(in6), ia6_hash) { if (IN6_ARE_ADDR_EQUAL(in6, &ia->ia_addr.sin6_addr)) { IN6_IFADDR_RUNLOCK(&in6_ifa_tracker); return (1); @@ -1723,7 +1723,7 @@ in6_is_addr_deprecated(struct sockaddr_in6 *sa6) struct in6_ifaddr *ia; IN6_IFADDR_RLOCK(&in6_ifa_tracker); - LIST_FOREACH(ia, IN6ADDR_HASH(&sa6->sin6_addr), ia6_hash) { + CK_LIST_FOREACH(ia, IN6ADDR_HASH(&sa6->sin6_addr), ia6_hash) { if (IN6_ARE_ADDR_EQUAL(IA6_IN6(ia), &sa6->sin6_addr)) { if (ia->ia6_flags & IN6_IFF_DEPRECATED) { IN6_IFADDR_RUNLOCK(&in6_ifa_tracker); Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Thu May 24 23:20:10 2018 (r334192) +++ head/sys/netinet6/in6_var.h Thu May 24 23:21:23 2018 (r334193) @@ -127,7 +127,7 @@ struct in6_ifaddr { struct sockaddr_in6 ia_dstaddr; /* space for destination addr */ struct sockaddr_in6 ia_prefixmask; /* prefix mask */ u_int32_t ia_plen; /* prefix length */ - STAILQ_ENTRY(in6_ifaddr) ia_link; /* list of IPv6 addresses */ + CK_STAILQ_ENTRY(in6_ifaddr) ia_link; /* list of IPv6 addresses */ int ia6_flags; struct in6_addrlifetime ia6_lifetime; @@ -142,12 +142,12 @@ struct in6_ifaddr { /* multicast addresses joined from the kernel */ LIST_HEAD(, in6_multi_mship) ia6_memberships; /* entry in bucket of inet6 addresses */ - LIST_ENTRY(in6_ifaddr) ia6_hash; + CK_LIST_ENTRY(in6_ifaddr) ia6_hash; }; /* List of in6_ifaddr's. */ -STAILQ_HEAD(in6_ifaddrhead, in6_ifaddr); -LIST_HEAD(in6_ifaddrlisthead, in6_ifaddr); +CK_STAILQ_HEAD(in6_ifaddrhead, in6_ifaddr); +CK_LIST_HEAD(in6_ifaddrlisthead, in6_ifaddr); #endif /* _KERNEL */ /* control structure to manage address selection policy */ From owner-svn-src-head@freebsd.org Thu May 24 23:47:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E2C8F6DA18; Thu, 24 May 2018 23:47:28 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC03E69DE7; Thu, 24 May 2018 23:47:27 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98D1319216; Thu, 24 May 2018 23:47:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4ONlRo2090123; Thu, 24 May 2018 23:47:27 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4ONlRA3090122; Thu, 24 May 2018 23:47:27 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805242347.w4ONlRA3090122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 23:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334194 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 334194 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 23:47:28 -0000 Author: mmacy Date: Thu May 24 23:47:27 2018 New Revision: 334194 URL: https://svnweb.freebsd.org/changeset/base/334194 Log: netipsec/!VIMAGE: don't declare/define spdcache_destroy on non-VIMAGE builds this breaks MIPS compiles in universe Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Thu May 24 23:21:23 2018 (r334193) +++ head/sys/netipsec/key.c Thu May 24 23:47:27 2018 (r334194) @@ -758,9 +758,10 @@ static struct spdcache_entry *spdcache_entry_alloc( const struct secpolicyindex *spidx, struct secpolicy *policy); static void spdcache_entry_free(struct spdcache_entry *entry); +#ifdef VIMAGE static void spdcache_destroy(void); +#endif - #define DBG_IPSEC_INITREF(t, p) do { \ refcount_init(&(p)->refcnt, 1); \ KEYDBG(KEY_STAMP, \ @@ -8282,6 +8283,7 @@ spdcache_clear(void) } } +#ifdef VIMAGE void spdcache_destroy(void) { @@ -8297,7 +8299,7 @@ spdcache_destroy(void) free(V_spdcache_lock, M_IPSEC_SPDCACHE); } } - +#endif void key_init(void) { From owner-svn-src-head@freebsd.org Thu May 24 23:58:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDDC0F6DF19; Thu, 24 May 2018 23:58:58 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A7EF6A274; Thu, 24 May 2018 23:58:58 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39288193A8; Thu, 24 May 2018 23:58:58 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4ONwwKd095053; Thu, 24 May 2018 23:58:58 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4ONwwrH095052; Thu, 24 May 2018 23:58:58 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805242358.w4ONwwrH095052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 24 May 2018 23:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334195 - head/sys/mips/conf X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/mips/conf X-SVN-Commit-Revision: 334195 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 23:58:59 -0000 Author: mmacy Date: Thu May 24 23:58:57 2018 New Revision: 334195 URL: https://svnweb.freebsd.org/changeset/base/334195 Log: MALTA64EL: disable modules until objcopy is fixed Modified: head/sys/mips/conf/MALTA64EL Modified: head/sys/mips/conf/MALTA64EL ============================================================================== --- head/sys/mips/conf/MALTA64EL Thu May 24 23:47:27 2018 (r334194) +++ head/sys/mips/conf/MALTA64EL Thu May 24 23:58:57 2018 (r334195) @@ -9,5 +9,5 @@ include "std.MALTA" machine mips mips64el makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" - +makeoptions MODULES_OVERRIDE="" makeoptions KERNLOADADDR=0xffffffff80100000 From owner-svn-src-head@freebsd.org Fri May 25 00:10:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20507F6E323; Fri, 25 May 2018 00:10:06 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 143376AA00; Fri, 25 May 2018 00:10:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4P0A3T9042918; Thu, 24 May 2018 17:10:03 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4P0A3B7042917; Thu, 24 May 2018 17:10:03 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805250010.w4P0A3B7042917@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334173 - in head: share/man/man4 sys/dev/usb/template In-Reply-To: <201805241802.w4OI23qd016042@repo.freebsd.org> To: Edward Tomasz Napierala Date: Thu, 24 May 2018 17:10:03 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 00:10:06 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: trasz > Date: Thu May 24 18:02:02 2018 > New Revision: 334173 > URL: https://svnweb.freebsd.org/changeset/base/334173 > > Log: > Clarify that USB bus power consumption is measured in mA at 5V. Thank you. > > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > > Modified: > head/share/man/man4/usb_template.4 > head/sys/dev/usb/template/usb_template.c > > Modified: head/share/man/man4/usb_template.4 > ============================================================================== > --- head/share/man/man4/usb_template.4 Thu May 24 17:54:08 2018 (r334172) > +++ head/share/man/man4/usb_template.4 Thu May 24 18:02:02 2018 (r334173) > @@ -23,7 +23,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > .\" SUCH DAMAGE. > .\" > -.Dd May 23, 2018 > +.Dd May 24, 2018 > .Dt USB_TEMPLATE 4 > .Os > . > @@ -101,7 +101,7 @@ tunables: > Currently selected template. > Set to -1 to make the device disappear from the USB host point of view. > .It Va hw.usb.template_power > -USB bus power consumption in mA. > +USB bus power consumption in mA at 5V. > Must be between 0 and 500. > Setting to 0 marks the device as self-powered. > Defaults to 500mA. > > Modified: head/sys/dev/usb/template/usb_template.c > ============================================================================== > --- head/sys/dev/usb/template/usb_template.c Thu May 24 17:54:08 2018 (r334172) > +++ head/sys/dev/usb/template/usb_template.c Thu May 24 18:02:02 2018 (r334173) > @@ -120,7 +120,7 @@ SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW, > SYSCTL_PROC(_hw_usb, OID_AUTO, template_power, > CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, > NULL, 0, sysctl_hw_usb_template_power, > - "I", "USB bus power consumption in mA"); > + "I", "USB bus power consumption in mA at 5V"); > > static int usb_template_power = 500; /* 500mA */ > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri May 25 00:39:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0B6AF6EA6B; Fri, 25 May 2018 00:39:58 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E67B6B710; Fri, 25 May 2018 00:39:57 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id CB3CDCCC; Thu, 24 May 2018 19:39:50 -0500 (CDT) Date: Thu, 24 May 2018 19:39:49 -0500 From: Mark Linimon To: Matthew Macy Cc: Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: Deorbiting i386 Message-ID: <20180525003949.GA710@lonesome.com> References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Fri, 25 May 2018 01:15:13 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 00:39:58 -0000 On Thu, May 24, 2018 at 12:22:37PM -0700, Matthew Macy wrote: > All you need to know about sparc64 vitality is that HEAD didn't boot > for 3 months until last week. All you need to know is that -11 works fine, but, after so much drama from various places, I haven't even bothered upgrading any of my machines to 12. mcl From owner-svn-src-head@freebsd.org Fri May 25 01:15:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44A94F6F766; Fri, 25 May 2018 01:15:52 +0000 (UTC) (envelope-from mjg@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC4F26CB21; Fri, 25 May 2018 01:15:51 +0000 (UTC) (envelope-from mjg@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1296) id E47881718D; Fri, 25 May 2018 01:15:51 +0000 (UTC) Date: Fri, 25 May 2018 01:15:51 +0000 From: Mateusz Guzik To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334197 - head/sys/kern Message-ID: <20180525011551.GB19943@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-joke: no User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 01:15:52 -0000 Author: mjg Date: Thu May 25 23:58:57 2018 New Revision: 334197 URL: https://svnweb.freebsd.org/changeset/base/334197 Log: Implement Mostly Exclusive locks. High lock contention is one of the biggest scalability bottlenecks on multicore systems. Although the real fix consists of making lock consumers better suited for multicore operation, locking primitive performance is still a crucial factor in real-world systems. It turns out that a lot of the locking is overzealous - the lock is held longer than it needs to be and sometimes even completely unnecessarily in the first place. Even when lock is needed in principle, all relevant consumers may be only *reading* the state protected by the lock or modifying disjoint parts of protected data. As such, a lot of the locking can be elided. The idea boils down to trying to take the lock for a limited amount of time and in case of failure pretending we got it anyway. The approach along with practical analysis of performance win/new crash ratio is described in "Towards reliability-oblivious low latency locking" by Leland Oller. Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c =================================================================== --- sys/kern/kern_mutex.c (revision 334196) +++ sys/kern/kern_mutex.c (working copy) @@ -557,6 +557,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t lda.spin_cnt++; #endif #ifdef ADAPTIVE_MUTEXES + if (lda.spin_cnt > 16384) + break; + /* * If the owner is running on another CPU, spin until the * owner stops running or the state of the lock changes. @@ -1020,16 +1023,22 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_ turnstile_chain_lock(&m->lock_object); _mtx_release_lock_quick(m); ts = turnstile_lookup(&m->lock_object); - MPASS(ts != NULL); - if (LOCK_LOG_TEST(&m->lock_object, opts)) - CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); - turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); - /* - * This turnstile is now no longer associated with the mutex. We can - * unlock the chain lock so a new turnstile may take it's place. + * We failed to previously grab the lock. Unlock fast path brings + * us here thinking there are blocked threads, but there may be + * none */ - turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); + if (ts != NULL) { + if (LOCK_LOG_TEST(&m->lock_object, opts)) + CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); + turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); + + /* + * This turnstile is now no longer associated with the mutex. We can + * unlock the chain lock so a new turnstile may take it's place. + */ + turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); + } turnstile_chain_unlock(&m->lock_object); } From owner-svn-src-head@freebsd.org Fri May 25 01:27:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 820B6F6FA47; Fri, 25 May 2018 01:27:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E85D6D28C; Fri, 25 May 2018 01:27:40 +0000 (UTC) (envelope-from adrian@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0954B1A1FB; Fri, 25 May 2018 01:27:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4P1Rd1G040821; Fri, 25 May 2018 01:27:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4P1Rd8c040818; Fri, 25 May 2018 01:27:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201805250127.w4P1Rd8c040818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 25 May 2018 01:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334197 - in head/sys: contrib/dev/ath/ath_hal/ar9300 dev/ath/ath_hal dev/ath/ath_hal/ar5416 X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: in head/sys: contrib/dev/ath/ath_hal/ar9300 dev/ath/ath_hal dev/ath/ath_hal/ar5416 X-SVN-Commit-Revision: 334197 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 01:27:40 -0000 Author: adrian Date: Fri May 25 01:27:39 2018 New Revision: 334197 URL: https://svnweb.freebsd.org/changeset/base/334197 Log: [ath_hal] migrate the shared HAL_RESET_* pieces out into ath_hal. I'm in the process of reworking how the reset path works with an eye to better recovery when the chips hang and/or go RF/PHY deaf. This is the first step in a lot of unification and API changes. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Fri May 25 00:00:00 2018 (r334196) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Fri May 25 01:27:39 2018 (r334197) @@ -100,12 +100,6 @@ enum GAIN_PARAMS_2133 { GP_PWD_130, }; -enum { - HAL_RESET_POWER_ON, - HAL_RESET_WARM, - HAL_RESET_COLD, -}; - typedef struct _gain_opt_step { int16_t paramVal[NUM_CORNER_FIX_BITS_2133]; int32_t stepGain; Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Fri May 25 00:00:00 2018 (r334196) +++ head/sys/dev/ath/ath_hal/ah.h Fri May 25 01:27:39 2018 (r334197) @@ -763,6 +763,12 @@ typedef enum { HAL_RESET_FORCE_COLD = 2, /* Force full reset */ } HAL_RESET_TYPE; +enum { + HAL_RESET_POWER_ON, + HAL_RESET_WARM, + HAL_RESET_COLD +}; + typedef struct { uint8_t kv_type; /* one of HAL_CIPHER */ uint8_t kv_apsd; /* Mask for APSD enabled ACs */ Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri May 25 00:00:00 2018 (r334196) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri May 25 01:27:39 2018 (r334197) @@ -27,12 +27,6 @@ #define AR5416_MAGIC 0x20065416 -enum { - HAL_RESET_POWER_ON, - HAL_RESET_WARM, - HAL_RESET_COLD, -}; - typedef struct { uint16_t synth_center; uint16_t ctl_center; From owner-svn-src-head@freebsd.org Fri May 25 01:39:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41C09F6FD62; Fri, 25 May 2018 01:39:00 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2F726DA16; Fri, 25 May 2018 01:38:59 +0000 (UTC) (envelope-from bcran@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BFCE61A39F; Fri, 25 May 2018 01:38:59 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4P1cxgg045695; Fri, 25 May 2018 01:38:59 GMT (envelope-from bcran@FreeBSD.org) Received: (from bcran@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4P1cxwQ045694; Fri, 25 May 2018 01:38:59 GMT (envelope-from bcran@FreeBSD.org) Message-Id: <201805250138.w4P1cxwQ045694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcran set sender to bcran@FreeBSD.org using -f From: Rebecca Cran Date: Fri, 25 May 2018 01:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334198 - in head: share/man/man5 tools/build/options X-SVN-Group: head X-SVN-Commit-Author: bcran X-SVN-Commit-Paths: in head: share/man/man5 tools/build/options X-SVN-Commit-Revision: 334198 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 01:39:00 -0000 Author: bcran Date: Fri May 25 01:38:59 2018 New Revision: 334198 URL: https://svnweb.freebsd.org/changeset/base/334198 Log: Remove extra space before parenthesis in src.conf(5) Reviewed by: eadler Differential Revision: https://reviews.freebsd.org/D15528 Modified: head/share/man/man5/src.conf.5 head/tools/build/options/WITHOUT_BINUTILS Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri May 25 01:27:39 2018 (r334197) +++ head/share/man/man5/src.conf.5 Fri May 25 01:38:59 2018 (r334198) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ .\" @generated -.Dd May 23, 2018 +.Dd May 24, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -145,7 +145,7 @@ associated utilities, and examples. .Pp This option only affects amd64/amd64. .It Va WITHOUT_BINUTILS -Set to not build or install binutils (as, ld, objcopy, and objdump ) as part +Set to not build or install binutils (as, ld, objcopy, and objdump) as part of the normal system build. The resulting system cannot build programs from source. .Pp Modified: head/tools/build/options/WITHOUT_BINUTILS ============================================================================== --- head/tools/build/options/WITHOUT_BINUTILS Fri May 25 01:27:39 2018 (r334197) +++ head/tools/build/options/WITHOUT_BINUTILS Fri May 25 01:38:59 2018 (r334198) @@ -1,4 +1,4 @@ .\" $FreeBSD$ -Set to not build or install binutils (as, ld, objcopy, and objdump ) as part +Set to not build or install binutils (as, ld, objcopy, and objdump) as part of the normal system build. The resulting system cannot build programs from source. From owner-svn-src-head@freebsd.org Fri May 25 01:52:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9879F70148; Fri, 25 May 2018 01:52:35 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 658626E0DA; Fri, 25 May 2018 01:52:35 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A963B22777; Thu, 24 May 2018 21:52:33 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Thu, 24 May 2018 21:52:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=es+laj rjJ8Qy2FfK9rbCjGYiNkrbM1IHqqhUcFxaPyQ=; b=CmX1/adGA2aTrxGHvhmqTk HDXbCOptQHFVWU8sm8J0h0H+S/tTS0MSlzazoc4QXb/hWzGadyf5wxXKNAPacO0H dY9uT8miwIxOcW440FjvNCK5zBEnDInNIHZ947Y3UPQ0Hxm5CZ6qOgLIznjtFWX2 eTRUq6QKZB4vRNobYwl7v/SuePx20YdQfrUU3snzx+KD2X0jO9/WIB6Zb9qfBuj/ ea9P4B2GTxlzDIn29HNXi3gGKkMfzVM0ox4uwHt+EKz2Gadgmhzg2lPD1/h6nlCg LmZiHNit2z4hHMJQAAXJ4psWs2IDCzHWQGRZ+IOGZoOl80Psu2JWjSHGShE+bgNw == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 505C14292; Thu, 24 May 2018 21:52:33 -0400 (EDT) Message-Id: <1527213153.2653932.1384149056.7B60A94B@webmail.messagingengine.com> From: Brad Davis To: Bryan Drewery , Renato Botelho , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-29e6b281 References: <201805091344.w49Dist5061908@repo.freebsd.org> <33986467-cec5-a6b5-8a05-a4f07f557742@gmail.com> <0f21371e-d987-684a-51b1-d6b7c5a2953a@FreeBSD.org> Date: Thu, 24 May 2018 19:52:33 -0600 Subject: Re: svn commit: r333407 - head/share/mk In-Reply-To: <0f21371e-d987-684a-51b1-d6b7c5a2953a@FreeBSD.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 01:52:36 -0000 On Thu, May 24, 2018, at 4:16 PM, Bryan Drewery wrote: > On 5/24/2018 1:41 PM, Renato Botelho wrote: > > On 09/05/18 10:44, Brad Davis wrote: > >> Author: brd > >> Date: Wed May 9 13:44:54 2018 > >> New Revision: 333407 > >> URL: https://svnweb.freebsd.org/changeset/base/333407 > >> > >> Log: > >> Enable directory creation with FILESDIR. > >> > >> This is part of packaging base work. > >> > >> Reviewed by: will > >> Approved by: bapt (mentor), allanjude (mentor) > >> Differential Revision: https://reviews.freebsd.org/D15130 > >> > >> Modified: > >> head/share/mk/bsd.files.mk > >> head/share/mk/bsd.own.mk > >> > >> Modified: head/share/mk/bsd.files.mk > >> ============================================================================== > >> --- head/share/mk/bsd.files.mk Wed May 9 12:25:23 2018 (r333406) > >> +++ head/share/mk/bsd.files.mk Wed May 9 13:44:54 2018 (r333407) > >> @@ -67,7 +67,7 @@ STAGE_AS_${file:T}= ${${group}NAME_${file:T}} > >> STAGE_DIR.${file:T}= ${STAGE_OBJTOP}${${group}DIR_${file:T}} > >> stage_as.${file:T}: ${file} > >> > >> -installfiles-${group}: _${group}INS_${file:T} > >> +installfiles-${group}: installdirs-${group} _${group}INS_${file:T} > >> _${group}INS_${file:T}: ${file} > >> ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \ > >> -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ > >> @@ -77,10 +77,24 @@ _${group}INS_${file:T}: ${file} > >> _${group}FILES+= ${file} > >> .endif > >> .endfor > >> + > >> + > >> +installdirs-${group}: > >> + @echo installing dirs ${group}DIR ${${group}DIR} > > > > I'm seeing this message while running `make -s installworld`. > > > > Needs to use ${ECHO} rather than echo. Oh I see now.. OK, this will be fixed in a coming update. Regards, Brad Davis From owner-svn-src-head@freebsd.org Fri May 25 02:06:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EF0CF704ED; Fri, 25 May 2018 02:06:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 10F6F6E63B; Fri, 25 May 2018 02:06:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id B8BCC42AE48; Fri, 25 May 2018 12:06:47 +1000 (AEST) Date: Fri, 25 May 2018 12:06:46 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334171 - head In-Reply-To: <201805241708.w4OH8umj085934@repo.freebsd.org> Message-ID: <20180525113010.R1101@besplex.bde.org> References: <201805241708.w4OH8umj085934@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=TLfrCBOkBn35Xj1qTF0A:9 a=v7rVNSnqTUMDOhpw:21 a=msKOFWzd0TXfuSrm:21 a=Txk_gZu2-lhSD6bK:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 02:06:59 -0000 On Thu, 24 May 2018, Ed Maste wrote: > Log: > UPDATING: remove EOL whitespace in 20180523 entry This file has many other formatting errors. There are 2 more on just the line changed by this commit, and 1 of these is another implementation of EOL whitespace. > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Thu May 24 17:06:00 2018 (r334170) > +++ head/UPDATING Thu May 24 17:08:55 2018 (r334171) > @@ -53,7 +53,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: > > 20180523: > The on-disk format for hwpmc callchain records has changed to include > - threadid corresponding to a given record. This changes the field offsets > + threadid corresponding to a given record. This changes the field offsets > and thus requires that libpmcstat be rebuilt before using a kernel > later than r334108. The first error is a misformatted sentence break of 1 space instead of 2. This file has about 158 lines matching '\. ' (2+-space sentence break) and about 142 lines matching '\. [^]' (1-space sentence break). The next error was 4 spaces after "offsets" before EOL. This was visible as ugly vertical whitespace in 1 or 2 mail programs, but by the time it got to EDITOR=vi, some mail program corrupted the whitespace by removing it, so it doesn't even show up in the above diff. The next error is a line of length 80. This also shows up as vertical whitespace on 80-column terminals with auto-wrap. Display programs like less and vi normally use termcap to avoid extra vertical whitespace and scrolling from auto-wrap. On some terminals, it is impossible to display a character in the bottom right corner since printing it would scroll. less and vi handle this problem by using the last line only for status messages. 'expand UPDATING | grep ...' shows: - 24 lines misformatted with length 80 - 1 line misformatted with length 81 - 3 lines misformatted with length 82 - no lines misformatted with length > 82. 79 is also too wide. It makes minor editing often require re-wrapping whole paragraps. Paragraph formatting in UPDATING is also bad. Everything except dates and meta-info is supposed to be indented by 1 tab, and mostly is (the tab is only corrupted to 8 spaces on 1 line). But this effectively reduces the line length to 72 so encourages going closer to length 80 counting the tab. But then the large uniform left margin looks especially ugly compared to the smaller non-uniform right margin. The size of the right margin varies a lot with the entry. Some entries are fairly carefully formatted to give a right marging of at least 8 spaces and therefore sometimes 15 spaces if the 8 is strictly enforced. Some lines then have length only 80 - 8 - 15 = 57. I try to use a maximum width of at 72 in mail, and a bit larger in comments in C programs, and 80 only in statements in C programs where reducing this or splitting the line would be uglier. Bruce From owner-svn-src-head@freebsd.org Fri May 25 02:07:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C600F70524; Fri, 25 May 2018 02:07:06 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BCCB6E738; Fri, 25 May 2018 02:07:06 +0000 (UTC) (envelope-from araujo@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D65911A86D; Fri, 25 May 2018 02:07:05 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4P275Zf060726; Fri, 25 May 2018 02:07:05 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4P275Pf060725; Fri, 25 May 2018 02:07:05 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201805250207.w4P275Pf060725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 25 May 2018 02:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334199 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 334199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 02:07:06 -0000 Author: araujo Date: Fri May 25 02:07:05 2018 New Revision: 334199 URL: https://svnweb.freebsd.org/changeset/base/334199 Log: Fix a memory leak on topology_parse(). strdup(3) allocates memory for a copy of the string, does the copy and returns a pointer to it. If there is no sufficient memory NULL is returned and the global errno is set to ENOMEM. We do a sanity check to see if it was possible to allocate enough memory. Also as we allocate memory, we need to free this memory used. Or it will going out of scope leaks the storage it points to. Reviewed by: rgrimes MFC after: 3 weeks. X-MFC: r332298 Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D15550 Modified: head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 (r334198) +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 (r334199) @@ -193,6 +193,7 @@ topology_parse(const char *opt) c = 1, n = 1, s = 1, t = 1; ns = false, scts = false; str = strdup(opt); + assert(str != NULL); while ((cp = strsep(&str, ",")) != NULL) { if (sscanf(cp, "%i%n", &tmp, &chk) == 1) { @@ -218,11 +219,13 @@ topology_parse(const char *opt) } else if (cp[0] == '\0') continue; else - return (-1); + goto out; /* Any trailing garbage causes an error */ if (cp[chk] != '\0') - return (-1); + goto out; } + free(str); + /* * Range check 1 <= n <= UINT16_MAX all values */ @@ -248,6 +251,10 @@ topology_parse(const char *opt) cores = c; threads = t; return(0); + +out: + free(str); + return (-1); } static int From owner-svn-src-head@freebsd.org Fri May 25 03:34:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5BA9F71AB3; Fri, 25 May 2018 03:34:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87E87708D1; Fri, 25 May 2018 03:34:35 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68F751B733; Fri, 25 May 2018 03:34:35 +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 w4P3YZjV006541; Fri, 25 May 2018 03:34:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4P3YXet006531; Fri, 25 May 2018 03:34:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201805250334.w4P3YXet006531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 25 May 2018 03:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334200 - in head/sys: cam cam/nvme dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys: cam cam/nvme dev/nvme X-SVN-Commit-Revision: 334200 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 03:34:36 -0000 Author: mav Date: Fri May 25 03:34:33 2018 New Revision: 334200 URL: https://svnweb.freebsd.org/changeset/base/334200 Log: Refactor NVMe CAM integration. - Remove layering violation, when NVMe SIM code accessed CAM internal device structures to set pointers on controller and namespace data. Instead make NVMe XPT probe fetch the data directly from hardware. - Cleanup NVMe SIM code, fixing support for multiple namespaces per controller (reporting them as LUNs) and adding controller detach support and run-time namespace change notifications. - Add initial support for namespace change async events. So far only in CAM mode, but it allows run-time namespace arrival and departure. - Add missing nvme_notify_fail_consumers() call on controller detach. Together with previous changes this allows NVMe device detach/unplug. Non-CAM mode still requires a lot of love to stay on par, but at least CAM mode code should not stay in the way so much, becoming much more self-sufficient. Reviewed by: imp MFC after: 1 month Sponsored by: iXsystems, Inc. Modified: head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_internal.h head/sys/cam/nvme/nvme_xpt.c head/sys/dev/nvme/nvme.c head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/nvme/nvme_ctrlr_cmd.c head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_sim.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Fri May 25 02:07:05 2018 (r334199) +++ head/sys/cam/cam_xpt.c Fri May 25 03:34:33 2018 (r334200) @@ -5011,6 +5011,8 @@ xpt_release_device(struct cam_ed *device) free(device->physpath, M_CAMXPT); free(device->rcap_buf, M_CAMXPT); free(device->serial_num, M_CAMXPT); + free(device->nvme_data, M_CAMXPT); + free(device->nvme_cdata, M_CAMXPT); taskqueue_enqueue(xsoftc.xpt_taskq, &device->device_destroy_task); } Modified: head/sys/cam/cam_xpt_internal.h ============================================================================== --- head/sys/cam/cam_xpt_internal.h Fri May 25 02:07:05 2018 (r334199) +++ head/sys/cam/cam_xpt_internal.h Fri May 25 03:34:33 2018 (r334200) @@ -155,8 +155,8 @@ struct cam_ed { STAILQ_ENTRY(cam_ed) highpowerq_entry; struct mtx device_mtx; struct task device_destroy_task; - const struct nvme_controller_data *nvme_cdata; - const struct nvme_namespace_data *nvme_data; + struct nvme_controller_data *nvme_cdata; + struct nvme_namespace_data *nvme_data; }; /* Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Fri May 25 02:07:05 2018 (r334199) +++ head/sys/cam/nvme/nvme_xpt.c Fri May 25 03:34:33 2018 (r334200) @@ -84,17 +84,17 @@ static struct periph_driver nvme_probe_driver = PERIPHDRIVER_DECLARE(nvme_probe, nvme_probe_driver); typedef enum { - NVME_PROBE_IDENTIFY, + NVME_PROBE_IDENTIFY_CD, + NVME_PROBE_IDENTIFY_NS, NVME_PROBE_DONE, - NVME_PROBE_INVALID, - NVME_PROBE_RESET + NVME_PROBE_INVALID } nvme_probe_action; static char *nvme_probe_action_text[] = { - "NVME_PROBE_IDENTIFY", + "NVME_PROBE_IDENTIFY_CD", + "NVME_PROBE_IDENTIFY_NS", "NVME_PROBE_DONE", - "NVME_PROBE_INVALID", - "NVME_PROBE_RESET", + "NVME_PROBE_INVALID" }; #define NVME_PROBE_SET_ACTION(softc, newaction) \ @@ -113,6 +113,10 @@ typedef enum { typedef struct { TAILQ_HEAD(, ccb_hdr) request_ccbs; + union { + struct nvme_controller_data cd; + struct nvme_namespace_data ns; + }; nvme_probe_action action; nvme_probe_flags flags; int restart; @@ -137,6 +141,7 @@ static cam_status nvme_probe_register(struct cam_perip void *arg); static void nvme_probe_schedule(struct cam_periph *nvme_probe_periph); static void nvme_probe_start(struct cam_periph *periph, union ccb *start_ccb); +static void nvme_probe_done(struct cam_periph *periph, union ccb *done_ccb); static void nvme_probe_cleanup(struct cam_periph *periph); //static void nvme_find_quirk(struct cam_ed *device); static void nvme_scan_lun(struct cam_periph *periph, @@ -240,7 +245,7 @@ nvme_probe_schedule(struct cam_periph *periph) softc = (nvme_probe_softc *)periph->softc; ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs); - NVME_PROBE_SET_ACTION(softc, NVME_PROBE_IDENTIFY); + NVME_PROBE_SET_ACTION(softc, NVME_PROBE_IDENTIFY_CD); if (ccb->crcn.flags & CAM_EXPECT_INQ_CHANGE) softc->flags |= NVME_PROBE_NO_ANNOUNCE; @@ -254,10 +259,8 @@ static void nvme_probe_start(struct cam_periph *periph, union ccb *start_ccb) { struct ccb_nvmeio *nvmeio; - struct ccb_scsiio *csio; nvme_probe_softc *softc; struct cam_path *path; - const struct nvme_namespace_data *nvme_data; lun_id_t lun; CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("nvme_probe_start\n")); @@ -265,57 +268,163 @@ nvme_probe_start(struct cam_periph *periph, union ccb softc = (nvme_probe_softc *)periph->softc; path = start_ccb->ccb_h.path; nvmeio = &start_ccb->nvmeio; - csio = &start_ccb->csio; - nvme_data = periph->path->device->nvme_data; + lun = xpt_path_lun_id(periph->path); if (softc->restart) { softc->restart = 0; - if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) - NVME_PROBE_SET_ACTION(softc, NVME_PROBE_RESET); - else - NVME_PROBE_SET_ACTION(softc, NVME_PROBE_IDENTIFY); + NVME_PROBE_SET_ACTION(softc, NVME_PROBE_IDENTIFY_CD); } - /* - * Other transports have to ask their SIM to do a lot of action. - * NVMe doesn't, so don't do the dance. Just do things - * directly. - */ switch (softc->action) { - case NVME_PROBE_RESET: - /* FALLTHROUGH */ - case NVME_PROBE_IDENTIFY: - nvme_device_transport(path); + case NVME_PROBE_IDENTIFY_CD: + cam_fill_nvmeadmin(nvmeio, + 0, /* retries */ + nvme_probe_done, /* cbfcnp */ + CAM_DIR_IN, /* flags */ + (uint8_t *)&softc->cd, /* data_ptr */ + sizeof(softc->cd), /* dxfer_len */ + 30 * 1000); /* timeout 30s */ + nvme_ns_cmd(nvmeio, NVME_OPC_IDENTIFY, 0, + 1, 0, 0, 0, 0, 0); + break; + case NVME_PROBE_IDENTIFY_NS: + cam_fill_nvmeadmin(nvmeio, + 0, /* retries */ + nvme_probe_done, /* cbfcnp */ + CAM_DIR_IN, /* flags */ + (uint8_t *)&softc->ns, /* data_ptr */ + sizeof(softc->ns), /* dxfer_len */ + 30 * 1000); /* timeout 30s */ + nvme_ns_cmd(nvmeio, NVME_OPC_IDENTIFY, lun, + 0, 0, 0, 0, 0, 0); + break; + default: + panic("nvme_probe_start: invalid action state 0x%x\n", softc->action); + } + start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; + xpt_action(start_ccb); +} + +static void +nvme_probe_done(struct cam_periph *periph, union ccb *done_ccb) +{ + struct nvme_namespace_data *nvme_data; + struct nvme_controller_data *nvme_cdata; + nvme_probe_softc *softc; + struct cam_path *path; + cam_status status; + u_int32_t priority; + int found = 1; + + CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("nvme_probe_done\n")); + + softc = (nvme_probe_softc *)periph->softc; + path = done_ccb->ccb_h.path; + priority = done_ccb->ccb_h.pinfo.priority; + + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + if (cam_periph_error(done_ccb, + 0, softc->restart ? (SF_NO_RECOVERY | SF_NO_RETRY) : 0 + ) == ERESTART) { +out: + /* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */ + cam_release_devq(path, 0, 0, 0, FALSE); + return; + } + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { + /* Don't wedge the queue */ + xpt_release_devq(path, /*count*/1, /*run_queue*/TRUE); + } + status = done_ccb->ccb_h.status & CAM_STATUS_MASK; + /* - * Test for lun == CAM_LUN_WILDCARD is lame, but - * appears to be necessary here. XXX + * If we get to this point, we got an error status back + * from the inquiry and the error status doesn't require + * automatically retrying the command. Therefore, the + * inquiry failed. If we had inquiry information before + * for this device, but this latest inquiry command failed, + * the device has probably gone away. If this device isn't + * already marked unconfigured, notify the peripheral + * drivers that this device is no more. */ - lun = xpt_path_lun_id(periph->path); - if (lun == CAM_LUN_WILDCARD || - periph->path->device->flags & CAM_DEV_UNCONFIGURED) { +device_fail: if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0) + xpt_async(AC_LOST_DEVICE, path, NULL); + NVME_PROBE_SET_ACTION(softc, NVME_PROBE_INVALID); + found = 0; + goto done; + } + if (softc->restart) + goto done; + switch (softc->action) { + case NVME_PROBE_IDENTIFY_CD: + nvme_controller_data_swapbytes(&softc->cd); + + nvme_cdata = path->device->nvme_cdata; + if (nvme_cdata == NULL) { + nvme_cdata = malloc(sizeof(*nvme_cdata), M_CAMXPT, + M_NOWAIT); + if (nvme_cdata == NULL) { + xpt_print(path, "Can't allocate memory"); + goto device_fail; + } + } + bcopy(&softc->cd, nvme_cdata, sizeof(*nvme_cdata)); + path->device->nvme_cdata = nvme_cdata; + +// nvme_find_quirk(path->device); + nvme_device_transport(path); + NVME_PROBE_SET_ACTION(softc, NVME_PROBE_IDENTIFY_NS); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + goto out; + case NVME_PROBE_IDENTIFY_NS: + nvme_namespace_data_swapbytes(&softc->ns); + + /* Check that the namespace exists. */ + if (softc->ns.nsze == 0) + goto device_fail; + + nvme_data = path->device->nvme_data; + if (nvme_data == NULL) { + nvme_data = malloc(sizeof(*nvme_data), M_CAMXPT, + M_NOWAIT); + if (nvme_data == NULL) { + xpt_print(path, "Can't allocate memory"); + goto device_fail; + } + } + bcopy(&softc->ns, nvme_data, sizeof(*nvme_data)); + path->device->nvme_data = nvme_data; + + if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; xpt_acquire_device(path->device); - start_ccb->ccb_h.func_code = XPT_GDEV_TYPE; - xpt_action(start_ccb); - xpt_async(AC_FOUND_DEVICE, path, start_ccb); + done_ccb->ccb_h.func_code = XPT_GDEV_TYPE; + xpt_action(done_ccb); + xpt_async(AC_FOUND_DEVICE, path, done_ccb); } NVME_PROBE_SET_ACTION(softc, NVME_PROBE_DONE); break; default: - panic("nvme_probe_start: invalid action state 0x%x\n", softc->action); + panic("nvme_probe_done: invalid action state 0x%x\n", softc->action); } - /* - * Probing is now done. We need to complete any lingering items - * in the queue, though there shouldn't be any. - */ - xpt_release_ccb(start_ccb); +done: + if (softc->restart) { + softc->restart = 0; + xpt_release_ccb(done_ccb); + nvme_probe_schedule(periph); + goto out; + } + xpt_release_ccb(done_ccb); CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe completed\n")); - while ((start_ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs))) { + while ((done_ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs))) { TAILQ_REMOVE(&softc->request_ccbs, - &start_ccb->ccb_h, periph_links.tqe); - start_ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(start_ccb); + &done_ccb->ccb_h, periph_links.tqe); + done_ccb->ccb_h.status = found ? CAM_REQ_CMP : CAM_REQ_CMP_ERR; + xpt_done(done_ccb); } + /* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */ + cam_release_devq(path, 0, 0, 0, FALSE); cam_periph_invalidate(periph); cam_periph_release_locked(periph); } Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Fri May 25 02:07:05 2018 (r334199) +++ head/sys/dev/nvme/nvme.c Fri May 25 03:34:33 2018 (r334200) @@ -439,6 +439,24 @@ nvme_notify_fail_consumers(struct nvme_controller *ctr } } +void +nvme_notify_ns(struct nvme_controller *ctrlr, int nsid) +{ + struct nvme_consumer *cons; + struct nvme_namespace *ns = &ctrlr->ns[nsid - 1]; + uint32_t i; + + if (!ctrlr->is_initialized) + return; + + for (i = 0; i < NVME_MAX_CONSUMERS; i++) { + cons = &nvme_consumer[i]; + if (cons->id != INVALID_CONSUMER_ID && cons->ns_fn != NULL) + ns->cons_cookie[cons->id] = + (*cons->ns_fn)(ns, ctrlr->cons_cookie[cons->id]); + } +} + struct nvme_consumer * nvme_register_consumer(nvme_cons_ns_fn_t ns_fn, nvme_cons_ctrlr_fn_t ctrlr_fn, nvme_cons_async_fn_t async_fn, Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Fri May 25 02:07:05 2018 (r334199) +++ head/sys/dev/nvme/nvme.h Fri May 25 03:34:33 2018 (r334200) @@ -115,7 +115,7 @@ #define NVME_CMD_FUSE_SHIFT (8) #define NVME_CMD_FUSE_MASK (0x3) -#define NVME_CMD_SET_OPC(opc) (htole16(((opc) & NVME_CMD_OPC_MASK) << NVME_CMD_OPC_SHIFT)) +#define NVME_CMD_SET_OPC(opc) (htole16(((uint16_t)(opc) & NVME_CMD_OPC_MASK) << NVME_CMD_OPC_SHIFT)) #define NVME_STATUS_P_SHIFT (0) #define NVME_STATUS_P_MASK (0x1) @@ -1091,6 +1091,12 @@ struct nvme_firmware_page { _Static_assert(sizeof(struct nvme_firmware_page) == 512, "bad size for nvme_firmware_page"); +struct nvme_ns_list { + uint32_t ns[1024]; +} __packed __aligned(4); + +_Static_assert(sizeof(struct nvme_ns_list) == 4096, "bad size for nvme_ns_list"); + struct intel_log_temp_stats { uint64_t current; @@ -1467,6 +1473,15 @@ void nvme_firmware_page_swapbytes(struct nvme_firmware for (i = 0; i < 7; i++) s->revision[i] = le64toh(s->revision[i]); +} + +static inline +void nvme_ns_list_swapbytes(struct nvme_ns_list *s) +{ + int i; + + for (i = 0; i < 1024; i++) + s->ns[i] = le32toh(s->ns[i]); } static inline Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Fri May 25 02:07:05 2018 (r334199) +++ head/sys/dev/nvme/nvme_ctrlr.c Fri May 25 03:34:33 2018 (r334200) @@ -564,6 +564,7 @@ is_log_page_id_valid(uint8_t page_id) case NVME_LOG_ERROR: case NVME_LOG_HEALTH_INFORMATION: case NVME_LOG_FIRMWARE_SLOT: + case NVME_LOG_CHANGED_NAMESPACE: return (TRUE); } @@ -587,6 +588,9 @@ nvme_ctrlr_get_log_page_size(struct nvme_controller *c case NVME_LOG_FIRMWARE_SLOT: log_page_size = sizeof(struct nvme_firmware_page); break; + case NVME_LOG_CHANGED_NAMESPACE: + log_page_size = sizeof(struct nvme_ns_list); + break; default: log_page_size = 0; break; @@ -625,6 +629,7 @@ nvme_ctrlr_async_event_log_page_cb(void *arg, const st { struct nvme_async_event_request *aer = arg; struct nvme_health_information_page *health_info; + struct nvme_ns_list *nsl; struct nvme_error_information_entry *err; int i; @@ -652,6 +657,10 @@ nvme_ctrlr_async_event_log_page_cb(void *arg, const st nvme_firmware_page_swapbytes( (struct nvme_firmware_page *)aer->log_page_buffer); break; + case NVME_LOG_CHANGED_NAMESPACE: + nvme_ns_list_swapbytes( + (struct nvme_ns_list *)aer->log_page_buffer); + break; case INTEL_LOG_TEMP_STATS: intel_log_temp_stats_swapbytes( (struct intel_log_temp_stats *)aer->log_page_buffer); @@ -676,6 +685,14 @@ nvme_ctrlr_async_event_log_page_cb(void *arg, const st ~health_info->critical_warning; nvme_ctrlr_cmd_set_async_event_config(aer->ctrlr, aer->ctrlr->async_event_config, NULL, NULL); + } else if (aer->log_page_id == NVME_LOG_CHANGED_NAMESPACE && + !nvme_use_nvd) { + nsl = (struct nvme_ns_list *)aer->log_page_buffer; + for (i = 0; i < nitems(nsl->ns) && nsl->ns[i] != 0; i++) { + if (nsl->ns[i] > NVME_MAX_NAMESPACES) + break; + nvme_notify_ns(aer->ctrlr, nsl->ns[i]); + } } @@ -712,7 +729,8 @@ nvme_ctrlr_async_event_cb(void *arg, const struct nvme /* Associated log page is in bits 23:16 of completion entry dw0. */ aer->log_page_id = (cpl->cdw0 & 0xFF0000) >> 16; - nvme_printf(aer->ctrlr, "async event occurred (log page id=0x%x)\n", + nvme_printf(aer->ctrlr, "async event occurred (type 0x%x, info 0x%02x," + " page 0x%02x)\n", (cpl->cdw0 & 0x03), (cpl->cdw0 & 0xFF00) >> 8, aer->log_page_id); if (is_log_page_id_valid(aer->log_page_id)) { @@ -762,8 +780,12 @@ nvme_ctrlr_configure_aer(struct nvme_controller *ctrlr struct nvme_async_event_request *aer; uint32_t i; - ctrlr->async_event_config = 0xFF; - ctrlr->async_event_config &= ~NVME_CRIT_WARN_ST_RESERVED_MASK; + ctrlr->async_event_config = NVME_CRIT_WARN_ST_AVAILABLE_SPARE | + NVME_CRIT_WARN_ST_DEVICE_RELIABILITY | + NVME_CRIT_WARN_ST_READ_ONLY | + NVME_CRIT_WARN_ST_VOLATILE_MEMORY_BACKUP; + if (ctrlr->cdata.ver >= NVME_REV(1, 2)) + ctrlr->async_event_config |= 0x300; status.done = 0; nvme_ctrlr_cmd_get_feature(ctrlr, NVME_FEAT_TEMPERATURE_THRESHOLD, @@ -774,8 +796,8 @@ nvme_ctrlr_configure_aer(struct nvme_controller *ctrlr (status.cpl.cdw0 & 0xFFFF) == 0xFFFF || (status.cpl.cdw0 & 0xFFFF) == 0x0000) { nvme_printf(ctrlr, "temperature threshold not supported\n"); - ctrlr->async_event_config &= ~NVME_CRIT_WARN_ST_TEMPERATURE; - } + } else + ctrlr->async_event_config |= NVME_CRIT_WARN_ST_TEMPERATURE; nvme_ctrlr_cmd_set_async_event_config(ctrlr, ctrlr->async_event_config, NULL, NULL); @@ -1284,6 +1306,8 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, dev if (ctrlr->resource == NULL) goto nores; + + nvme_notify_fail_consumers(ctrlr); for (i = 0; i < NVME_MAX_NAMESPACES; i++) nvme_ns_destruct(&ctrlr->ns[i]); Modified: head/sys/dev/nvme/nvme_ctrlr_cmd.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr_cmd.c Fri May 25 02:07:05 2018 (r334199) +++ head/sys/dev/nvme/nvme_ctrlr_cmd.c Fri May 25 03:34:33 2018 (r334200) @@ -214,7 +214,7 @@ nvme_ctrlr_cmd_set_num_queues(struct nvme_controller * void nvme_ctrlr_cmd_set_async_event_config(struct nvme_controller *ctrlr, - uint8_t state, nvme_cb_fn_t cb_fn, void *cb_arg) + uint32_t state, nvme_cb_fn_t cb_fn, void *cb_arg) { uint32_t cdw11; Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Fri May 25 02:07:05 2018 (r334199) +++ head/sys/dev/nvme/nvme_private.h Fri May 25 03:34:33 2018 (r334200) @@ -312,8 +312,8 @@ struct nvme_controller { struct cdev *cdev; - /** bit mask of critical warning types currently enabled for async events */ - uint8_t async_event_config; + /** bit mask of event types currently enabled for async events */ + uint32_t async_event_config; uint32_t num_aers; struct nvme_async_event_request aer[NVME_MAX_ASYNC_EVENTS]; @@ -399,7 +399,7 @@ void nvme_ctrlr_cmd_set_num_queues(struct nvme_control uint32_t num_queues, nvme_cb_fn_t cb_fn, void *cb_arg); void nvme_ctrlr_cmd_set_async_event_config(struct nvme_controller *ctrlr, - uint8_t state, + uint32_t state, nvme_cb_fn_t cb_fn, void *cb_arg); void nvme_ctrlr_cmd_abort(struct nvme_controller *ctrlr, uint16_t cid, uint16_t sqid, nvme_cb_fn_t cb_fn, void *cb_arg); @@ -544,6 +544,7 @@ void nvme_notify_async_consumers(struct nvme_controlle uint32_t log_page_size); void nvme_notify_fail_consumers(struct nvme_controller *ctrlr); void nvme_notify_new_controller(struct nvme_controller *ctrlr); +void nvme_notify_ns(struct nvme_controller *ctrlr, int nsid); void nvme_ctrlr_intx_handler(void *arg); void nvme_ctrlr_poll(struct nvme_controller *ctrlr); Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Fri May 25 02:07:05 2018 (r334199) +++ head/sys/dev/nvme/nvme_sim.c Fri May 25 03:34:33 2018 (r334200) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include // Yes, this is wrong. #include #include @@ -54,13 +53,11 @@ static void nvme_sim_action(struct cam_sim *sim, union static void nvme_sim_poll(struct cam_sim *sim); #define sim2softc(sim) ((struct nvme_sim_softc *)cam_sim_softc(sim)) -#define sim2ns(sim) (sim2softc(sim)->s_ns) #define sim2ctrlr(sim) (sim2softc(sim)->s_ctrlr) struct nvme_sim_softc { struct nvme_controller *s_ctrlr; - struct nvme_namespace *s_ns; struct cam_sim *s_sim; struct cam_path *s_path; }; @@ -146,18 +143,11 @@ static void nvme_sim_action(struct cam_sim *sim, union ccb *ccb) { struct nvme_controller *ctrlr; - struct nvme_namespace *ns; CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("nvme_sim_action: func= %#x\n", ccb->ccb_h.func_code)); - /* - * XXX when we support multiple namespaces in the base driver we'll need - * to revisit how all this gets stored and saved in the periph driver's - * reserved areas. Right now we store all three in the softc of the sim. - */ - ns = sim2ns(sim); ctrlr = sim2ctrlr(sim); mtx_assert(&ctrlr->lock, MA_OWNED); @@ -193,11 +183,11 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) cpi->version_num = 1; cpi->hba_inquiry = 0; cpi->target_sprt = 0; - cpi->hba_misc = PIM_UNMAPPED /* | PIM_NOSCAN */; + cpi->hba_misc = PIM_UNMAPPED | PIM_NOSCAN; cpi->hba_eng_cnt = 0; cpi->max_target = 0; cpi->max_lun = ctrlr->cdata.nn; - cpi->maxio = nvme_ns_get_max_io_xfer_size(ns); + cpi->maxio = ctrlr->max_xfer_size; cpi->initiator_id = 0; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = nvme_link_kBps(ctrlr); @@ -209,7 +199,7 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) cpi->transport_version = nvme_mmio_read_4(ctrlr, vs); cpi->protocol = PROTO_NVME; cpi->protocol_version = nvme_mmio_read_4(ctrlr, vs); - cpi->xport_specific.nvme.nsid = ns->id; + cpi->xport_specific.nvme.nsid = xpt_path_lun_id(ccb->ccb_h.path); cpi->xport_specific.nvme.domain = pci_get_domain(dev); cpi->xport_specific.nvme.bus = pci_get_bus(dev); cpi->xport_specific.nvme.slot = pci_get_slot(dev); @@ -285,122 +275,89 @@ nvme_sim_poll(struct cam_sim *sim) static void * nvme_sim_new_controller(struct nvme_controller *ctrlr) { + struct nvme_sim_softc *sc; struct cam_devq *devq; int max_trans; - int unit; - struct nvme_sim_softc *sc = NULL; max_trans = ctrlr->max_hw_pend_io; - unit = device_get_unit(ctrlr->dev); devq = cam_simq_alloc(max_trans); if (devq == NULL) - return NULL; + return (NULL); sc = malloc(sizeof(*sc), M_NVME, M_ZERO | M_WAITOK); - sc->s_ctrlr = ctrlr; sc->s_sim = cam_sim_alloc(nvme_sim_action, nvme_sim_poll, - "nvme", sc, unit, &ctrlr->lock, max_trans, max_trans, devq); + "nvme", sc, device_get_unit(ctrlr->dev), + &ctrlr->lock, max_trans, max_trans, devq); if (sc->s_sim == NULL) { printf("Failed to allocate a sim\n"); cam_simq_free(devq); - free(sc, M_NVME); - return NULL; + goto err1; } + if (xpt_bus_register(sc->s_sim, ctrlr->dev, 0) != CAM_SUCCESS) { + printf("Failed to create a bus\n"); + goto err2; + } + if (xpt_create_path(&sc->s_path, /*periph*/NULL, cam_sim_path(sc->s_sim), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + printf("Failed to create a path\n"); + goto err3; + } - return sc; + return (sc); + +err3: + xpt_bus_deregister(cam_sim_path(sc->s_sim)); +err2: + cam_sim_free(sc->s_sim, /*free_devq*/TRUE); +err1: + free(sc, M_NVME); + return (NULL); } -static void -nvme_sim_rescan_target(struct nvme_controller *ctrlr, struct cam_path *path) +static void * +nvme_sim_new_ns(struct nvme_namespace *ns, void *sc_arg) { + struct nvme_sim_softc *sc = sc_arg; + struct nvme_controller *ctrlr = sc->s_ctrlr; union ccb *ccb; + mtx_lock(&ctrlr->lock); + ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { printf("unable to alloc CCB for rescan\n"); - return; + return (NULL); } - if (xpt_clone_path(&ccb->ccb_h.path, path) != CAM_REQ_CMP) { - printf("unable to copy path for rescan\n"); + if (xpt_create_path(&ccb->ccb_h.path, /*periph*/NULL, + cam_sim_path(sc->s_sim), 0, ns->id) != CAM_REQ_CMP) { + printf("unable to create path for rescan\n"); xpt_free_ccb(ccb); - return; + return (NULL); } xpt_rescan(ccb); -} - -static void * -nvme_sim_new_ns(struct nvme_namespace *ns, void *sc_arg) -{ - struct nvme_sim_softc *sc = sc_arg; - struct nvme_controller *ctrlr = sc->s_ctrlr; - int i; - sc->s_ns = ns; - - /* - * XXX this is creating one bus per ns, but it should be one - * XXX target per controller, and one LUN per namespace. - * XXX Current drives only support one NS, so there's time - * XXX to fix it later when new drives arrive. - * - * XXX I'm pretty sure the xpt_bus_register() call below is - * XXX like super lame and it really belongs in the sim_new_ctrlr - * XXX callback. Then the create_path below would be pretty close - * XXX to being right. Except we should be per-ns not per-ctrlr - * XXX data. - */ - - mtx_lock(&ctrlr->lock); -/* Create bus */ - - /* - * XXX do I need to lock ctrlr->lock ? - * XXX do I need to lock the path? - * ata and scsi seem to in their code, but their discovery is - * somewhat more asynchronous. We're only every called one at a - * time, and nothing is in parallel. - */ - - i = 0; - if (xpt_bus_register(sc->s_sim, ctrlr->dev, 0) != CAM_SUCCESS) - goto error; - i++; - if (xpt_create_path(&sc->s_path, /*periph*/NULL, cam_sim_path(sc->s_sim), - 1, ns->id) != CAM_REQ_CMP) - goto error; - i++; - - sc->s_path->device->nvme_data = nvme_ns_get_data(ns); - sc->s_path->device->nvme_cdata = nvme_ctrlr_get_data(ns->ctrlr); - -/* Scan bus */ - nvme_sim_rescan_target(ctrlr, sc->s_path); - mtx_unlock(&ctrlr->lock); - return ns; - -error: - switch (i) { - case 2: - xpt_free_path(sc->s_path); - case 1: - xpt_bus_deregister(cam_sim_path(sc->s_sim)); - case 0: - cam_sim_free(sc->s_sim, /*free_devq*/TRUE); - } - mtx_unlock(&ctrlr->lock); - return NULL; + return (ns); } static void nvme_sim_controller_fail(void *ctrlr_arg) { - /* XXX cleanup XXX */ + struct nvme_sim_softc *sc = ctrlr_arg; + struct nvme_controller *ctrlr = sc->s_ctrlr; + + mtx_lock(&ctrlr->lock); + xpt_async(AC_LOST_DEVICE, sc->s_path, NULL); + xpt_free_path(sc->s_path); + xpt_bus_deregister(cam_sim_path(sc->s_sim)); + cam_sim_free(sc->s_sim, /*free_devq*/TRUE); + mtx_unlock(&ctrlr->lock); + free(sc, M_NVME); } struct nvme_consumer *consumer_cookie; From owner-svn-src-head@freebsd.org Fri May 25 06:11:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3BE5F73B19; Fri, 25 May 2018 06:11:32 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E89573F54; Fri, 25 May 2018 06:11:31 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-wr0-f175.google.com with SMTP id w3-v6so7065084wrl.12; Thu, 24 May 2018 23:11:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=gBGNskbPKaRg3fDC0z8ElxmXJ2YN85tHsQw9UYTWrcU=; b=KehrbIEeSUC6qAe0f7aoNdky8HPfinmIT800ffSVCi/YVNyE/c7OwfcbxmvBARZVQp QIKzOXoPruWW5VxNz01mhLCzXKn2xU1Q2A6xdwFwzOYqYnzKgiMF6WRb2CqB3LJiH2xH 890+6MelMfHJDYVYdkP64yQi7PtF4qa1vnABFnIa7vI4i46cQQcxQmwXT7NxGTPBgivm eNcD+hweuy5lTyKBAULt20M/6EYVtC3g0aMv9lw4Ui1euLbJP9DscDP2JPn+BcfpQYET b/2Q2GSm/S0/uwLwwJi2ZFqtE1Mu+NB8wCkOUVi5JcfvOYbgyLGawVm8yrjShJaPeE3W rKZw== X-Gm-Message-State: ALKqPwcLnRF8NVupb5pDD5Cwp1RZWwPb1u6KWJs+MAyEiEv5NmuowtTo dmtfg61rILyhDZfZXZHANC3GdUuE X-Google-Smtp-Source: ADUXVKLHvTr4/0uZPBgQc8laafJhnrXOAhGH/VFQbOF+R/T1AGYJ3bwCi8WpMBEoh3iDHGlKPAkMyg== X-Received: by 2002:a19:d9d5:: with SMTP id s82-v6mr577334lfi.18.1527228684833; Thu, 24 May 2018 23:11:24 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id y23-v6sm4307458ljh.88.2018.05.24.23.11.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 23:11:24 -0700 (PDT) Subject: Re: svn commit: r334197 - head/sys/kern To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <20180525011551.GB19943@freefall.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Fri, 25 May 2018 09:11:22 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180525011551.GB19943@freefall.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 06:11:33 -0000 On 25/05/2018 04:15, Mateusz Guzik wrote: > Author: mjg > Date: Thu May 25 23:58:57 2018 > New Revision: 334197 > URL: https://svnweb.freebsd.org/changeset/base/334197 > > Log: > Implement Mostly Exclusive locks. > > High lock contention is one of the biggest scalability bottlenecks on > multicore systems. Although the real fix consists of making lock > consumers better suited for multicore operation, locking primitive > performance is still a crucial factor in real-world systems. > > It turns out that a lot of the locking is overzealous - the lock is > held longer than it needs to be and sometimes even completely > unnecessarily in the first place. Even when lock is needed in > principle, all relevant consumers may be only *reading* the state > protected by the lock or modifying disjoint parts of protected data. > > As such, a lot of the locking can be elided. > > The idea boils down to trying to take the lock for a limited amount of > time and in case of failure pretending we got it anyway. The approach > along with practical analysis of performance win/new crash ratio is > described in "Towards reliability-oblivious low latency locking" by > Leland Oller. Great change! Looking forward to new crashes! :-) > Modified: > head/sys/kern/kern_mutex.c > > Modified: head/sys/kern/kern_mutex.c > =================================================================== > --- sys/kern/kern_mutex.c (revision 334196) > +++ sys/kern/kern_mutex.c (working copy) > @@ -557,6 +557,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t > lda.spin_cnt++; > #endif > #ifdef ADAPTIVE_MUTEXES > + if (lda.spin_cnt > 16384) > + break; > + > /* > * If the owner is running on another CPU, spin until the > * owner stops running or the state of the lock changes. > @@ -1020,16 +1023,22 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_ > turnstile_chain_lock(&m->lock_object); > _mtx_release_lock_quick(m); > ts = turnstile_lookup(&m->lock_object); > - MPASS(ts != NULL); > - if (LOCK_LOG_TEST(&m->lock_object, opts)) > - CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); > - turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); > - > /* > - * This turnstile is now no longer associated with the mutex. We can > - * unlock the chain lock so a new turnstile may take it's place. > + * We failed to previously grab the lock. Unlock fast path brings > + * us here thinking there are blocked threads, but there may be > + * none > */ > - turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); > + if (ts != NULL) { > + if (LOCK_LOG_TEST(&m->lock_object, opts)) > + CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); > + turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); > + > + /* > + * This turnstile is now no longer associated with the mutex. We can > + * unlock the chain lock so a new turnstile may take it's place. > + */ > + turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); > + } > turnstile_chain_unlock(&m->lock_object); > } > P.S. I had to re-read the commit message twice, the actual change three times and to check the calendar five times. -- Andriy Gapon From owner-svn-src-head@freebsd.org Fri May 25 06:52:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75C27F74466; Fri, 25 May 2018 06:52:05 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F78975257; Fri, 25 May 2018 06:52:05 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 288081A268; Fri, 25 May 2018 06:52:05 +0000 (UTC) From: Jan Beich To: Fabien Thomas Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat References: <201805221554.w4MFsPQA083334@repo.freebsd.org> Date: Fri, 25 May 2018 08:52:01 +0200 In-Reply-To: <201805221554.w4MFsPQA083334@repo.freebsd.org> (Fabien Thomas's message of "Tue, 22 May 2018 15:54:25 +0000 (UTC)") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 06:52:05 -0000 Fabien Thomas writes: > + IPSECSTAT_INC(ips_spdcache_hits); > + > + SPDCACHE_UNLOCK(hashv); > + goto out; > + } > + > + IPSECSTAT_INC(ips_spdcache_misses); Breaks kernel build with "nooption IPSEC": ld: error: undefined symbol: vnet_entry_ipsec4stat >>> referenced by key.c:933 (/usr/src/sys/netipsec/key.c:933) >>> key.o:(key_allocsp) ld: error: undefined symbol: vnet_entry_ipsec4stat >>> referenced by key.c:939 (/usr/src/sys/netipsec/key.c:939) >>> key.o:(key_allocsp) From owner-svn-src-head@freebsd.org Fri May 25 07:29:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B949CF74F5C; Fri, 25 May 2018 07:29:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 570297630D; Fri, 25 May 2018 07:29:53 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2BB7D1DC64; Fri, 25 May 2018 07:29:53 +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 w4P7Tq5x021380; Fri, 25 May 2018 07:29:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4P7TqGY021379; Fri, 25 May 2018 07:29:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201805250729.w4P7TqGY021379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 May 2018 07:29:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334203 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 334203 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 07:29:54 -0000 Author: avg Date: Fri May 25 07:29:52 2018 New Revision: 334203 URL: https://svnweb.freebsd.org/changeset/base/334203 Log: fix zfs_getpages crash when called from sendfile, followup to r329363 It turns out that sendfile_swapin() has an optimization where it may insert pointers to bogus_page into the page array that it passes to VOP_GETPAGES. That happens to work with buffer cache, because it extensively uses bogus_page internally, so it has the necessary checks. However, ZFS did not expect bogus_page as VOP_GETPAGES(9) does not document such a (ab)use of bogus_page. So, this commit adds checks and handling of bogus_page. I expect that use of bogus_page with VOP_GETPAGES will get documented sooner rather than later. Reported by: Andrew Reilly , delphij Tested by: Andrew Reilly Requested by: many MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri May 25 06:26:07 2018 (r334202) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri May 25 07:29:52 2018 (r334203) @@ -1732,17 +1732,21 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ for (mi = 0, di = 0; mi < count && di < numbufs; ) { if (pgoff == 0) { m = ma[mi]; - vm_page_assert_xbusied(m); - ASSERT(m->valid == 0); - ASSERT(m->dirty == 0); - ASSERT(!pmap_page_is_mapped(m)); - va = zfs_map_page(m, &sf); + if (m != bogus_page) { + vm_page_assert_xbusied(m); + ASSERT(m->valid == 0); + ASSERT(m->dirty == 0); + ASSERT(!pmap_page_is_mapped(m)); + va = zfs_map_page(m, &sf); + } } if (bufoff == 0) db = dbp[di]; - ASSERT3U(IDX_TO_OFF(m->pindex) + pgoff, ==, - db->db_offset + bufoff); + if (m != bogus_page) { + ASSERT3U(IDX_TO_OFF(m->pindex) + pgoff, ==, + db->db_offset + bufoff); + } /* * We do not need to clamp the copy size by the file @@ -1750,13 +1754,16 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ * end of file anyway. */ tocpy = MIN(db->db_size - bufoff, PAGESIZE - pgoff); - bcopy((char *)db->db_data + bufoff, va + pgoff, tocpy); + if (m != bogus_page) + bcopy((char *)db->db_data + bufoff, va + pgoff, tocpy); pgoff += tocpy; ASSERT(pgoff <= PAGESIZE); if (pgoff == PAGESIZE) { - zfs_unmap_page(sf); - m->valid = VM_PAGE_BITS_ALL; + if (m != bogus_page) { + zfs_unmap_page(sf); + m->valid = VM_PAGE_BITS_ALL; + } ASSERT(mi < count); mi++; pgoff = 0; @@ -1801,6 +1808,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ } #endif if (pgoff != 0) { + ASSERT(m != bogus_page); bzero(va + pgoff, PAGESIZE - pgoff); zfs_unmap_page(sf); m->valid = VM_PAGE_BITS_ALL; From owner-svn-src-head@freebsd.org Fri May 25 07:33:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F3FDF751F9; Fri, 25 May 2018 07:33:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA899767D2; Fri, 25 May 2018 07:33:21 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A85081DDF2; Fri, 25 May 2018 07:33:21 +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 w4P7XLof026280; Fri, 25 May 2018 07:33:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4P7XKQk026275; Fri, 25 May 2018 07:33:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201805250733.w4P7XKQk026275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 25 May 2018 07:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334204 - in head/sys: amd64/include dev/acpica i386/include x86/x86 X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys: amd64/include dev/acpica i386/include x86/x86 X-SVN-Commit-Revision: 334204 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 07:33:22 -0000 Author: avg Date: Fri May 25 07:33:20 2018 New Revision: 334204 URL: https://svnweb.freebsd.org/changeset/base/334204 Log: re-synchronize TSC-s on SMP systems after resume, if necessary The TSC-s are checked and synchronized only if they were good originally. That is, invariant, synchronized, etc. This is necessary on an AMD-based system where after a wakeup from STR I see that BSP clock differs from AP clocks by a count that roughly corresponds to one second. The APs are in sync with each other. Not sure if this is a hardware quirk or a firmware bug. This is what I see after a resume with this change: SMP: passed TSC synchronization test after adjustment acpi_timer0: restoring timecounter, ACPI-fast -> TSC-low Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D15551 Modified: head/sys/amd64/include/clock.h head/sys/dev/acpica/acpi.c head/sys/i386/include/clock.h head/sys/x86/x86/tsc.c Modified: head/sys/amd64/include/clock.h ============================================================================== --- head/sys/amd64/include/clock.h Fri May 25 07:29:52 2018 (r334203) +++ head/sys/amd64/include/clock.h Fri May 25 07:33:20 2018 (r334204) @@ -34,6 +34,7 @@ void clock_init(void); void startrtclock(void); void init_TSC(void); +void resume_TSC(void); #define HAS_TIMER_SPKR 1 int timer_spkr_acquire(void); Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Fri May 25 07:29:52 2018 (r334203) +++ head/sys/dev/acpica/acpi.c Fri May 25 07:33:20 2018 (r334204) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #if defined(__i386__) || defined(__amd64__) +#include #include #endif #include @@ -3040,6 +3041,10 @@ backout: if (slp_state >= ACPI_SS_SLP_PREP) AcpiLeaveSleepState(state); if (slp_state >= ACPI_SS_SLEPT) { +#if defined(__i386__) || defined(__amd64__) + /* NB: we are still using ACPI timecounter at this point. */ + resume_TSC(); +#endif acpi_resync_clock(sc); acpi_enable_fixed_events(sc); } Modified: head/sys/i386/include/clock.h ============================================================================== --- head/sys/i386/include/clock.h Fri May 25 07:29:52 2018 (r334203) +++ head/sys/i386/include/clock.h Fri May 25 07:33:20 2018 (r334204) @@ -32,6 +32,7 @@ void clock_init(void); void startrtclock(void); void timer_restore(void); void init_TSC(void); +void resume_TSC(void); #define HAS_TIMER_SPKR 1 int timer_spkr_acquire(void); Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Fri May 25 07:29:52 2018 (r334203) +++ head/sys/x86/x86/tsc.c Fri May 25 07:33:20 2018 (r334204) @@ -451,7 +451,7 @@ adj_smp_tsc(void *arg) } static int -test_tsc(void) +test_tsc(int adj_max_count) { uint64_t *data, *tsc; u_int i, size, adj; @@ -467,7 +467,7 @@ retry: smp_tsc = 1; /* XXX */ smp_rendezvous(smp_no_rendezvous_barrier, comp_smp_tsc, smp_no_rendezvous_barrier, data); - if (!smp_tsc && adj < smp_tsc_adjust) { + if (!smp_tsc && adj < adj_max_count) { adj++; smp_rendezvous(smp_no_rendezvous_barrier, adj_smp_tsc, smp_no_rendezvous_barrier, data); @@ -512,7 +512,7 @@ retry: * on uniprocessor kernel. */ static int -test_tsc(void) +test_tsc(int adj_max_count __unused) { return (0); @@ -579,7 +579,7 @@ init_TSC_tc(void) * environments, so it is set to a negative quality in those cases. */ if (mp_ncpus > 1) - tsc_timecounter.tc_quality = test_tsc(); + tsc_timecounter.tc_quality = test_tsc(smp_tsc_adjust); else if (tsc_is_invariant) tsc_timecounter.tc_quality = 1000; max_freq >>= tsc_shift; @@ -614,6 +614,30 @@ init: } } SYSINIT(tsc_tc, SI_SUB_SMP, SI_ORDER_ANY, init_TSC_tc, NULL); + +void +resume_TSC(void) +{ + int quality; + + /* If TSC was not good on boot, it is unlikely to become good now. */ + if (tsc_timecounter.tc_quality < 0) + return; + /* Nothing to do with UP. */ + if (mp_ncpus < 2) + return; + + /* + * If TSC was good, a single synchronization should be enough, + * but honour smp_tsc_adjust if it's set. + */ + quality = test_tsc(MAX(smp_tsc_adjust, 1)); + if (quality != tsc_timecounter.tc_quality) { + printf("TSC timecounter quality changed: %d -> %d\n", + tsc_timecounter.tc_quality, quality); + tsc_timecounter.tc_quality = quality; + } +} /* * When cpufreq levels change, find out about the (new) max frequency. We From owner-svn-src-head@freebsd.org Fri May 25 08:44:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4FBAF764F9; Fri, 25 May 2018 08:44:01 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 555EA784B2; Fri, 25 May 2018 08:44:01 +0000 (UTC) (envelope-from royger@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37C4C1E932; Fri, 25 May 2018 08:44:01 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4P8i1xA061143; Fri, 25 May 2018 08:44:01 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4P8i1rl061142; Fri, 25 May 2018 08:44:01 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201805250844.w4P8i1rl061142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Fri, 25 May 2018 08:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334205 - head/sys/xen X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/xen X-SVN-Commit-Revision: 334205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 08:44:01 -0000 Author: royger Date: Fri May 25 08:44:00 2018 New Revision: 334205 URL: https://svnweb.freebsd.org/changeset/base/334205 Log: xen: remove dead code from gnttab.h This code was left over when it was imported from Linux. The original committer thought that those functions would be implemented, so the prototypes where left in place. Delete them at once. Submitted by: pratyush Reviewed by: royger Differential Review: https://reviews.freebsd.org/D15553 Modified: head/sys/xen/gnttab.h Modified: head/sys/xen/gnttab.h ============================================================================== --- head/sys/xen/gnttab.h Fri May 25 07:33:20 2018 (r334204) +++ head/sys/xen/gnttab.h Fri May 25 08:44:00 2018 (r334205) @@ -117,46 +117,4 @@ void gnttab_grant_foreign_transfer_ref(grant_ref_t, do int gnttab_suspend(void); int gnttab_resume(device_t); -#if 0 - -#include - -static inline void -gnttab_set_map_op(struct gnttab_map_grant_ref *map, vm_paddr_t addr, - uint32_t flags, grant_ref_t ref, domid_t domid) -{ - if (flags & GNTMAP_contains_pte) - map->host_addr = addr; - else - map->host_addr = vtophys(addr); - - map->flags = flags; - map->ref = ref; - map->dom = domid; -} - -static inline void -gnttab_set_unmap_op(struct gnttab_unmap_grant_ref *unmap, vm_paddr_t addr, - uint32_t flags, grant_handle_t handle) -{ - if (flags & GNTMAP_contains_pte) - unmap->host_addr = addr; - else - unmap->host_addr = vtophys(addr); - - unmap->handle = handle; - unmap->dev_bus_addr = 0; -} - -static inline void -gnttab_set_replace_op(struct gnttab_unmap_and_replace *unmap, vm_paddr_t addr, - vm_paddr_t new_addr, grant_handle_t handle) -{ - unmap->host_addr = vtophys(addr); - unmap->new_addr = vtophys(new_addr); - - unmap->handle = handle; -} -#endif - #endif /* __ASM_GNTTAB_H__ */ From owner-svn-src-head@freebsd.org Fri May 25 04:27:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDEBAF72615 for ; Fri, 25 May 2018 04:27:48 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6385671E6B for ; Fri, 25 May 2018 04:27:48 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-oi0-f48.google.com with SMTP id b130-v6so3432126oif.12 for ; Thu, 24 May 2018 21:27:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oErXU7mAZ1KmpazwygP42vhAxIAV6/OrisZtCQIWhoM=; b=XTewjJJEKBS1WFdmksBlQ0fd1U/ALAghLXglPiwkqLqHwXRxc6qTcoai0oZmEWLB9/ KXojtGDH1GFDCr0DKpSPt99IEK95z53Hk8j28LMWHUwKPJPN/d0BhyljcLfhd0LbXvFw 56Z07F4/qE5DIqfUgr6fwDi0wAIOeQcgs9yad1ASD+/TJxJ92O620Wy4CdK7z01HMaKx rU21V9pSdIrq5FUMo5W21qog5p7QzRj4bwlIY3LBnnR6Aaj4+sEhBWKta7NKGfkOmPn1 L1doSDDaEODVNi3FDirK/tGEpWZnKHqzlhhygbr0Tw2vNlxkG8JNn+DhCaPLdhOhSbd/ 5rDg== X-Gm-Message-State: ALKqPwd4521n3YkkuKzGPzKnhXqQlHPavdE7WE6HHmeOM3F/Tecg/MDG XwQSojGji5wbKYklpcEu/YybEjdf7mYuVPB+zgrnxA== X-Google-Smtp-Source: ADUXVKJaNtZFMQWAL+QLiY9OFGvOWyQAL9D1n79YTC4fidCwP/EU0032QyyuxQ78OWPl10QchTBJJ12pra6LpjZH6uE= X-Received: by 2002:aca:2b19:: with SMTP id i25-v6mr466135oik.170.1527222460919; Thu, 24 May 2018 21:27:40 -0700 (PDT) MIME-Version: 1.0 References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <20180525003949.GA710@lonesome.com> In-Reply-To: <20180525003949.GA710@lonesome.com> From: Maxim Sobolev Date: Thu, 24 May 2018 21:27:28 -0700 Message-ID: Subject: Re: Deorbiting i386 To: Mark Linimon Cc: Matthew Macy , Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-Mailman-Approved-At: Fri, 25 May 2018 10:32:36 +0000 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 04:27:49 -0000 The idea looks very inmature and short-sighted to me. i386 is here to stay not as a server/desktop platform but as an embedded/low power/low cost platform for at least 5-10 years to come. There are plenty of applications in the world that don't need > 3gb of memory space and have no use for extra bits (and extra silicon) to function. By quitting this space early FreeBSD is going to make itself unavailable for those applications. We are striving to support mips and the likes, with just tens of megabytes of memory and marginal at best adoption. Yet seriously discussing ditching out solid platform that has been our workforce for 20+ years?? -Max On Thu, May 24, 2018, 5:40 PM Mark Linimon wrote: > On Thu, May 24, 2018 at 12:22:37PM -0700, Matthew Macy wrote: > > All you need to know about sparc64 vitality is that HEAD didn't boot > > for 3 months until last week. > > All you need to know is that -11 works fine, but, after so much drama > from various places, I haven't even bothered upgrading any of my machines > to 12. > > mcl > > From owner-svn-src-head@freebsd.org Fri May 25 10:35:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17C64F78571; Fri, 25 May 2018 10:35:26 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qt0-x230.google.com (mail-qt0-x230.google.com [IPv6:2607:f8b0:400d:c0d::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CE117B970; Fri, 25 May 2018 10:35:25 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qt0-x230.google.com with SMTP id m5-v6so5924072qti.1; Fri, 25 May 2018 03:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=0TLF0dDlwvsgaZUUEEVLPuUysB9RHBr9bz4rv4R0/PQ=; b=eGA+zw3dfo3/W+rDCciKL67V+Cob+EdBUPjQxXH3py5IxeZ9qx7HJptMlMWSU+B4f6 nEqOfjgil9D1HTE4fnQvm6h8MAcFkPmLMMkpK7TGo2oEMj4n4cNpjh/3/fn2xwJlpg+H sHO5qmk4/AUZ9xs5DoUY4NqQIJQ72QZguVJ1vLbkvxUVtwKnyVgtL6qyUZA6k4j5yI79 UtH/5aXfbDV2c6x7G3eowq40qH2ZU6bNSIhjabVH979fevuY5CaxBcrMr6+0RZIG1Xgl hl+w9UUIs7YOczCilxVXFDrHmhC40rNCV2EXI1SXTX7vlwonZxbzSv+ynqT8UVdFC/vt kK5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0TLF0dDlwvsgaZUUEEVLPuUysB9RHBr9bz4rv4R0/PQ=; b=ALIhKTtyRPJd52a5rpllc1lGidzIBYN3SaJ9LWWUlligzNcygz6KxcYrsAWx04XAWO Wk0JYMrLi9uKIxfuogvpdEAHZItP//fw0bYWelUehOcH0OYCh9oAR9ItDVskSjwCWU6h w9bLVBuXvoJ6eqnWSIGWubgQCkvRgyEQeYvJgzgwsP7+VDktUpszJDhwCOr7bRw2vxN/ eTtUxjTNO+wQt0SpsnCEo5i9Pr3bwqTo3BBqGHbEXWRioC5bKBOPzHKVRgjYukTpWNEx G+WVx8PTJv9jn0JzqHY+d8Z4G1D7G9CzJOrDjt7xiHD2ZAkTCYi4fiJhwL/mII8m120Y PKug== X-Gm-Message-State: ALKqPwdna9iL5dvpv00swXv71Npg+/OB+S/MKf/I0nCu27a10tVCdexw e+B5v8mF2u1MFId/a+wVruLrvjh+ X-Google-Smtp-Source: ADUXVKL0jCP5O0ipctAoTRFbRUqPJj7nXSFQaSaIuEJo2D6gcycKjkYbIr7FltwhFBaYcPz5KL+0rQ== X-Received: by 2002:aed:26c3:: with SMTP id q61-v6mr1652551qtd.60.1527244524839; Fri, 25 May 2018 03:35:24 -0700 (PDT) Received: from mbp-eth.home ([177.53.86.172]) by smtp.gmail.com with ESMTPSA id u50-v6sm19243256qth.0.2018.05.25.03.35.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 May 2018 03:35:23 -0700 (PDT) Subject: Re: svn commit: r333407 - head/share/mk To: Brad Davis , Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805091344.w49Dist5061908@repo.freebsd.org> <33986467-cec5-a6b5-8a05-a4f07f557742@gmail.com> <0f21371e-d987-684a-51b1-d6b7c5a2953a@FreeBSD.org> <1527213153.2653932.1384149056.7B60A94B@webmail.messagingengine.com> From: Renato Botelho Message-ID: <7032545e-160d-6627-e3b6-ecf9f1d47dcd@gmail.com> Date: Fri, 25 May 2018 07:35:19 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1527213153.2653932.1384149056.7B60A94B@webmail.messagingengine.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 10:35:26 -0000 On 24/05/18 22:52, Brad Davis wrote: > On Thu, May 24, 2018, at 4:16 PM, Bryan Drewery wrote: >> On 5/24/2018 1:41 PM, Renato Botelho wrote: >>> On 09/05/18 10:44, Brad Davis wrote: >>>> Author: brd >>>> Date: Wed May 9 13:44:54 2018 >>>> New Revision: 333407 >>>> URL: https://svnweb.freebsd.org/changeset/base/333407 >>>> >>>> Log: >>>> Enable directory creation with FILESDIR. >>>> >>>> This is part of packaging base work. >>>> >>>> Reviewed by: will >>>> Approved by: bapt (mentor), allanjude (mentor) >>>> Differential Revision: https://reviews.freebsd.org/D15130 >>>> >>>> Modified: >>>> head/share/mk/bsd.files.mk >>>> head/share/mk/bsd.own.mk >>>> >>>> Modified: head/share/mk/bsd.files.mk >>>> ============================================================================== >>>> --- head/share/mk/bsd.files.mk Wed May 9 12:25:23 2018 (r333406) >>>> +++ head/share/mk/bsd.files.mk Wed May 9 13:44:54 2018 (r333407) >>>> @@ -67,7 +67,7 @@ STAGE_AS_${file:T}= ${${group}NAME_${file:T}} >>>> STAGE_DIR.${file:T}= ${STAGE_OBJTOP}${${group}DIR_${file:T}} >>>> stage_as.${file:T}: ${file} >>>> >>>> -installfiles-${group}: _${group}INS_${file:T} >>>> +installfiles-${group}: installdirs-${group} _${group}INS_${file:T} >>>> _${group}INS_${file:T}: ${file} >>>> ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \ >>>> -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ >>>> @@ -77,10 +77,24 @@ _${group}INS_${file:T}: ${file} >>>> _${group}FILES+= ${file} >>>> .endif >>>> .endfor >>>> + >>>> + >>>> +installdirs-${group}: >>>> + @echo installing dirs ${group}DIR ${${group}DIR} >>> >>> I'm seeing this message while running `make -s installworld`. >>> >> >> Needs to use ${ECHO} rather than echo. > > Oh I see now.. OK, this will be fixed in a coming update. Thank you! -- Renato Botelho From owner-svn-src-head@freebsd.org Fri May 25 05:30:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B752F731F1; Fri, 25 May 2018 05:30:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C42A73132; Fri, 25 May 2018 05:30:07 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id M5IffSdUPSzNNM5Ihf2DE5; Thu, 24 May 2018 23:30:06 -0600 X-Authority-Analysis: v=2.3 cv=KuxjJ1eN c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=xfDLHkLGAAAA:8 a=-FGs326eAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=MxtUtNusukCCqAP_r0QA:9 a=ow--yyR-FP5WdFhh:21 a=CjuIK1q_8ugA:10 a=IfaqVvZgccqrtc8gcwf2:22 a=7Nw9HX5Nqxt2AnyyOhBr:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 3BCC5156F; Thu, 24 May 2018 22:30:01 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4P5TwfU046475; Thu, 24 May 2018 22:29:58 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4P5Tu6E046413; Thu, 24 May 2018 22:29:56 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805250529.w4P5Tu6E046413@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Maxim Sobolev cc: Mark Linimon , Matthew Macy , Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: Deorbiting i386 In-Reply-To: Message from Maxim Sobolev of "Thu, 24 May 2018 21:27:28 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 May 2018 22:29:56 -0700 X-CMAE-Envelope: MS4wfDltF4i2FXyW5G0Am5V0q8JRV1GOzOlMMcLzu9GccmhqtbzBNwFe0L+/kMZK6bkHczkCfYJugVjR7f+wjtYpvOyuJxcmq1w7rTaavHIYfIXnvi4YRNAR S6aEsZ4TwBqvKUYYMJ4bfzfRLJ1vDfxHCX0asH8/5gv/58fZj3t53xCwW3l4aAQLcvLfTS8Qh6oJk+pYahj9bWdiSS+hVCyko1JiZcyQovgvHj9e3SQc0V8j x+YmO5lWbB4u5IT61TUznI2xiWfxKMvrpzlSGrQqhFUSGkuhTNjZXOf3hGpTmGFkepaolwEirKZqQLi4DEQVMpi4NyiBBFy/TsG1m1L4PBDiXS0fJwcmah7S yWKixXx+9W0XgOPhaOu57kaDznVOD0exY4DC+L933ows7e6I455eZbyIUpAD/V4ovN31KQ5zYA8GldpOZzZpFQiQ4DH7ZYBEZErcR1fDbsi+PgHB2CStIFAI ggHaffHm3nYSkWzgeP/oC6b00qKrSx8UOGqxpYX6VY6jGtEO4+hhaeA7T+s/qU3DQUGW+4fGVmvzjfJG8uyM+eVtgAePADPzeAlzJBLXjuxWKIrnBKcL0Yyp FJs= X-Mailman-Approved-At: Fri, 25 May 2018 10:40:09 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 05:30:09 -0000 In message , Maxim Sobolev writes: > --00000000000046c92e056d00305f > Content-Type: text/plain; charset="UTF-8" > > The idea looks very inmature and short-sighted to me. i386 is here to stay > not as a server/desktop platform but as an embedded/low power/low cost > platform for at least 5-10 years to come. There are plenty of applications > in the world that don't need > 3gb of memory space and have no use for > extra bits (and extra silicon) to function. By quitting this space early > FreeBSD is going to make itself unavailable for those applications. We are > striving to support mips and the likes, with just tens of megabytes of > memory and marginal at best adoption. Yet seriously discussing ditching out > solid platform that has been our workforce for 20+ years?? How many newly developed embedded applications use i386? Most embedded applications I've seen in 2018 use ARM. The original discussion point was to start considering it -- a roadmap (FreeBSD 14 or 15, or by 2023). 2038 is quickly approaching. The dominant O/S distros have by and large dropped or are working to deprecate it. When we break i386 few complain and even then not immediately. I don't think it's a large share of our market. ~cy > > -Max > > On Thu, May 24, 2018, 5:40 PM Mark Linimon wrote: > > > On Thu, May 24, 2018 at 12:22:37PM -0700, Matthew Macy wrote: > > > All you need to know about sparc64 vitality is that HEAD didn't boot > > > for 3 months until last week. > > > > All you need to know is that -11 works fine, but, after so much drama > > from various places, I haven't even bothered upgrading any of my machines > > to 12. > > > > mcl > > > > > > --00000000000046c92e056d00305f > Content-Type: text/html; charset="UTF-8" > Content-Transfer-Encoding: quoted-printable > >
The idea looks very inmature and short-sighted to me. i38= > 6 is here to stay not as a server/desktop platform but as an embedded/low p= > ower/low cost platform for at least 5-10 years to come. There are plenty of= > applications in the world that don't need > 3gb of memory space and= > have no use for extra bits (and extra silicon) to function. By quitting th= > is space early FreeBSD is going to make itself unavailable for those applic= > ations. We are striving to support mips and the likes, with just tens of me= > gabytes of memory and marginal at best adoption. Yet seriously discussing d= > itching out solid platform that has been our workforce for 20+ years??=C2= > =A0

-Max

lass=3D"gmail_quote">
On Thu, May 24, 2018, 5:40 PM Mark Li= > nimon <linimon@lonesome.com&= > gt; wrote:
.8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, May 24, 2018 at = > 12:22:37PM -0700, Matthew Macy wrote:
> > All you need to know about sparc64 vitality is that HEAD didn't bo= > ot
> > for 3 months until last week.
>
> All you need to know is that -11 works fine, but, after so much drama
> from various places, I haven't even bothered upgrading any of my machin= > es
> to 12.
>
> mcl
>
>
> > --00000000000046c92e056d00305f-- -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Fri May 25 07:40:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8A34F753E9; Fri, 25 May 2018 07:40:39 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 421FB769A5; Fri, 25 May 2018 07:40:38 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 892DE14897; Fri, 25 May 2018 07:40:31 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id w4P7eUVd029337 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 25 May 2018 07:40:30 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id w4P7ePvp029330; Fri, 25 May 2018 07:40:25 GMT (envelope-from phk) To: David Chisnall cc: Maxim Sobolev , Mark Linimon , Matthew Macy , Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: Deorbiting i386 In-reply-to: <52678325-8265-4333-8C4F-2C8D53C822F4@theravensnest.org> From: "Poul-Henning Kamp" References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <20180525003949.GA710@lonesome.com> <52678325-8265-4333-8C4F-2C8D53C822F4@theravensnest.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29328.1527234025.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Fri, 25 May 2018 07:40:25 +0000 Message-ID: <29329.1527234025@critter.freebsd.dk> X-Mailman-Approved-At: Fri, 25 May 2018 10:40:12 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 07:40:40 -0000 -------- In message <52678325-8265-4333-8C4F-2C8D53C822F4@theravensnest.org>, David= Chisnall writes: >On 25 May 2018, at 05:27, Maxim Sobolev wrote: >> = >> The idea looks very inmature and short-sighted to me. i386 is here to = >stay not as a server/desktop platform but as an embedded/low power/low = >cost platform for at least 5-10 years to come. There are plenty of = >applications in the world that don't need > 3gb of memory space and have = >no use for extra bits (and extra silicon) to function. > >This argument seems very odd to me. If you are targeting the embedded = >space, it is far easier to build a low-power chip that targets the = >x86-64 ISA than the x86-32 ISA. Any company doing so would also have to consider IP/patent/licensing facto= rs. That said, the main reason why i386 is still doing surprisingly well in the embedded space, is that there are still truckloads of "legacy" software running under MS-DOS and similar, and it works well enough that "a simple hardware upgrade" is enough to satisfy contingency planning. For FreeBSD that market centers on the "Soekris Segment" Most of the chips in those platforms are EOL'ed now, Soekris has moved into the audio-homeopathy market, and PCengines are also phasing out their x86 kit. That sucks for the people running other operating systems, but various taiwanese companies produce usable HW. Anything written moderately competent using FreeBSD on i386 can be trivially ported to amd64, if the new hardware supports that, or to an entirely different 32bit arch arch like arm or mips. So absolutely: Kill i386 once 12 has been branched. Poul-Henning ... Who ran Win3.11 a couple of years ago because of Vladimir Putin. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-svn-src-head@freebsd.org Fri May 25 07:26:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C9F1F74EAB; Fri, 25 May 2018 07:26:57 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [46.226.110.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "theravensnest.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F225F761FF; Fri, 25 May 2018 07:26:56 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.1.65] (host86-145-125-203.range86-145.btcentralplus.com [86.145.125.203]) (authenticated bits=0) by theravensnest.org (8.15.2/8.15.2) with ESMTPSA id w4P7QfC2066934 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 25 May 2018 07:26:42 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: mail: Host host86-145-125-203.range86-145.btcentralplus.com [86.145.125.203] claimed to be [192.168.1.65] Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Deorbiting i386 From: David Chisnall In-Reply-To: Date: Fri, 25 May 2018 08:26:43 +0100 Cc: Mark Linimon , Matthew Macy , Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <05C5BD86-70D0-4B02-AC29-36E68B3602AE@FreeBSD.org> References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <20180525003949.GA710@lonesome.com> To: Maxim Sobolev X-Mailer: Apple Mail (2.3273) X-Mailman-Approved-At: Fri, 25 May 2018 10:40:10 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 07:26:57 -0000 On 25 May 2018, at 05:27, Maxim Sobolev wrote: >=20 > The idea looks very inmature and short-sighted to me. i386 is here to = stay not as a server/desktop platform but as an embedded/low power/low = cost platform for at least 5-10 years to come. There are plenty of = applications in the world that don't need > 3gb of memory space and have = no use for extra bits (and extra silicon) to function. This argument seems very odd to me. If you are targeting the embedded = space, it is far easier to build a low-power chip that targets the = x86-64 ISA than the x86-32 ISA. You can move all of the 80-bit floating = point stuff into microcode. You can put anything using = pair-of-32-bit-register 64-bit operations into slow microcode. You can = skimp on store forwarding for stack addresses. You actually need fewer = rename registers (one of the biggest consumers of power), because x86-64 = code needs to do less register juggling to fit in the architectural = register space. All of these things are big consumers of power and area = and are far less necessary when running code compiled for x86-64. You = can also do tricks like the one that Intel did on the early Atoms, where = the SSE ALUs are actually only 64 bits wide and the 128-bit ops are = cracked into pairs of 64-bit micro-ops. As to =E2=80=98not needing more than 3GB of memory space=E2=80=99, = that=E2=80=99s what the x32 ABI is for. This lets you get all of the = advantages of the x86-64 ISA (of which there are very many, in = comparison to x86-32), without needing 64-bit pointers. You get the = instruction density of x86-64 combined with the data density of x86-32. = This is what Intel and Centaur have been pushing in the embedded space = for several years. You do pay a slight hardware cost from supporting a 48-bit virtual = address space, though with superpages that=E2=80=99s negligible and the = hardware targeted at these applications often doesn=E2=80=99t support = more than a 32-bit virtual address space. =20 And this completely ignores the fact that Intel has almost no presence = in the low-end embedded space. AArch32 is vastly more important there = and if we dropped x86-32 and shifted that effort to AArch32 then I think = we=E2=80=99d see a lot more adoption. David= From owner-svn-src-head@freebsd.org Fri May 25 09:11:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E1C3F77020; Fri, 25 May 2018 09:11:06 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 935DC79147; Fri, 25 May 2018 09:11:05 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.15.2/8.15.2) with ESMTP id w4P9AcE3024517; Fri, 25 May 2018 12:10:38 +0300 (MSK) (envelope-from maxim.konovalov@gmail.com) Date: Fri, 25 May 2018 12:10:38 +0300 (MSK) From: Maxim Konovalov To: Maxim Sobolev cc: Mark Linimon , Matthew Macy , Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: Deorbiting i386 In-Reply-To: Message-ID: References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <20180525003949.GA710@lonesome.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Fri, 25 May 2018 10:40:12 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 09:11:06 -0000 On Thu, 24 May 2018, 21:27-0700, Maxim Sobolev wrote: > The idea looks very inmature and short-sighted to me. i386 is here > to stay not as a server/desktop platform but as an embedded/low > power/low cost platform for at least 5-10 years to come. [...] At least I'd include vendors@ to this discussion before the final decision and move the thread outside of src/svn maillist to some more visible place. -- Maxim Konovalov From owner-svn-src-head@freebsd.org Fri May 25 11:49:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85B0DF79EE5; Fri, 25 May 2018 11:49:22 +0000 (UTC) (envelope-from arrowd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3402E7E22C; Fri, 25 May 2018 11:49:22 +0000 (UTC) (envelope-from arrowd@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1065120617; Fri, 25 May 2018 11:49:22 +0000 (UTC) (envelope-from arrowd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PBnLw3051696; Fri, 25 May 2018 11:49:21 GMT (envelope-from arrowd@FreeBSD.org) Received: (from arrowd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PBnLEl051695; Fri, 25 May 2018 11:49:21 GMT (envelope-from arrowd@FreeBSD.org) Message-Id: <201805251149.w4PBnLEl051695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arrowd set sender to arrowd@FreeBSD.org using -f From: Gleb Popov Date: Fri, 25 May 2018 11:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334206 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: arrowd X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 334206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 11:49:22 -0000 Author: arrowd (ports committer) Date: Fri May 25 11:49:21 2018 New Revision: 334206 URL: https://svnweb.freebsd.org/changeset/base/334206 Log: Add myself (arrowd) to share/misc/committers-ports.dot Approved by: tcberner (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Fri May 25 08:44:00 2018 (r334205) +++ head/share/misc/committers-ports.dot Fri May 25 11:49:21 2018 (r334206) @@ -55,6 +55,7 @@ amdmi3 [label="Dmitry Marakasov\namdmi3@FreeBSD.org\n2 anray [label="Andrey Slusar\nanray@FreeBSD.org\n2005/12/11"] antoine [label="Antoine Brodin\nantoine@FreeBSD.org\n2013/04/03"] araujo [label="Marcelo Araujo\naraujo@FreeBSD.org\n2007/04/26"] +arrowd [label="Gleb Popov\narrowd@FreeBSD.org\n2018/05/18"] arved [label="Tilman Linneweh\narved@FreeBSD.org\n2002/10/15"] ashish [label="Ashish SHUKLA\nashish@FreeBSD.org\n2010/06/10"] avilla [label="Alberto Villa\navilla@FreeBSD.org\n2010/01/24"] @@ -283,6 +284,7 @@ ahze -> shaun ahze -> tmclaugh amdmi3 -> jrm +amdmi3 -> arrowd antoine -> dumbbell @@ -675,6 +677,7 @@ tcberner -> adridg tcberner -> joneum tcberner -> yuri tcberner -> fernape +tcberner -> arrowd thierry -> jadawin thierry -> riggs From owner-svn-src-head@freebsd.org Fri May 25 13:31:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AD45EB130C; Fri, 25 May 2018 13:31:46 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660083.outbound.protection.outlook.com [40.107.66.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD10E8169B; Fri, 25 May 2018 13:31:45 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR0101MB0959.CANPRD01.PROD.OUTLOOK.COM (52.132.34.15) by YTXPR0101MB0733.CANPRD01.PROD.OUTLOOK.COM (52.132.33.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Fri, 25 May 2018 13:31:44 +0000 Received: from YTXPR0101MB0959.CANPRD01.PROD.OUTLOOK.COM ([fe80::f52d:74c4:9a70:3781]) by YTXPR0101MB0959.CANPRD01.PROD.OUTLOOK.COM ([fe80::f52d:74c4:9a70:3781%13]) with mapi id 15.20.0797.011; Fri, 25 May 2018 13:31:44 +0000 From: Rick Macklem To: Andriy Gapon , Mateusz Guzik , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r334197 - head/sys/kern Thread-Topic: svn commit: r334197 - head/sys/kern Thread-Index: AQHT88XzwWsVgu1ZiEmkdTOGnPGznKQ/9twAgAB6IE8= Date: Fri, 25 May 2018 13:31:44 +0000 Message-ID: References: <20180525011551.GB19943@freefall.freebsd.org>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTXPR0101MB0733; 7:Gb3pVWF9HvKDePWN4WRuibsqTAHT29U5JgDsz+okIpjW1FzPJSXKWQTBU8N194FqCxqr4uKTOVdxc730WGQTLxzQc2BIU6urc3+LN/ccqP0acgHTwim4BJ1QJifLgCQMYJ0UYkAE4p7YAqjj/dYAxq8YCWORbBRKgVtzAfwmb/45JHrgtH3DRhHQ4OYogNUeLi+yMKUsSZrDiSxdGO6L4LzPKp8BPdnN6KCPYheMjFKIJtbb7FkDkX/wIs89jKFU x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020); SRVR:YTXPR0101MB0733; x-ms-traffictypediagnostic: YTXPR0101MB0733: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231254)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:YTXPR0101MB0733; BCL:0; PCL:0; RULEID:; SRVR:YTXPR0101MB0733; x-forefront-prvs: 06833C6A67 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39380400002)(376002)(346002)(396003)(39860400002)(189003)(199004)(51444003)(5250100002)(446003)(53936002)(11346002)(74482002)(7696005)(2501003)(8936002)(6506007)(3280700002)(2900100001)(81156014)(81166006)(6246003)(26005)(102836004)(33656002)(97736004)(14454004)(3660700001)(478600001)(486006)(110136005)(9686003)(229853002)(8676002)(786003)(6306002)(450100002)(99286004)(316002)(59450400001)(186003)(76176011)(2201001)(966005)(86362001)(305945005)(68736007)(476003)(5660300001)(106356001)(105586002)(2906002)(25786009)(55016002)(6436002)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR0101MB0733; H:YTXPR0101MB0959.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: qoEqslnk8UH8N+Ai5nwVC81Uf39GPbBFeMj5N+WTUitwlwwDuablh098E92EGMkll3bxVnOuaS1m0xQCjE1mPjn3+XorvM/7Ndon16VmNEqe1wm8tFaKTS2r8wzErP9VEIx9bPqlcfxGhWMc+37iKuO8NQ1bUAn1k2HskBJ8+C9m8lVBRQImcR7KcbGy5TTS spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 9675ceee-182b-4d77-4436-08d5c243db5f X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 9675ceee-182b-4d77-4436-08d5c243db5f X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2018 13:31:44.1063 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR0101MB0733 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 13:31:46 -0000 Andriy Gapon wrote: >On 25/05/2018 04:15, Mateusz Guzik wrote: >> Author: mjg >> Date: Thu May 25 23:58:57 2018 >> New Revision: 334197 >> URL: https://svnweb.freebsd.org/changeset/base/334197 >> >> Log: >> Implement Mostly Exclusive locks. >> >> High lock contention is one of the biggest scalability bottlenecks on >> multicore systems. Although the real fix consists of making lock >> consumers better suited for multicore operation, locking primitive >> performance is still a crucial factor in real-world systems. >> >> It turns out that a lot of the locking is overzealous - the lock is >> held longer than it needs to be and sometimes even completely >> unnecessarily in the first place. Even when lock is needed in >> principle, all relevant consumers may be only *reading* the state >> protected by the lock or modifying disjoint parts of protected data. >> >> As such, a lot of the locking can be elided. >> >> The idea boils down to trying to take the lock for a limited amount of >> time and in case of failure pretending we got it anyway. The approach >> along with practical analysis of performance win/new crash ratio is >> described in "Towards reliability-oblivious low latency locking" by >> Leland Oller. > >Great change! Looking forward to new crashes! >:-) I think that this should be enabled via a sysctl. Maybe something like: kern.enable_windows_reliability rick > Modified: > head/sys/kern/kern_mutex.c > > Modified: head/sys/kern/kern_mutex.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/kern/kern_mutex.c (revision 334196) > +++ sys/kern/kern_mutex.c (working copy) > @@ -557,6 +557,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t > lda.spin_cnt++; > #endif > #ifdef ADAPTIVE_MUTEXES > + if (lda.spin_cnt > 16384) > + break; > + > /* > * If the owner is running on another CPU, spin until the > * owner stops running or the state of the lock changes. > @@ -1020,16 +1023,22 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr= _ > turnstile_chain_lock(&m->lock_object); > _mtx_release_lock_quick(m); > ts =3D turnstile_lookup(&m->lock_object); > - MPASS(ts !=3D NULL); > - if (LOCK_LOG_TEST(&m->lock_object, opts)) > - CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); > - turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); > - > /* > - * This turnstile is now no longer associated with the mutex. We c= an > - * unlock the chain lock so a new turnstile may take it's place. > + * We failed to previously grab the lock. Unlock fast path brings > + * us here thinking there are blocked threads, but there may be > + * none > */ > - turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); > + if (ts !=3D NULL) { > + if (LOCK_LOG_TEST(&m->lock_object, opts)) > + CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m= ); > + turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); > + > + /* > + * This turnstile is now no longer associated with the mute= x. We can > + * unlock the chain lock so a new turnstile may take it's p= lace. > + */ > + turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); > + } > turnstile_chain_unlock(&m->lock_object); > } > P.S. I had to re-read the commit message twice, the actual change three times an= d to check the calendar five times. -- Andriy Gapon From owner-svn-src-head@freebsd.org Fri May 25 13:40:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 852EEEB15D5; Fri, 25 May 2018 13:40:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3303D81AE7; Fri, 25 May 2018 13:40:06 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10C152177A; Fri, 25 May 2018 13:40:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PDe51u007637; Fri, 25 May 2018 13:40:05 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PDe5ml007636; Fri, 25 May 2018 13:40:05 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805251340.w4PDe5ml007636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 25 May 2018 13:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334207 - head/include X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/include X-SVN-Commit-Revision: 334207 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 13:40:06 -0000 Author: eadler Date: Fri May 25 13:40:05 2018 New Revision: 334207 URL: https://svnweb.freebsd.org/changeset/base/334207 Log: Add time2posix and posix2time to time.h These are documented in `time2posix.3` but the symbols are not actually visible. Since these are not POSIX hide them behind _BSD_VISIBLE. Reviewed by: wollman Differential Revision: https://reviews.freebsd.org/D15530 Modified: head/include/time.h Modified: head/include/time.h ============================================================================== --- head/include/time.h Fri May 25 11:49:21 2018 (r334206) +++ head/include/time.h Fri May 25 13:40:05 2018 (r334207) @@ -199,6 +199,8 @@ void tzsetwall(void); time_t timelocal(struct tm * const); time_t timegm(struct tm * const); int timer_oshandle_np(timer_t timerid); +time_t time2posix(time_t t); +time_t posix2time(time_t t); #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) From owner-svn-src-head@freebsd.org Fri May 25 13:40:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6AC5EB15EA; Fri, 25 May 2018 13:40:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AF8381AE9; Fri, 25 May 2018 13:40:08 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D6D62177B; Fri, 25 May 2018 13:40:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PDe8aR007681; Fri, 25 May 2018 13:40:08 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PDe8tF007680; Fri, 25 May 2018 13:40:08 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805251340.w4PDe8tF007680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 25 May 2018 13:40:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334208 - head/usr.bin/rctl X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/rctl X-SVN-Commit-Revision: 334208 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 13:40:08 -0000 Author: eadler Date: Fri May 25 13:40:07 2018 New Revision: 334208 URL: https://svnweb.freebsd.org/changeset/base/334208 Log: rctl: correct use of "vmem" instead of "vmemoryuse" Submitted by: Jamie Landeg-Jones PR: 228482 MFC after: 1 month Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Fri May 25 13:40:05 2018 (r334207) +++ head/usr.bin/rctl/rctl.8 Fri May 25 13:40:07 2018 (r334208) @@ -137,13 +137,13 @@ Resources which limit bytes may use prefixes from defines what entity the .Em amount gets accounted for. -For example, rule "loginclass:users:vmem:deny=100M/process" means +For example, rule "loginclass:users:vmemoryuse:deny=100M/process" means that each process of any user belonging to login class "users" may allocate up to 100MB of virtual memory. -Rule "loginclass:users:vmem:deny=100M/user" would mean that for each +Rule "loginclass:users:vmemoryuse:deny=100M/user" would mean that for each user belonging to the login class "users", the sum of virtual memory allocated by all the processes of that user will not exceed 100MB. -Rule "loginclass:users:vmem:deny=100M/loginclass" would mean that the sum of +Rule "loginclass:users:vmemoryuse:deny=100M/loginclass" would mean that the sum of virtual memory allocated by all processes of all users belonging to that login class will not exceed 100MB. .El From owner-svn-src-head@freebsd.org Fri May 25 13:59:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A81CEB1F3A; Fri, 25 May 2018 13:59:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D42DF827D7; Fri, 25 May 2018 13:59:48 +0000 (UTC) (envelope-from bz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B15EF21AB5; Fri, 25 May 2018 13:59:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PDxm8N017836; Fri, 25 May 2018 13:59:48 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PDxmTf017835; Fri, 25 May 2018 13:59:48 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201805251359.w4PDxmTf017835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 25 May 2018 13:59:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334209 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 334209 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 13:59:49 -0000 Author: bz Date: Fri May 25 13:59:48 2018 New Revision: 334209 URL: https://svnweb.freebsd.org/changeset/base/334209 Log: Extend show proc with reaper, sigparent, and vmspace information I have regularly needed the last couple of months. Sponsored by: iXsystems, Inc. Modified: head/sys/ddb/db_ps.c Modified: head/sys/ddb/db_ps.c ============================================================================== --- head/sys/ddb/db_ps.c Fri May 25 13:40:07 2018 (r334208) +++ head/sys/ddb/db_ps.c Fri May 25 13:59:48 2018 (r334209) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -452,6 +453,16 @@ DB_SHOW_COMMAND(proc, db_show_proc) } db_printf("\n"); } + db_printf(" repear: %p reapsubtree: %d\n", + p->p_reaper, p->p_reapsubtree); + db_printf(" sigparent: %d\n", p->p_sigparent); + db_printf(" vmspace: %p\n", p->p_vmspace); + db_printf(" (map %p)\n", + (p->p_vmspace != NULL) ? &p->p_vmspace->vm_map : 0); + db_printf(" (map.pmap %p)\n", + (p->p_vmspace != NULL) ? &p->p_vmspace->vm_map.pmap : 0); + db_printf(" (pmap %p)\n", + (p->p_vmspace != NULL) ? &p->p_vmspace->vm_pmap : 0); db_printf(" threads: %d\n", p->p_numthreads); FOREACH_THREAD_IN_PROC(p, td) { dumpthread(p, td, 1); From owner-svn-src-head@freebsd.org Fri May 25 15:11:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3996EEA4A4; Fri, 25 May 2018 15:11:35 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F36584D01; Fri, 25 May 2018 15:11:35 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 921C25A9F12; Fri, 25 May 2018 15:11:34 +0000 (UTC) Date: Fri, 25 May 2018 15:11:34 +0000 From: Brooks Davis To: Marcelo Araujo Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve Message-ID: <20180525151134.GB99063@spindle.one-eyed-alien.net> References: <201805250207.w4P275Pf060725@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PmA2V3Z32TCmWXqI" Content-Disposition: inline In-Reply-To: <201805250207.w4P275Pf060725@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 15:11:35 -0000 --PmA2V3Z32TCmWXqI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > Author: araujo > Date: Fri May 25 02:07:05 2018 > New Revision: 334199 > URL: https://svnweb.freebsd.org/changeset/base/334199 >=20 > Log: > Fix a memory leak on topology_parse(). > =20 > strdup(3) allocates memory for a copy of the string, does the copy and > returns a pointer to it. If there is no sufficient memory NULL is retur= ned > and the global errno is set to ENOMEM. > We do a sanity check to see if it was possible to allocate enough memor= y. > =20 > Also as we allocate memory, we need to free this memory used. Or it will > going out of scope leaks the storage it points to. > =20 > Reviewed by: rgrimes > MFC after: 3 weeks. > X-MFC: r332298 > Sponsored by: iXsystems Inc. > Differential Revision: https://reviews.freebsd.org/D15550 >=20 > Modified: > head/usr.sbin/bhyve/bhyverun.c >=20 > Modified: head/usr.sbin/bhyve/bhyverun.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 (r334198) > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 (r334199) > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > c =3D 1, n =3D 1, s =3D 1, t =3D 1; > ns =3D false, scts =3D false; > str =3D strdup(opt); > + assert(str !=3D NULL); Using assert seems like an odd choice when you've already added a failure path and the strsep will crash immediately if assert is elided. -- Brooks --PmA2V3Z32TCmWXqI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbCCelAAoJEKzQXbSebgfAKl0H/1Gr1OEC+uWvVxSm5ekFdFel grpqUm3jVJHneNGTm2Tj5oB66lMSBR7pfPB4g/xh7h/fPbQ+6UfKFJEQMeLBr1ff xVOcpzbmuuo30T7aqqv+on/SmYUgx0jcCvjf8eepR9ai8iSwYIvC9bytogOg8mU9 Bje+DOTJ3cjA0nlWfgnbgivF8edr6O0lksgi1ZOlNNYS/gV/aIY6M1DqUyI5O3cT g4EOEU524Qac5RcXX7u7bwvIoElEndYrPWrcK3croTSbplUawiZfMVvSlVZhFoX/ ZOQLCKOucLP0SZoB1K/5C78hF9EUIdPLs9aSxHqnGis7+1Q0atwYD7yylcPJzLY= =EQO3 -----END PGP SIGNATURE----- --PmA2V3Z32TCmWXqI-- From owner-svn-src-head@freebsd.org Fri May 25 15:16:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1089EEA6B7; Fri, 25 May 2018 15:16:14 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED31485065; Fri, 25 May 2018 15:16:13 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id x2-v6so8186038wmh.5; Fri, 25 May 2018 08:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=EgXIZrfXBaCFqcL2+Xez6xkyyfhMr6yjTJPSVaFe8/w=; b=G4HTyHPUQYUC+KfNd9VJM/Vmi0mGHWLHt5zEv6D6eHlVNOP+6z2ROQhnYkA4SSoijA HxpyPe/GRIKCikd9G0c3g5ImctBebHg8GyC4IGKK8IcszUw+0BM7IMj6uGwDuidcW+Kz He6v8sVF6akBotQ+S5/CMqji5Lm+ctoYHl/5CLNcHcuWiqBwUezvqaYuj5EBkUNM8csD MwdmeqE1l8fGYm5rerrw0jc3m8yOy5Zox6hwz/jtXpwi4rjKDRxkHtDuVg7jm0Y50giU Xf9CS4rNy3fbVXx9j7HNHv3+2lwU3T5m+CcKjL/Ub+0at/Ks8hNkO3tv6yCXBqUXssas XiFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=EgXIZrfXBaCFqcL2+Xez6xkyyfhMr6yjTJPSVaFe8/w=; b=CAo/ByrwnJ1jOjrU2EPcDVEbiEGs950wDACEYWcye9MIqugzIRovx8KIUSr1aJH8bL ua5Nh33SRAG64seZuYIn5/jve3gSmjcG9KKh+dc8HmDTgGQ9MoOM2tKZ4muYjYlcPa4m pWUZT1mI29qzQGLYXQUhDaaXb03LVqVSst5PsVROzw0cTi+XFVlOe6bY5y10VNnJOs1N 3+jcBp6drlHOAYVUijzRWlk51eiBGqzCPUEXQLaJvJsOWbTbQZKQjFdWjEIxGI+IGqJ3 4BtIlHvPI/55SYArhwFoUmKQW5a7lMShorVLS3QHKG/nRTpis9cXr8rIwEtKVSFTt034 YLLg== X-Gm-Message-State: ALKqPwcRWrWKzcsxj0vfpEO+cbfPpIphlTLq7KGG6O04GWG6yGUx3Yxk okHBWoMSveofAm82Kfc5Q2Ff39xGUZhx5PvN45g= X-Google-Smtp-Source: AB8JxZoJvr9pFbbVD091RnxS0rPoOCpiGzNF1n70MA5zjtiLhF0lH6I0qzhfe0PV1L3n7ty/QcfU5x5NnoIAT2zpOU8= X-Received: by 2002:a2e:5019:: with SMTP id e25-v6mr2031027ljb.122.1527261372633; Fri, 25 May 2018 08:16:12 -0700 (PDT) MIME-Version: 1.0 References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> In-Reply-To: <20180525151134.GB99063@spindle.one-eyed-alien.net> Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Fri, 25 May 2018 23:16:00 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Brooks Davis Cc: Marcelo Araujo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 15:16:14 -0000 On Fri, May 25, 2018, 11:11 PM Brooks Davis wrote: > On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > > Author: araujo > > Date: Fri May 25 02:07:05 2018 > > New Revision: 334199 > > URL: https://svnweb.freebsd.org/changeset/base/334199 > > > > Log: > > Fix a memory leak on topology_parse(). > > > > strdup(3) allocates memory for a copy of the string, does the copy and > > returns a pointer to it. If there is no sufficient memory NULL is > returned > > and the global errno is set to ENOMEM. > > We do a sanity check to see if it was possible to allocate enough > memory. > > > > Also as we allocate memory, we need to free this memory used. Or it > will > > going out of scope leaks the storage it points to. > > > > Reviewed by: rgrimes > > MFC after: 3 weeks. > > X-MFC: r332298 > > Sponsored by: iXsystems Inc. > > Differential Revision: https://reviews.freebsd.org/D15550 > > > > Modified: > > head/usr.sbin/bhyve/bhyverun.c > > > > Modified: head/usr.sbin/bhyve/bhyverun.c > > > ============================================================================== > > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 > (r334198) > > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 > (r334199) > > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > c = 1, n = 1, s = 1, t = 1; > > ns = false, scts = false; > > str = strdup(opt); > > + assert(str != NULL); > > Using assert seems like an odd choice when you've already added a > failure path and the strsep will crash immediately if assert is elided. > Why assert is an odd choice? Have a better suggestion? > > -- Brooks > From owner-svn-src-head@freebsd.org Fri May 25 15:24:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64102EEA94A; Fri, 25 May 2018 15:24:12 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C48FA85856; Fri, 25 May 2018 15:24:11 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id f8-v6so15645982wmc.4; Fri, 25 May 2018 08:24:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=5XTbcLzwkU7BSJ5rL465AxsGYq238dtS060OLKxT2oc=; b=cPdLFeYeK4tHJxPw70iLMiXci8v+fUa5HqPrw6dAsnLSqv5HEEaD+tPqR73N6G8SfL uTp0f6RM5TZX4xIdyDOIwZAsn/WoWNNN1AIn8ahQE82bemHlISqNXLHIAz7Zz4gdoUBH +dvBV7uEZe27UxBJxvmzBgFCj/YtFVyXA/JzIHspeq9yTrPJxBWx8v+xjt5qwW+kVCya aYwFtlkD/s8IXGMWF1UdaK4/IPmgc0tZrm0IyuTAYbMpNqzQmGKJPSVxQ3t2sHNbkgJW S6XuJHp234h28Zu0Z43xKOyTFneFOov/sYq449QH2KSCSfsRxVfyYA6NsKMfEbBSN78r jRLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=5XTbcLzwkU7BSJ5rL465AxsGYq238dtS060OLKxT2oc=; b=hbJC5UwIvdkWMvA/xfrE2g6ZWxVm6xPU5r3KtmVGqnDk435lI7V3RTZLNFMbQBw+64 ewUaAW2HY1x7w7rg/igBL712nY8S4mf9oIqwTDVTan+41L5eVNKiuSYnr/cnImhpKM3h gw2eVm98yp/LuJD518n5e2Bth5HwKF31AbcQKTorQk33GmKeaywoCzfjcW0am5xbC3fj Nh1TU/pHQsqSOjYhvAGOEQXPIzlymsne2aecTJu4tspaXx8bbiDO348bT3QcPDsvcp6g c3OecGusagSrxAGe/ey/tjKQQ9h08SfKSAaCodguPmX29BZ2V1+a8ivmzeaiR6/QyVuN BCgg== X-Gm-Message-State: ALKqPwdEaXo1m78m/GUwF86GcFBzOkc3XqgHEZaWGkWysLOLm0Md3wjs FQFW51AqkyhIJQuG6+xVDRBsaXqWylMX7LG0BIk= X-Google-Smtp-Source: ADUXVKKxwN8YDvIQ8abnfj5ZrLePZGa1ecWfH+QKKOvtVWG8gr703RtTkBPMLzvzb00KA96O94ae4eZjxEWPVJo6mwU= X-Received: by 2002:a2e:c41:: with SMTP id o1-v6mr2059962ljd.87.1527261850553; Fri, 25 May 2018 08:24:10 -0700 (PDT) MIME-Version: 1.0 References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> In-Reply-To: <20180525151134.GB99063@spindle.one-eyed-alien.net> Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Fri, 25 May 2018 23:23:59 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Brooks Davis Cc: Marcelo Araujo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 15:24:12 -0000 On Fri, May 25, 2018, 11:11 PM Brooks Davis wrote: > On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > > Author: araujo > > Date: Fri May 25 02:07:05 2018 > > New Revision: 334199 > > URL: https://svnweb.freebsd.org/changeset/base/334199 > > > > Log: > > Fix a memory leak on topology_parse(). > > > > strdup(3) allocates memory for a copy of the string, does the copy and > > returns a pointer to it. If there is no sufficient memory NULL is > returned > > and the global errno is set to ENOMEM. > > We do a sanity check to see if it was possible to allocate enough > memory. > > > > Also as we allocate memory, we need to free this memory used. Or it > will > > going out of scope leaks the storage it points to. > > > > Reviewed by: rgrimes > > MFC after: 3 weeks. > > X-MFC: r332298 > > Sponsored by: iXsystems Inc. > > Differential Revision: https://reviews.freebsd.org/D15550 > > > > Modified: > > head/usr.sbin/bhyve/bhyverun.c > > > > Modified: head/usr.sbin/bhyve/bhyverun.c > > > ============================================================================== > > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 > (r334198) > > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 > (r334199) > > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > c = 1, n = 1, s = 1, t = 1; > > ns = false, scts = false; > > str = strdup(opt); > > + assert(str != NULL); > > Using assert seems like an odd choice when you've already added a > failure path and the strsep will crash immediately if assert is elided. > Just to make a better point, I had the same discussion about assert(3) in another review, we don't do NDEBUG even for RELEASE. > > -- Brooks > From owner-svn-src-head@freebsd.org Fri May 25 16:24:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93821EED0F7; Fri, 25 May 2018 16:24:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D74F68148; Fri, 25 May 2018 16:24:21 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B07523393; Fri, 25 May 2018 16:24:21 +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 w4PGOKbl093718; Fri, 25 May 2018 16:24:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PGOKgq093717; Fri, 25 May 2018 16:24:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805251624.w4PGOKgq093717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 25 May 2018 16:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334210 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 334210 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 16:24:21 -0000 Author: kib Date: Fri May 25 16:24:20 2018 New Revision: 334210 URL: https://svnweb.freebsd.org/changeset/base/334210 Log: Cleanup. Remove unused instruction and label. Tested by: bde Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/i386/swtch.s Modified: head/sys/i386/i386/swtch.s ============================================================================== --- head/sys/i386/i386/swtch.s Fri May 25 13:59:48 2018 (r334209) +++ head/sys/i386/i386/swtch.s Fri May 25 16:24:20 2018 (r334210) @@ -186,10 +186,6 @@ ENTRY(cpu_switch) lock #endif btsl %esi, PM_ACTIVE(%ebx) /* set new */ - jmp sw1 - -sw0: - SETOP %esi,TD_LOCK(%edi) /* Switchout td_lock */ sw1: BLOCK_SPIN(%ecx) /* From owner-svn-src-head@freebsd.org Fri May 25 16:29:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFDC2EED244; Fri, 25 May 2018 16:29:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57B3068394; Fri, 25 May 2018 16:29:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DD3C233B3; Fri, 25 May 2018 16:29:23 +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 w4PGTMHi093977; Fri, 25 May 2018 16:29:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PGTMVs093975; Fri, 25 May 2018 16:29:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805251629.w4PGTMVs093975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 25 May 2018 16:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334211 - in head/sys/i386: i386 include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/i386: i386 include X-SVN-Commit-Revision: 334211 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 16:29:23 -0000 Author: kib Date: Fri May 25 16:29:22 2018 New Revision: 334211 URL: https://svnweb.freebsd.org/changeset/base/334211 Log: Optimize i386 pmap_extract_and_hold(). In particular, stop using pmap_pte() to read non-promoted pte while walking the page table. pmap_pte() needs to shoot down the kernel mapping globally which causes IPI broadcast. Since pmap_extract_and_hold() is used for slow copyin(9), it is very significant hit for the 4/4 kernels. Instead, create single purpose per-processor page frame and use it to locally map page table page inside the critical section, to avoid reuse of the frame by other thread if context switched. Measurement demostrated very significant improvements in any load that utilizes copyin/copyout. Found and benchmarked by: bde Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/i386/pmap.c head/sys/i386/include/pcpu.h Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri May 25 16:24:20 2018 (r334210) +++ head/sys/i386/i386/pmap.c Fri May 25 16:29:22 2018 (r334211) @@ -692,6 +692,10 @@ pmap_init_reserved_pages(void) pc->pc_copyout_saddr = kva_alloc(ptoa(2)); if (pc->pc_copyout_saddr == 0) panic("unable to allocate sleepable copyout KVA"); + pc->pc_pmap_eh_va = kva_alloc(ptoa(1)); + if (pc->pc_pmap_eh_va == 0) + panic("unable to allocate pmap_extract_and_hold KVA"); + pc->pc_pmap_eh_ptep = (char *)vtopte(pc->pc_pmap_eh_va); /* * Skip if the mappings have already been initialized, @@ -1598,8 +1602,8 @@ pmap_extract(pmap_t pmap, vm_offset_t va) vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { - pd_entry_t pde; - pt_entry_t pte, *ptep; + pd_entry_t pde, newpf; + pt_entry_t *eh_ptep, pte, *ptep; vm_page_t m; vm_paddr_t pa; @@ -1619,9 +1623,17 @@ retry: vm_page_hold(m); } } else { - ptep = pmap_pte(pmap, va); + newpf = pde & PG_FRAME; + critical_enter(); + eh_ptep = (pt_entry_t *)PCPU_GET(pmap_eh_ptep); + if ((*eh_ptep & PG_FRAME) != newpf) { + *eh_ptep = newpf | PG_RW | PG_V | PG_A | PG_M; + invlcaddr((void *)PCPU_GET(pmap_eh_va)); + } + ptep = (pt_entry_t *)PCPU_GET(pmap_eh_va) + + (i386_btop(va) & (NPTEPG - 1)); pte = *ptep; - pmap_pte_release(ptep); + critical_exit(); if (pte != 0 && ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) { if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Fri May 25 16:24:20 2018 (r334210) +++ head/sys/i386/include/pcpu.h Fri May 25 16:29:22 2018 (r334211) @@ -76,9 +76,11 @@ struct mtx pc_copyout_mlock; \ struct sx pc_copyout_slock; \ char *pc_copyout_buf; \ + vm_offset_t pc_pmap_eh_va; \ + caddr_t pc_pmap_eh_ptep; \ uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ uint32_t pc_ibpb_set; \ - char __pad[546] + char __pad[538] #ifdef _KERNEL From owner-svn-src-head@freebsd.org Fri May 25 15:57:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 755C5EEB4F6; Fri, 25 May 2018 15:57:39 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (unknown [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0924387019; Fri, 25 May 2018 15:57:38 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w4PFvLNW027521 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 May 2018 17:57:21 +0200 (CEST) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: src-committers@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w4PFvHHe035432 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 25 May 2018 22:57:17 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r333388 - in head: . share/man/man4 sys/confsys/dev/nxge sys/modules sys/modules/nxge tools/kerneldoc/subsys tools/toolstools/tools/nxge usr.sbin/bsdconfig/share To: Brooks Davis References: <20180523193027.825583BC@spqr.komquats.com> <5B05C6AC.6010202@grosbein.net> <20180523202228.GC58848@spindle.one-eyed-alien.net> Cc: Cy Schubert , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Eugene Grosbein Message-ID: <5B083259.1000009@grosbein.net> Date: Fri, 25 May 2018 22:57:13 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20180523202228.GC58848@spindle.one-eyed-alien.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -0.0 SPF_PASS SPF: sender matches SPF record * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Mailman-Approved-At: Fri, 25 May 2018 16:32:55 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 15:57:39 -0000 24.05.2018 3:22, Brooks Davis wrote: >>> Except for old computers and old software that segfaults on 64-bit, how many people still use i386? >>> Full disclosure: I'd like to see i386 deorbited before I retire. >> Plese don't. I routinely use FreeBSD11/i386 for cheap VPS hosts having less than 2G memory >> because amd64 has noticeable overhead. I even have ZFS-only i386 VPS, here is live example with 1G only: >> >> Mem: 10M Active, 69M Inact, 230M Wired, 685M Free >> ARC: 75M Total, 1953K MFU, 31M MRU, 172K Anon, 592K Header, 42M Other >> 3500K Compressed, 29M Uncompressed, 8.61:1 Ratio >> Swap: 1024M Total, 1024M Free >> >> The VPS has only 20G of disk space and ZFS compression gives >> compressratio 2.22x for ports, 2.51x for src, 2.29x for obj >> and 1.95x for installed i386 system plus other software and data. > > I think we're quite a ways from being ready to axe i386. > > For VPS applications, we should probably get x32 support in place which > should give us the best of both worlds. > > That said, we either need to rev the i386 ABI to use a 64-bit time_t or > kill it in the not to distant future or we risk embedded systems failing > in place in 2038. If we assume a 15 year life for most equipment to > fail electrically or mechanically that says FreeBSD 13 shouldn't support > the current i386 ABI. Why everyone's talking of hardware only? FreeBSD/i386 as virtual machine guest with memory-intensive kernel subsystems like ZFS and/or networking tasks using plenty of mbufs benefits significantly comparing with amd64 version. It runs just fine, why even consider killing it? From owner-svn-src-head@freebsd.org Fri May 25 16:36:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2D33EED72D; Fri, 25 May 2018 16:36:12 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pl0-x22b.google.com (mail-pl0-x22b.google.com [IPv6:2607:f8b0:400e:c01::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62AB068B51; Fri, 25 May 2018 16:36:12 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pl0-x22b.google.com with SMTP id n10-v6so3459020plp.0; Fri, 25 May 2018 09:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=P4heaVNTUr60WTT7UJwmd8A4MEVIZhJLKiVQ1TnQk6c=; b=KXYzqHNMqa986T+rfoAYKzjCQ6FY5dpvZkt62I3+BO7lZUL82oM1oV/0NofJrppQZU V+lJ1ttjqCcBtnSDJMT/Jok1LaX2fcAUApkJGh9ixh/U21QC/uPYaNm2Icf826IvLtWQ ufjGaXP8suvSP7lro0aggErpZcA8CiST1JqrPpbKkH7tn7MdK8uz2xk8BnYgSPiEH9ts z82got8o+wtZJ2FmBSB9GWq1edVkSJjRxO8ekDvImG5yp7uwAMClngRwensTfcBuesc2 uLNPVtevyyzVwWLnAQe3L1ugIY0CXvZAbvCksqtpaTgWMdHhG36OhPb88Y9EProEPyIK OFew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=P4heaVNTUr60WTT7UJwmd8A4MEVIZhJLKiVQ1TnQk6c=; b=W5b2NViwcTnRs2u70Z5gE2FkNFVKdYcvpC/FfDePRLVGU2c/fa6YL5Ch8+N228Xcqh HWba8wWds/I2DjknDq2748SoP+NbSC30LWyAsHiy+L0xORMZ9H91/MtFGvnE6oXRnqku R1NNu+iAJRvgpMKnwj+JffgNtilgbL5opoWFJ0AZZGSgcmMiXEKaq7I9nigmfmD6OZC+ QEFyk5WHBRDJV+FkNc0q8wqfeZZ9OMdPhv6pYWlKfWNcfrqFCesd7ToLyNSFaKD0U01X XmNXy427+TflPDM9kp/kPwOdjOzKgMsx96KCxU0SaPhx2biD2DSqEgxxieg4pQJx1IAb wN5w== X-Gm-Message-State: ALKqPweDKBCuL0gLSae0dkblLefgHy6n3H5PX2oqKIOHqgz/eRVM/55T d6i3pb5P1ITgGRwW2xcci0Xvbg== X-Google-Smtp-Source: AB8JxZoTcRjtJa3/yaGxdm42jztKXh2iMyGJuseFOPsndIkmyswCVXXYRJdZEwcV1kQmwVel8atA9g== X-Received: by 2002:a17:902:301:: with SMTP id 1-v6mr3381944pld.328.1527266171122; Fri, 25 May 2018 09:36:11 -0700 (PDT) Received: from raichu (toroon0560w-lp140-02-70-49-169-156.dsl.bell.ca. [70.49.169.156]) by smtp.gmail.com with ESMTPSA id a4-v6sm53869405pfj.19.2018.05.25.09.36.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 May 2018 09:36:10 -0700 (PDT) Sender: Mark Johnston Date: Fri, 25 May 2018 12:36:04 -0400 From: Mark Johnston To: Matt Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334118 - in head/sys: compat/linprocfs compat/linux compat/linuxkpi/common/include/linux dev/mlx5/mlx5_ib dev/wtap net net/altq netinet netinet/netdump netinet6 netpfil/pf nfs ofed/dri... Message-ID: <20180525163604.GA40082@raichu> References: <201805232102.w4NL2FaJ073854@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201805232102.w4NL2FaJ073854@repo.freebsd.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 16:36:13 -0000 On Wed, May 23, 2018 at 09:02:15PM +0000, Matt Macy wrote: > Author: mmacy > Date: Wed May 23 21:02:14 2018 > New Revision: 334118 > URL: https://svnweb.freebsd.org/changeset/base/334118 > > Log: > UDP: further performance improvements on tx > > Cumulative throughput while running 64 > netperf -H $DUT -t UDP_STREAM -- -m 1 > on a 2x8x2 SKL went from 1.1Mpps to 2.5Mpps > > Single stream throughput increases from 910kpps to 1.18Mpps > > Baseline: > https://people.freebsd.org/~mmacy/2018.05.11/udpsender2.svg > > - Protect read access to global ifnet list with epoch > https://people.freebsd.org/~mmacy/2018.05.11/udpsender3.svg > > - Protect short lived ifaddr references with epoch > https://people.freebsd.org/~mmacy/2018.05.11/udpsender4.svg > > - Convert if_afdata read lock path to epoch > https://people.freebsd.org/~mmacy/2018.05.11/udpsender5.svg After this change I can panic an INVARIANTS kernel like so. There is a freed ifaddr lingering on the lo0 ifnet's address list. # ifconfig lo0 127.0.0.2 # ifconfig lo0 -alias 127.0.0.2 # netstat -rn Routing tables Fatal trap 9: general protection fault while in kernel mode cpuid = 1; apic id = 01 instruction pointer = 0x20:0xffffffff80605219 stack pointer = 0x28:0xfffffe00004692e0 frame pointer = 0x28:0xfffffe00004693d0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 735 (netstat) trap number = 9 panic: general protection fault cpuid = 1 time = 1527266002 Uptime: 1m42s Dumping 216 out of 4079 MB:..8%..15%..23%..37%..45%..52%..67%..74%..82%..97% Dump complete Consoles: userboot From owner-svn-src-head@freebsd.org Fri May 25 16:40:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC720EED94F; Fri, 25 May 2018 16:40:11 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BFFF68DB8; Fri, 25 May 2018 16:40:11 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f53.google.com (mail-it0-f53.google.com [209.85.214.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 52ADC1B3EC; Fri, 25 May 2018 16:40:11 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f53.google.com with SMTP id y189-v6so7560503itb.2; Fri, 25 May 2018 09:40:11 -0700 (PDT) X-Gm-Message-State: ALKqPwdpvssf6t27ydHDqEOn9+CqAUDBKiOHprONzMTk6DhsHiwBvFLf sXkyl/qFY5cttleWrleUnyX5t2k9B6pOGmTxD/0= X-Google-Smtp-Source: AB8JxZrjnygbN56XKahbzPqFdZUYglmMtl02+YkS2OxMt/ZeSk3eCe5ly9Wth0ijaCgH+yJJcbrtDOLxNzgmsfxC40M= X-Received: by 2002:a24:5b54:: with SMTP id g81-v6mr2715637itb.7.1527266410721; Fri, 25 May 2018 09:40:10 -0700 (PDT) MIME-Version: 1.0 References: <201805232102.w4NL2FaJ073854@repo.freebsd.org> <20180525163604.GA40082@raichu> In-Reply-To: <20180525163604.GA40082@raichu> From: Matthew Macy Date: Fri, 25 May 2018 09:40:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334118 - in head/sys: compat/linprocfs compat/linux compat/linuxkpi/common/include/linux dev/mlx5/mlx5_ib dev/wtap net net/altq netinet netinet/netdump netinet6 netpfil/pf nfs ofed/dri... To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 16:40:12 -0000 Odd. I tested the same thing as did pho with regular interfaces. Will fix asap. On Fri, May 25, 2018 at 09:36 Mark Johnston wrote: > On Wed, May 23, 2018 at 09:02:15PM +0000, Matt Macy wrote: > > Author: mmacy > > Date: Wed May 23 21:02:14 2018 > > New Revision: 334118 > > URL: https://svnweb.freebsd.org/changeset/base/334118 > > > > Log: > > UDP: further performance improvements on tx > > > > Cumulative throughput while running 64 > > netperf -H $DUT -t UDP_STREAM -- -m 1 > > on a 2x8x2 SKL went from 1.1Mpps to 2.5Mpps > > > > Single stream throughput increases from 910kpps to 1.18Mpps > > > > Baseline: > > https://people.freebsd.org/~mmacy/2018.05.11/udpsender2.svg > > > > - Protect read access to global ifnet list with epoch > > https://people.freebsd.org/~mmacy/2018.05.11/udpsender3.svg > > > > - Protect short lived ifaddr references with epoch > > https://people.freebsd.org/~mmacy/2018.05.11/udpsender4.svg > > > > - Convert if_afdata read lock path to epoch > > https://people.freebsd.org/~mmacy/2018.05.11/udpsender5.svg > > After this change I can panic an INVARIANTS kernel like so. There is a > freed ifaddr lingering on the lo0 ifnet's address list. > > # ifconfig lo0 127.0.0.2 > # ifconfig lo0 -alias 127.0.0.2 > # netstat -rn > Routing tables > > > Fatal trap 9: general protection fault while in kernel mode > cpuid = 1; apic id = 01 > instruction pointer = 0x20:0xffffffff80605219 > stack pointer = 0x28:0xfffffe00004692e0 > frame pointer = 0x28:0xfffffe00004693d0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 735 (netstat) > trap number = 9 > panic: general protection fault > cpuid = 1 > time = 1527266002 > Uptime: 1m42s > Dumping 216 out of 4079 > MB:..8%..15%..23%..37%..45%..52%..67%..74%..82%..97% > Dump complete > Consoles: userboot > From owner-svn-src-head@freebsd.org Fri May 25 17:11:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BAEAEEE2A0 for ; Fri, 25 May 2018 17:11:31 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x244.google.com (mail-yw0-x244.google.com [IPv6:2607:f8b0:4002:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2EFB69DCB for ; Fri, 25 May 2018 17:11:30 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x244.google.com with SMTP id p144-v6so1940390ywg.7 for ; Fri, 25 May 2018 10:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PUVDImQdwzxn5XtVjD5zYisjHMfcjDNl9V14fxCelaI=; b=DXYFLa2xotZ+6e53hPFlLtANz0j/xH7h9Y5MT0Xzcb1vOoaxES4R7YKOQs8rJQgKTd Sb+S1ZqYW4BC/TtWvqjvIkhqYgZkXiLC7FNN2EhX2aerFMDGH5iNUPNgQwb9enYpxZex WSsVozfwFNVidAYVXrW8BbPXyEODJT3bok3yU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PUVDImQdwzxn5XtVjD5zYisjHMfcjDNl9V14fxCelaI=; b=DkWsT1YGCwmgAByQPj3rfXXiOm2Qe1Gzc3kViUk6OXDhkFsHpRXUEMhvrCJjMEmmiq aiNUxlLK/kV9kZ9BeZmgL+wDiMpXYV5JWhKo9nkT+uasH7QSsIypAJlMdp9OoLoPInr6 JrAjrZVLOPFTb2+OSW3AUnAzsdvzgA1W6sV29OvwTNQ4gdz/yafzaV7E/DHcP5RihYWJ oNbW3lGb1NQRo0TXT2WGkefiQNvqhNrPi4LBQbhnhFVWrBzPNbQWBYW1pULUz3D9z+Q0 0e3ctp+njVpP7HM+CRQB/qI2vtUXkfqoAjLgkGpB05hCc5yLMigpHvANTZwS+nKt/ANA qUHg== X-Gm-Message-State: ALKqPweYyC049IAalM/6ZeNoXWFGhO1pHjInAx8pomvE0guaG5+rlFbT hslJnk+S6DJReNBH9JL8dk0wlPJ/O6Y/CUZzSsTGPA== X-Google-Smtp-Source: AB8JxZornnOqmUh6KA2bVySB7YYmVc0Xqx8r0BSWls+RiCBCvYMd/CZrxhTcdQgaRHbow0Hcc6+GW9q9voGgyFxYBes= X-Received: by 2002:a81:5fc4:: with SMTP id t187-v6mr1859106ywb.19.1527268289941; Fri, 25 May 2018 10:11:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Fri, 25 May 2018 10:10:59 -0700 (PDT) In-Reply-To: References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> From: Eitan Adler Date: Fri, 25 May 2018 10:10:59 -0700 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: araujo@freebsd.org Cc: Brooks Davis , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 17:11:31 -0000 On 25 May 2018 at 08:23, Marcelo Araujo wrote: > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis wrote: >> >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: >> > Author: araujo >> > Date: Fri May 25 02:07:05 2018 >> > New Revision: 334199 >> > URL: https://svnweb.freebsd.org/changeset/base/334199 >> > >> > Log: >> > Fix a memory leak on topology_parse(). >> > >> > strdup(3) allocates memory for a copy of the string, does the copy and >> > returns a pointer to it. If there is no sufficient memory NULL is >> > returned >> > and the global errno is set to ENOMEM. >> > We do a sanity check to see if it was possible to allocate enough >> > memory. >> > >> > Also as we allocate memory, we need to free this memory used. Or it >> > will >> > going out of scope leaks the storage it points to. >> > >> > Reviewed by: rgrimes >> > MFC after: 3 weeks. >> > X-MFC: r332298 >> > Sponsored by: iXsystems Inc. >> > Differential Revision: https://reviews.freebsd.org/D15550 >> > >> > Modified: >> > head/usr.sbin/bhyve/bhyverun.c >> > >> > Modified: head/usr.sbin/bhyve/bhyverun.c >> > >> > ============================================================================== >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 >> > (r334198) >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 >> > (r334199) >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) >> > c = 1, n = 1, s = 1, t = 1; >> > ns = false, scts = false; >> > str = strdup(opt); >> > + assert(str != NULL); >> >> Using assert seems like an odd choice when you've already added a >> failure path and the strsep will crash immediately if assert is elided. > > > Just to make a better point, I had the same discussion about assert(3) in > another review, we don't do NDEBUG even for RELEASE. IMHO we only use assert for asserting things ought to never be false except in buggy code. Using assert for handling is poor practice. -- Eitan Adler From owner-svn-src-head@freebsd.org Fri May 25 17:21:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07F6AEEE74D; Fri, 25 May 2018 17:21:47 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 790B66A76C; Fri, 25 May 2018 17:21:46 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id m129-v6so16436488wmb.3; Fri, 25 May 2018 10:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=rPl05NE36n0bcoV8NDLXztzKtryVOBPus2I8gjInUIs=; b=ZmzHVfvUBtPeCjobXlShY8AwEvSVCtaCwyWQjfWPU9V3JpCI/RRskyUdBlUS4JP3Fa 2VUA/BDH8ZlsMg3glSAio8ty4mQsVWkD+PjlXzaEDneZ8Wd1AbIq88eCHCDqIhxFcUVz syXwUfgP3imVROmEfWz9rtXf8v2IfrztVcgkOHZosAsZ4ld183zT1aGLCsog41IlRjDx +YN11uGObn9LN0fVP1XAJjp7Wyo69wT13OfjpR3fo3v02sXBE8Qb79wyUf/Jr10CMvDd W28vEhU244uUruEUcMT/LmX9OO+OnSKdRFu1Ml8apriaPhCJVWNNuYH9+RZ9jeb3fY7u EJ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=rPl05NE36n0bcoV8NDLXztzKtryVOBPus2I8gjInUIs=; b=P5RKe2RxBE7c3LV7ttkJ9ByDpx85/tudnto9YsIQx0c5uiEGqJZPGHPzYc51ok+N6K QAA+xqsxDmC1O8V3zf6dLISHVsOlhnm9miqZg5QeQhmdDgbZWtyKxBsPU0GONcoegJoC VE1Oi7Hh6aiwKtXFWBmu1W03OD/m/Ar+xjt2LKsH7FxqJDJekoNdLQPcHfjupdZC6Mfq WKKzGmBsYYj1M6lVFz/sMEprCZlleUnmMaJCesNDH3B7MnxLDZrUrpz2rJUhv0kBt6i4 LhkG2GgeO2YZgrmqbYW3OJIkJ+CmaKEVwSOKfFsKfp8q+p9DwLfGZcjr9ouCD/xPQU1C l9jg== X-Gm-Message-State: ALKqPwdJ1Rbx13X6t8ApuQwekOHd9AVrAufumRf1+sxjxeC2Jm/x37A6 +mmOXz30oOsrRCYJs8jgZYic+Er1ZplvG6Xz1mQ= X-Google-Smtp-Source: AB8JxZrb0+gufUHUOMBk4P107Xw+fO4d7cY6Efkp8yOMrK626ILtGhfoXx7lFLH3EBkmmn3ERD8g+hIDIFdWmrQ9OYs= X-Received: by 2002:a2e:80c1:: with SMTP id r1-v6mr2322684ljg.85.1527268905441; Fri, 25 May 2018 10:21:45 -0700 (PDT) MIME-Version: 1.0 References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> In-Reply-To: Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Sat, 26 May 2018 01:21:33 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Eitan Adler Cc: Marcelo Araujo , Brooks Davis , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 17:21:47 -0000 On Sat, May 26, 2018, 1:11 AM Eitan Adler wrote: > On 25 May 2018 at 08:23, Marcelo Araujo wrote: > > > > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis wrote: > >> > >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > >> > Author: araujo > >> > Date: Fri May 25 02:07:05 2018 > >> > New Revision: 334199 > >> > URL: https://svnweb.freebsd.org/changeset/base/334199 > >> > > >> > Log: > >> > Fix a memory leak on topology_parse(). > >> > > >> > strdup(3) allocates memory for a copy of the string, does the copy > and > >> > returns a pointer to it. If there is no sufficient memory NULL is > >> > returned > >> > and the global errno is set to ENOMEM. > >> > We do a sanity check to see if it was possible to allocate enough > >> > memory. > >> > > >> > Also as we allocate memory, we need to free this memory used. Or it > >> > will > >> > going out of scope leaks the storage it points to. > >> > > >> > Reviewed by: rgrimes > >> > MFC after: 3 weeks. > >> > X-MFC: r332298 > >> > Sponsored by: iXsystems Inc. > >> > Differential Revision: https://reviews.freebsd.org/D15550 > >> > > >> > Modified: > >> > head/usr.sbin/bhyve/bhyverun.c > >> > > >> > Modified: head/usr.sbin/bhyve/bhyverun.c > >> > > >> > > ============================================================================== > >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 > >> > (r334198) > >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 > >> > (r334199) > >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > >> > c = 1, n = 1, s = 1, t = 1; > >> > ns = false, scts = false; > >> > str = strdup(opt); > >> > + assert(str != NULL); > >> > >> Using assert seems like an odd choice when you've already added a > >> failure path and the strsep will crash immediately if assert is elided. > > > > > > Just to make a better point, I had the same discussion about assert(3) in > > another review, we don't do NDEBUG even for RELEASE. > > IMHO we only use assert for asserting things ought to never be false > except in buggy code. Using assert for handling is poor practice. > Again, in this case we are using it all over the place and we must replace it. Also we should document it in somewhere perhaps in the assert(3) otherwise myself and others will keep using it. If you use find, not only myself is using it to check strdup! So what is the suggestion to handle assert(3)? Deprecated it? > > > > > -- > Eitan Adler > From owner-svn-src-head@freebsd.org Fri May 25 17:29:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A160EEEEBAA; Fri, 25 May 2018 17:29:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B9E46ACB6; Fri, 25 May 2018 17:29:30 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D9F223DE6; Fri, 25 May 2018 17:29:30 +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 w4PHTT7e026781; Fri, 25 May 2018 17:29:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PHTT5H026780; Fri, 25 May 2018 17:29:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805251729.w4PHTT5H026780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 25 May 2018 17:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334212 - head/sys/modules/usb X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/modules/usb X-SVN-Commit-Revision: 334212 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 17:29:30 -0000 Author: emaste Date: Fri May 25 17:29:29 2018 New Revision: 334212 URL: https://svnweb.freebsd.org/changeset/base/334212 Log: if_muge: connect module to the build Supported Microchip devices: - LAN7515 USB 2 hub and gigabit Ethernet controller w/ PHY - LAN7800 USB 3.0 gigabit Ethernet controller w/ PHY The LAN7515 is the Ethernet controller on the Raspberry Pi 3 B+. This driver has some TODO items outstanding, but basic functionality works. Sponsored by: The FreeBSD Foundation Modified: head/sys/modules/usb/Makefile Modified: head/sys/modules/usb/Makefile ============================================================================== --- head/sys/modules/usb/Makefile Fri May 25 16:29:22 2018 (r334211) +++ head/sys/modules/usb/Makefile Fri May 25 17:29:29 2018 (r334212) @@ -52,6 +52,7 @@ SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma umct umcs umodem umoscom uplcom uslcom uvisor uvscom SUBDIR += udl SUBDIR += uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso ipheth +SUBDIR += muge SUBDIR += ure urndis SUBDIR += usfs umass urio SUBDIR += quirk template From owner-svn-src-head@freebsd.org Fri May 25 17:31:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02C1EEEEDBC; Fri, 25 May 2018 17:31:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC7AD6AF17; Fri, 25 May 2018 17:31:43 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D50323F48; Fri, 25 May 2018 17:31:43 +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 w4PHVhKF029198; Fri, 25 May 2018 17:31:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PHVhDU029197; Fri, 25 May 2018 17:31:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805251731.w4PHVhDU029197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 25 May 2018 17:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334213 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 334213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 17:31:44 -0000 Author: emaste Date: Fri May 25 17:31:43 2018 New Revision: 334213 URL: https://svnweb.freebsd.org/changeset/base/334213 Log: if_muge: Use lock assertion instead of broken locking in lan78xx_chip_init Previously lan78xx_chip_init locked the driver's mutex if not already locked, but unlocked it only in the case of error. This provided a fairly clear indication that the function is already called with the lock held, so just replace it with a lock assertion. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Fri May 25 17:29:29 2018 (r334212) +++ head/sys/dev/usb/net/if_muge.c Fri May 25 17:31:43 2018 (r334213) @@ -953,13 +953,10 @@ static int lan78xx_chip_init(struct muge_softc *sc) { int err; - int locked; uint32_t buf; uint32_t burst_cap; - locked = mtx_owned(&sc->sc_mtx); - if (!locked) - MUGE_LOCK(sc); + MUGE_LOCK_ASSERT(sc, MA_OWNED); /* Enter H/W config mode. */ lan78xx_write_reg(sc, ETH_HW_CFG, ETH_HW_CFG_LRST_); @@ -1132,9 +1129,6 @@ lan78xx_chip_init(struct muge_softc *sc) return (0); init_failed: - if (!locked) - MUGE_UNLOCK(sc); - muge_err_printf(sc, "lan78xx_chip_init failed (err=%d)\n", err); return (err); } From owner-svn-src-head@freebsd.org Fri May 25 17:44:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B36DEEF0CA; Fri, 25 May 2018 17:44:26 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CC6B6B734; Fri, 25 May 2018 17:44:25 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 62F045A9F09; Fri, 25 May 2018 17:44:24 +0000 (UTC) Date: Fri, 25 May 2018 17:44:24 +0000 From: Brooks Davis To: araujo@freebsd.org Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve Message-ID: <20180525174424.GD99063@spindle.one-eyed-alien.net> References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mJm6k4Vb/yFcL9ZU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 17:44:26 -0000 --mJm6k4Vb/yFcL9ZU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 26, 2018 at 01:21:33AM +0800, Marcelo Araujo wrote: > On Sat, May 26, 2018, 1:11 AM Eitan Adler wrote: >=20 > > On 25 May 2018 at 08:23, Marcelo Araujo wrote: > > > > > > > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis wrot= e: > > >> > > >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > > >> > Author: araujo > > >> > Date: Fri May 25 02:07:05 2018 > > >> > New Revision: 334199 > > >> > URL: https://svnweb.freebsd.org/changeset/base/334199 > > >> > > > >> > Log: > > >> > Fix a memory leak on topology_parse(). > > >> > > > >> > strdup(3) allocates memory for a copy of the string, does the co= py > > and > > >> > returns a pointer to it. If there is no sufficient memory NULL is > > >> > returned > > >> > and the global errno is set to ENOMEM. > > >> > We do a sanity check to see if it was possible to allocate enough > > >> > memory. > > >> > > > >> > Also as we allocate memory, we need to free this memory used. Or= it > > >> > will > > >> > going out of scope leaks the storage it points to. > > >> > > > >> > Reviewed by: rgrimes > > >> > MFC after: 3 weeks. > > >> > X-MFC: r332298 > > >> > Sponsored by: iXsystems Inc. > > >> > Differential Revision: https://reviews.freebsd.org/D15550 > > >> > > > >> > Modified: > > >> > head/usr.sbin/bhyve/bhyverun.c > > >> > > > >> > Modified: head/usr.sbin/bhyve/bhyverun.c > > >> > > > >> > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 > > >> > (r334198) > > >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 > > >> > (r334199) > > >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > >> > c =3D 1, n =3D 1, s =3D 1, t =3D 1; > > >> > ns =3D false, scts =3D false; > > >> > str =3D strdup(opt); > > >> > + assert(str !=3D NULL); > > >> > > >> Using assert seems like an odd choice when you've already added a > > >> failure path and the strsep will crash immediately if assert is elid= ed. > > > > > > > > > Just to make a better point, I had the same discussion about assert(3= ) in > > > another review, we don't do NDEBUG even for RELEASE. > > > > IMHO we only use assert for asserting things ought to never be false > > except in buggy code. Using assert for handling is poor practice. > > >=20 > Again, in this case we are using it all over the place and we must replace > it. Also we should document it in somewhere perhaps in the assert(3) > otherwise myself and others will keep using it. If you use find, not only > myself is using it to check strdup! So what is the suggestion to handle > assert(3)? Deprecated it? Code that uses assert() in place of error handling is wrong and should be fixed. assert(condition) means that condition must never happen and if it does a bug has occurred (or the programmers assumptions are wrong). In this case failure would not be due to a bug, but do to resource exhaustion which is expected to be handled. -- Brooks --mJm6k4Vb/yFcL9ZU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbCEt3AAoJEKzQXbSebgfAiloIAJ+qdzgQpTJD9I2mO369RHsU IvzmcaoSXv11CeIFgk+/+j4qLcFdgWIte0HlnK8Hj6p9sbeK2EJYcBBpVEwFPdBd n1YXdqGRBosEmyatyoIcL5Ls6jmy11XICgXjKRiGxuGdkHype+qtI2TWR9faMBDt VK2OOiXnDu0JIYISv9ksXZ6kOrbrCKZg6q2lgHE3XVM3QDh/PkS+mWvW776cknFZ j4up69nod74kww1d6J0vgTTvkLJmWpS+d/mmvamxgQ3wZ8HSjwYUDIEytwGb4+oe hN6jeEvEj3uhFQz42ph8cmF78XLvfNKXNrWOyDZk2sRb+l+UMgsstzoIM7ghJnI= =IvH8 -----END PGP SIGNATURE----- --mJm6k4Vb/yFcL9ZU-- From owner-svn-src-head@freebsd.org Fri May 25 17:56:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A646EEF809; Fri, 25 May 2018 17:56:31 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5CE86C475; Fri, 25 May 2018 17:56:30 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wr0-x22d.google.com with SMTP id l41-v6so10607607wre.7; Fri, 25 May 2018 10:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=bsw/xrc2few9ScgwIsvhiWF4MDEgASwE/hgKKIVkn9g=; b=Sz4H0NcG/gmEmsFO6kCrywW/erRp1r0/gv9NAxL1Lw0TBSJSyOiP6AJCJwj+li4cm8 VjG9oL/QWFbOWwcQPYVo9PA/OIJU05JAw4XOivlLz1LTz7Hy5Latwng9Lgj8N5fppt7N CGJogcquWw9ZBY8PC3dNL21+NeVPLCLUjTzVIyHJR3snQZVDi+EQwuBtyaWvv4RThsa0 q/AWVHYTf7Xfq0J1knwvhyNtVBQJCl55f6YOsPN6t0tGtQc8+Ozk1uKt29WU7Jp52wh2 ZMt/Wz1ywZAZYlyp32I1lPIlJ2DbN1XuMy3EDLRvG/Q/+11tACouo0KUN3NZ41grepOZ 1MCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=bsw/xrc2few9ScgwIsvhiWF4MDEgASwE/hgKKIVkn9g=; b=EK2erR26PW9tq0ftOrGfBjvjjVgo8CqGEfP1EwG8MZq37cJjrIkFOVR57AAxd+nZhM hXPS/OBX7JVZFLVtOY6Z1e+BFqpzZJ6b0axBsEU6DVpRq2vjjwWC/THTKT5SNR7RIMZl zl8OsBwGISqq8nxCU1PqJELr/4wOuT3f92hsdAGkQWw0+zKC7hou+055uOhFCP1rXLGZ qXdtdjvDzzYMY1rEhzbODMlxAhHWmf5/DGQAQOiV+bhaUgV5nB5iBB1zkyqWK93AuPBr N0tUl+8w4BFJu2Ba1Rgrl+cbvcWmQiYJV/X+PwflY94BbyqjmV5wZ5zeECMu6o0V4XaD qd1w== X-Gm-Message-State: ALKqPwdAhA9LvIY2N85xWkSewZdtPtCnSewz0EVQ9ZAzeKwP4svB3eJN jdgNQt+ucyvWji1YkaVZ4O9l+AuF6eih5PyKBBAaqQ== X-Google-Smtp-Source: ADUXVKIQSr3N9OSo/c+7zHGWyEWGYeBUoLAKXGokn/vlSqQVdhvlghJ4rGLWyYiPYhfjCNUyt4LP+wcugA06UOkxF68= X-Received: by 2002:a19:9a10:: with SMTP id c16-v6mr2094205lfe.60.1527270988726; Fri, 25 May 2018 10:56:28 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:1fc9:0:0:0:0:0 with HTTP; Fri, 25 May 2018 10:56:28 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <20180525174424.GD99063@spindle.one-eyed-alien.net> References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> From: Marcelo Araujo Date: Sat, 26 May 2018 01:56:28 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Brooks Davis Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 17:56:31 -0000 2018-05-26 1:44 GMT+08:00 Brooks Davis : > On Sat, May 26, 2018 at 01:21:33AM +0800, Marcelo Araujo wrote: > > On Sat, May 26, 2018, 1:11 AM Eitan Adler wrote: > > > > > On 25 May 2018 at 08:23, Marcelo Araujo > wrote: > > > > > > > > > > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis > wrote: > > > >> > > > >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > > > >> > Author: araujo > > > >> > Date: Fri May 25 02:07:05 2018 > > > >> > New Revision: 334199 > > > >> > URL: https://svnweb.freebsd.org/changeset/base/334199 > > > >> > > > > >> > Log: > > > >> > Fix a memory leak on topology_parse(). > > > >> > > > > >> > strdup(3) allocates memory for a copy of the string, does the > copy > > > and > > > >> > returns a pointer to it. If there is no sufficient memory NULL > is > > > >> > returned > > > >> > and the global errno is set to ENOMEM. > > > >> > We do a sanity check to see if it was possible to allocate > enough > > > >> > memory. > > > >> > > > > >> > Also as we allocate memory, we need to free this memory used. > Or it > > > >> > will > > > >> > going out of scope leaks the storage it points to. > > > >> > > > > >> > Reviewed by: rgrimes > > > >> > MFC after: 3 weeks. > > > >> > X-MFC: r332298 > > > >> > Sponsored by: iXsystems Inc. > > > >> > Differential Revision: https://reviews.freebsd.org/D15550 > > > >> > > > > >> > Modified: > > > >> > head/usr.sbin/bhyve/bhyverun.c > > > >> > > > > >> > Modified: head/usr.sbin/bhyve/bhyverun.c > > > >> > > > > >> > > > > ============================================================ > ================== > > > >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 > > > >> > (r334198) > > > >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 > > > >> > (r334199) > > > >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > > >> > c = 1, n = 1, s = 1, t = 1; > > > >> > ns = false, scts = false; > > > >> > str = strdup(opt); > > > >> > + assert(str != NULL); > > > >> > > > >> Using assert seems like an odd choice when you've already added a > > > >> failure path and the strsep will crash immediately if assert is > elided. > > > > > > > > > > > > Just to make a better point, I had the same discussion about > assert(3) in > > > > another review, we don't do NDEBUG even for RELEASE. > > > > > > IMHO we only use assert for asserting things ought to never be false > > > except in buggy code. Using assert for handling is poor practice. > > > > > > > Again, in this case we are using it all over the place and we must > replace > > it. Also we should document it in somewhere perhaps in the assert(3) > > otherwise myself and others will keep using it. If you use find, not only > > myself is using it to check strdup! So what is the suggestion to handle > > assert(3)? Deprecated it? > > Code that uses assert() in place of error handling is wrong and should > be fixed. assert(condition) means that condition must never happen > and if it does a bug has occurred (or the programmers assumptions are > wrong). In this case failure would not be due to a bug, but do to > resource exhaustion which is expected to be handled. > I agree with you! We have plenty of place that use strdup(3) without check the errno ENOMEN return; so do you think would be better bypass a errno ENOMEN without check it and have a crash, or better abort(3) using assert(3) in case we have no memory available to allocated the memory for a copy of a string? Personally I don't mind make couple extra lines of code to call abort(3) or exit(3), but till there, if we don't make RELEASE using NDEBUG, what you guys are saying to me is more personal preference than anything else. > > -- Brooks > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-head@freebsd.org Fri May 25 18:11:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4605FEEFFB2; Fri, 25 May 2018 18:11:14 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECF516CF28; Fri, 25 May 2018 18:11:13 +0000 (UTC) (envelope-from sbruno@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE8EE245CD; Fri, 25 May 2018 18:11:13 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PIBDv7049115; Fri, 25 May 2018 18:11:13 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PIBDgp049114; Fri, 25 May 2018 18:11:13 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201805251811.w4PIBDgp049114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 25 May 2018 18:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334215 - head/usr.sbin/pmcstat X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/usr.sbin/pmcstat X-SVN-Commit-Revision: 334215 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 18:11:14 -0000 Author: sbruno Date: Fri May 25 18:11:13 2018 New Revision: 334215 URL: https://svnweb.freebsd.org/changeset/base/334215 Log: pmcstat(8) - Document per thread filtering. Submitted by: kbowling Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15549 Modified: head/usr.sbin/pmcstat/pmcstat.8 head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcstat.8 ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.8 Fri May 25 18:07:20 2018 (r334214) +++ head/usr.sbin/pmcstat/pmcstat.8 Fri May 25 18:11:13 2018 (r334215) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2015 +.Dd May 25, 2018 .Dt PMCSTAT 8 .Os .Sh NAME @@ -38,6 +38,8 @@ .Op Fl E .Op Fl F Ar pathname .Op Fl G Ar pathname +.Op Fl I +.Op Fl L Ar lwp .Op Fl M Ar mapfilename .Op Fl N .Op Fl O Ar logfilename @@ -155,6 +157,15 @@ is a this information is sent to the output file specified by the .Fl o option. +.It Fl I +Skip symbol lookup and display address instead. +.It Fl L Ar lwp +Filter on thread ID +.Ar lwp , +which you can get from +.Xr ps 1 +.Fl o +.Li lwp . .It Fl M Ar mapfilename Write the mapping between executable objects encountered in the event log and the abbreviated pathnames used for Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Fri May 25 18:07:20 2018 (r334214) +++ head/usr.sbin/pmcstat/pmcstat.c Fri May 25 18:11:13 2018 (r334215) @@ -365,8 +365,8 @@ pmcstat_show_usage(void) "\t -F file\t write a system-wide callgraph (Kcachegrind format)" " to \"file\"\n" "\t -G file\t write a system-wide callgraph to \"file\"\n" - "\t -I don't resolve leaf function but show address instead" - "\t -L \"tid\" filter on thread id in post-processing" + "\t -I don't resolve leaf function name, show address instead\n" + "\t -L lwp\t filter on thread id \"lwp\" in post-processing\n" "\t -M file\t print executable/gmon file map to \"file\"\n" "\t -N\t\t (toggle) capture callchains\n" "\t -O file\t send log output to \"file\"\n" From owner-svn-src-head@freebsd.org Fri May 25 18:21:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44EC0EF00E8; Fri, 25 May 2018 18:21:41 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBA576D2FD; Fri, 25 May 2018 18:21:40 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 0BB1A5A9F13; Fri, 25 May 2018 18:21:40 +0000 (UTC) Date: Fri, 25 May 2018 18:21:40 +0000 From: Brooks Davis To: araujo@freebsd.org Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve Message-ID: <20180525182139.GE99063@spindle.one-eyed-alien.net> References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="10jrOL3x2xqLmOsH" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 18:21:41 -0000 --10jrOL3x2xqLmOsH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 26, 2018 at 01:56:28AM +0800, Marcelo Araujo wrote: > 2018-05-26 1:44 GMT+08:00 Brooks Davis : >=20 > > On Sat, May 26, 2018 at 01:21:33AM +0800, Marcelo Araujo wrote: > > > On Sat, May 26, 2018, 1:11 AM Eitan Adler wrot= e: > > > > > > > On 25 May 2018 at 08:23, Marcelo Araujo > > wrote: > > > > > > > > > > > > > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis > > wrote: > > > > >> > > > > >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > > > > >> > Author: araujo > > > > >> > Date: Fri May 25 02:07:05 2018 > > > > >> > New Revision: 334199 > > > > >> > URL: https://svnweb.freebsd.org/changeset/base/334199 > > > > >> > > > > > >> > Log: > > > > >> > Fix a memory leak on topology_parse(). > > > > >> > > > > > >> > strdup(3) allocates memory for a copy of the string, does the > > copy > > > > and > > > > >> > returns a pointer to it. If there is no sufficient memory NU= LL > > is > > > > >> > returned > > > > >> > and the global errno is set to ENOMEM. > > > > >> > We do a sanity check to see if it was possible to allocate > > enough > > > > >> > memory. > > > > >> > > > > > >> > Also as we allocate memory, we need to free this memory used. > > Or it > > > > >> > will > > > > >> > going out of scope leaks the storage it points to. > > > > >> > > > > > >> > Reviewed by: rgrimes > > > > >> > MFC after: 3 weeks. > > > > >> > X-MFC: r332298 > > > > >> > Sponsored by: iXsystems Inc. > > > > >> > Differential Revision: https://reviews.freebsd.org/D155= 50 > > > > >> > > > > > >> > Modified: > > > > >> > head/usr.sbin/bhyve/bhyverun.c > > > > >> > > > > > >> > Modified: head/usr.sbin/bhyve/bhyverun.c > > > > >> > > > > > >> > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 > > > > >> > (r334198) > > > > >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 > > > > >> > (r334199) > > > > >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > > > >> > c =3D 1, n =3D 1, s =3D 1, t =3D 1; > > > > >> > ns =3D false, scts =3D false; > > > > >> > str =3D strdup(opt); > > > > >> > + assert(str !=3D NULL); > > > > >> > > > > >> Using assert seems like an odd choice when you've already added a > > > > >> failure path and the strsep will crash immediately if assert is > > elided. > > > > > > > > > > > > > > > Just to make a better point, I had the same discussion about > > assert(3) in > > > > > another review, we don't do NDEBUG even for RELEASE. > > > > > > > > IMHO we only use assert for asserting things ought to never be false > > > > except in buggy code. Using assert for handling is poor practice. > > > > > > > > > > Again, in this case we are using it all over the place and we must > > replace > > > it. Also we should document it in somewhere perhaps in the assert(3) > > > otherwise myself and others will keep using it. If you use find, not = only > > > myself is using it to check strdup! So what is the suggestion to hand= le > > > assert(3)? Deprecated it? > > > > Code that uses assert() in place of error handling is wrong and should > > be fixed. assert(condition) means that condition must never happen > > and if it does a bug has occurred (or the programmers assumptions are > > wrong). In this case failure would not be due to a bug, but do to > > resource exhaustion which is expected to be handled. > > >=20 > I agree with you! We have plenty of place that use strdup(3) without check > the errno ENOMEN return; so do you think would be better bypass a errno > ENOMEN without check it and have a crash, or better abort(3) using > assert(3) in case we have no memory available to allocated the memory for= a > copy of a string? The correct code here would be one of: str =3D strdup(opt); if (str =3D=3D NULL) goto out; str =3D strdup(opt); if (str =3D=3D NULL) err(1, "unable to allocate option memory");=20 > Personally I don't mind make couple extra lines of code to call abort(3) = or > exit(3), but till there, if we don't make RELEASE using NDEBUG, what you > guys are saying to me is more personal preference than anything else. The fact that we don't do NDEBUG builds normally does not allow us to ignore that it exists. It's perfectly reasonable for a user to build with CFLAGS+=3DNDEBUG. That need to work. If code is going to fail to handle resource errors with NDEBUG set then it needs something like this at the top of the file: #ifdef NDEBUG #error The code depends on assert() for error handling #endif -- Brooks --10jrOL3x2xqLmOsH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbCFQzAAoJEKzQXbSebgfAZjUH/1fsjztyfjyvKItQDy1QmnP3 UjFPO9CudOqzGDNgwgR4m50lsFsetHr67ylexujNliBgPCKG7EgGS+Jn4G34jvuM VbfRnRYxb9WqBdBDejUuXgJSNENsCvciDXUD8/gzefXlCzimBhonxxgKWyfBuDMT PNH4fA6xvL8noUfy1MCz2Culo4oF2IDPKblRAAC0SpzRUSs5txyvAevzqBD3Xsps bByvAV5lKpUwnCblm5qfSS0UUONMTmmc1k5T2MFf+OZo3XcED3mjCLaLF8VA0w06 FPsHfQgktJnisQwf5eFszJtAt3dK/HAiv/FvXZNaRpY+BnS+3gDNgZ7Cj/2M5zk= =B59V -----END PGP SIGNATURE----- --10jrOL3x2xqLmOsH-- From owner-svn-src-head@freebsd.org Fri May 25 18:26:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AE9AEF02DE; Fri, 25 May 2018 18:26:36 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6F1D6D623; Fri, 25 May 2018 18:26:35 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wm0-x231.google.com with SMTP id q4-v6so14590963wmq.1; Fri, 25 May 2018 11:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=s1SLO54P9hPzsj9nPrF30XU0V81VjNRC8ainTE/yFoQ=; b=CGOz/+pTFX80jro/Wqd9xm6E1UzHtFXutfi0BoY3215d38+Ib75zkhTtX3SPFSujUx VPON/26BqeKyGhBMFy6CWZ2OMiKFg9Kmw2GOm5ZFyvUrpuUjhSWX0bcU3i7KVD6yjV3s pehLyZQ9wwHJrrXM0ja06ucm+VndS/fQmpeJNxEDVSYDZJWoNCo1DNLovC+LtOB1NOGh bFfbURE06mVKnf/rOxCShG3iDMmfixgHY3vexeI0qp6K1jw19zNTEjukJRn6sF1r93dq CSNiJKIN/MOnC9yEKG/aSWiBbeiSlmc+i89yezq4RRrPmq+F+QxaZJSwqb8HXazBXipo X/DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=s1SLO54P9hPzsj9nPrF30XU0V81VjNRC8ainTE/yFoQ=; b=Q1AQy7/dzJ+wJCu7OwjeiBOZu7nS/XQSVNmyX/MV9n1r3VfscMxKNUx+CJrhPfVKvb tsx/G4oTqnWPmXkNV5bGLf/rOb8wkYIo4i75Y6qv38TqWyCck++/vWjhctn1Zc+IjRBv IbMRURxGs/XW346u/1PtSTPNlr8VaJQ2XMZsrel2m3+zvBX5g3e+khgJ9k2hL6/xbW+f DsRmQU4msVDe9REgsFkzJTLUJOFwOc1DYxcW8OIYPn8PmrcHoZGIZlRrVsR71lFCNM4O lQoldNnfmzu4iiZdkG674cTqwVtZNQSMVU6tA5xkCtQxOrHYViUa2YiQkjR+43m/7c3g lBqQ== X-Gm-Message-State: ALKqPwfLRSni+c+HZV6gISv+wT7+RtIwpgCW58miQhSW8zXeEtsJhnKx CMhE2vz+rxMaeOv6hFbVldSYsU8Uenuplymv+YE= X-Google-Smtp-Source: AB8JxZq92A10vU+g1yI/Ja/q8IV+INeG+EfYDY8n7fcQqXfwcib6osxQyJWjLVurDDaiUD7SIH8lhkqMfNAlkV26s8Y= X-Received: by 2002:a2e:5019:: with SMTP id e25-v6mr2419445ljb.122.1527272794500; Fri, 25 May 2018 11:26:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:1fc9:0:0:0:0:0 with HTTP; Fri, 25 May 2018 11:26:33 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <20180525182139.GE99063@spindle.one-eyed-alien.net> References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> From: Marcelo Araujo Date: Sat, 26 May 2018 02:26:33 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Brooks Davis Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 18:26:36 -0000 2018-05-26 2:21 GMT+08:00 Brooks Davis : > On Sat, May 26, 2018 at 01:56:28AM +0800, Marcelo Araujo wrote: > > 2018-05-26 1:44 GMT+08:00 Brooks Davis : > > > > > On Sat, May 26, 2018 at 01:21:33AM +0800, Marcelo Araujo wrote: > > > > On Sat, May 26, 2018, 1:11 AM Eitan Adler > wrote: > > > > > > > > > On 25 May 2018 at 08:23, Marcelo Araujo > > > wrote: > > > > > > > > > > > > > > > > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis > > > wrote: > > > > > >> > > > > > >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > > > > > >> > Author: araujo > > > > > >> > Date: Fri May 25 02:07:05 2018 > > > > > >> > New Revision: 334199 > > > > > >> > URL: https://svnweb.freebsd.org/changeset/base/334199 > > > > > >> > > > > > > >> > Log: > > > > > >> > Fix a memory leak on topology_parse(). > > > > > >> > > > > > > >> > strdup(3) allocates memory for a copy of the string, does > the > > > copy > > > > > and > > > > > >> > returns a pointer to it. If there is no sufficient memory > NULL > > > is > > > > > >> > returned > > > > > >> > and the global errno is set to ENOMEM. > > > > > >> > We do a sanity check to see if it was possible to allocate > > > enough > > > > > >> > memory. > > > > > >> > > > > > > >> > Also as we allocate memory, we need to free this memory > used. > > > Or it > > > > > >> > will > > > > > >> > going out of scope leaks the storage it points to. > > > > > >> > > > > > > >> > Reviewed by: rgrimes > > > > > >> > MFC after: 3 weeks. > > > > > >> > X-MFC: r332298 > > > > > >> > Sponsored by: iXsystems Inc. > > > > > >> > Differential Revision: https://reviews.freebsd.org/ > D15550 > > > > > >> > > > > > > >> > Modified: > > > > > >> > head/usr.sbin/bhyve/bhyverun.c > > > > > >> > > > > > > >> > Modified: head/usr.sbin/bhyve/bhyverun.c > > > > > >> > > > > > > >> > > > > > > ============================================================ > > > ================== > > > > > >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 > > > > > >> > (r334198) > > > > > >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 > > > > > >> > (r334199) > > > > > >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > > > > >> > c = 1, n = 1, s = 1, t = 1; > > > > > >> > ns = false, scts = false; > > > > > >> > str = strdup(opt); > > > > > >> > + assert(str != NULL); > > > > > >> > > > > > >> Using assert seems like an odd choice when you've already added > a > > > > > >> failure path and the strsep will crash immediately if assert is > > > elided. > > > > > > > > > > > > > > > > > > Just to make a better point, I had the same discussion about > > > assert(3) in > > > > > > another review, we don't do NDEBUG even for RELEASE. > > > > > > > > > > IMHO we only use assert for asserting things ought to never be > false > > > > > except in buggy code. Using assert for handling is poor practice. > > > > > > > > > > > > > Again, in this case we are using it all over the place and we must > > > replace > > > > it. Also we should document it in somewhere perhaps in the assert(3) > > > > otherwise myself and others will keep using it. If you use find, not > only > > > > myself is using it to check strdup! So what is the suggestion to > handle > > > > assert(3)? Deprecated it? > > > > > > Code that uses assert() in place of error handling is wrong and should > > > be fixed. assert(condition) means that condition must never happen > > > and if it does a bug has occurred (or the programmers assumptions are > > > wrong). In this case failure would not be due to a bug, but do to > > > resource exhaustion which is expected to be handled. > > > > > > > I agree with you! We have plenty of place that use strdup(3) without > check > > the errno ENOMEN return; so do you think would be better bypass a errno > > ENOMEN without check it and have a crash, or better abort(3) using > > assert(3) in case we have no memory available to allocated the memory > for a > > copy of a string? > > The correct code here would be one of: > > str = strdup(opt); > if (str == NULL) > goto out; > No, it is not the correct code! If we go out and free(str) we have nothing to free, because we even didn't allocated memory for str. > > str = strdup(opt); > if (str == NULL) > err(1, "unable to allocate option memory"); > Yes, this one makes sense. > > > Personally I don't mind make couple extra lines of code to call abort(3) > or > > exit(3), but till there, if we don't make RELEASE using NDEBUG, what you > > guys are saying to me is more personal preference than anything else. > > The fact that we don't do NDEBUG builds normally does not allow us to > ignore that it exists. It's perfectly reasonable for a user to build > with CFLAGS+=NDEBUG. That need to work. If code is going to fail to > handle resource errors with NDEBUG set then it needs something like this > at the top of the file: > Please document it in some place! > > #ifdef NDEBUG > #error The code depends on assert() for error handling > #endif > I have no comments for this part! > > -- Brooks > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-head@freebsd.org Fri May 25 18:29:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF3BBEF038B; Fri, 25 May 2018 18:29:55 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 564A46D7BD; Fri, 25 May 2018 18:29:55 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wm0-x235.google.com with SMTP id j4-v6so16729668wme.1; Fri, 25 May 2018 11:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=XM7CF0o8v1rOlaJZaflsnA8XMTpGrUvY9JM7GvrE+3I=; b=GfZeITMMiXZAVmVLju/yY3TBVczvaHxjluRzu5XN303ryWv9bL3WTF1URzS5wHRwed n0HkBX15Te0u1SsexzA9J9MRAAgUr8W89/DMqWGvocDBZLnOIqJaq9ZUgGcNIOkoRxjd cD4XXWYZwHhTGbGqVs6SxjfYyimkLAC/2Mczv9/3ZJbpRAH7uFZjYONHnvOjcDoUWplQ TbHwZpiLMnB6QtRsRFqd46HRmwxwakV5JbbK/MPmDbrgBcacXELxUBelrtiR4RK0HKxf HY3vU+G4645Xg4qN3qQq8aKyR31jv946heKsLwqgzuZi64YJEFkY2ZEeDegBtskBzUk/ UbKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=XM7CF0o8v1rOlaJZaflsnA8XMTpGrUvY9JM7GvrE+3I=; b=P+0GL9I0BBa8Gkeyh0iznp/vS+Q2X+dc9Lp+jdtdHWbHCNNfSOPwEOLvCQ6sCn8uWH 95/dVawB0/HggKSqLBiTl+d7YdfKyG+qmp0aPDJrW4N+3yNLUEys/HUMcdOWTOGPwmv/ RheKfKrDZtor68oOOGuS5m+LAv/4Rn/8CxgOUXBoBdXA6YxvE9NOLBgR7l0wdpAfEIqg jxSoC8Q6jf5sU2RgRa8/th6lRPlRzKH9ijZYqu7rqy30BxHeLJm/RUc98M533K1xelIK yLbeZbtii5d+93itM8qNHyE9ZIv2sKN455dgwTRIPVaVY/PwBw/RAGsdulj1sZFVNkjE mp5Q== X-Gm-Message-State: ALKqPwdclvb82F5bhElLZy/t/PrjXsCY8uDqSe/pFCWeJjBWtvRmHDBg 5s6nlmgUFJJKgq4WFDIuSLvkrKZ5k7kfSRKj5AE= X-Google-Smtp-Source: AB8JxZq+PWEKr6kOJgQXqJi8XSbjdhS8iQTns28bsCFn+w86Yzs0s7y01z7txXGyKf0bNRt/2vuLBkWaQqo++v3gfmo= X-Received: by 2002:a2e:6808:: with SMTP id c8-v6mr2390270lja.109.1527272994067; Fri, 25 May 2018 11:29:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:1fc9:0:0:0:0:0 with HTTP; Fri, 25 May 2018 11:29:53 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <20180525182139.GE99063@spindle.one-eyed-alien.net> References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> From: Marcelo Araujo Date: Sat, 26 May 2018 02:29:53 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Brooks Davis Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 18:29:56 -0000 2018-05-26 2:21 GMT+08:00 Brooks Davis : > On Sat, May 26, 2018 at 01:56:28AM +0800, Marcelo Araujo wrote: > > 2018-05-26 1:44 GMT+08:00 Brooks Davis : > > > > > On Sat, May 26, 2018 at 01:21:33AM +0800, Marcelo Araujo wrote: > > > > On Sat, May 26, 2018, 1:11 AM Eitan Adler > wrote: > > > > > > > > > On 25 May 2018 at 08:23, Marcelo Araujo > > > wrote: > > > > > > > > > > > > > > > > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis > > > wrote: > > > > > >> > > > > > >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > > > > > >> > Author: araujo > > > > > >> > Date: Fri May 25 02:07:05 2018 > > > > > >> > New Revision: 334199 > > > > > >> > URL: https://svnweb.freebsd.org/changeset/base/334199 > > > > > >> > > > > > > >> > Log: > > > > > >> > Fix a memory leak on topology_parse(). > > > > > >> > > > > > > >> > strdup(3) allocates memory for a copy of the string, does > the > > > copy > > > > > and > > > > > >> > returns a pointer to it. If there is no sufficient memory > NULL > > > is > > > > > >> > returned > > > > > >> > and the global errno is set to ENOMEM. > > > > > >> > We do a sanity check to see if it was possible to allocate > > > enough > > > > > >> > memory. > > > > > >> > > > > > > >> > Also as we allocate memory, we need to free this memory > used. > > > Or it > > > > > >> > will > > > > > >> > going out of scope leaks the storage it points to. > > > > > >> > > > > > > >> > Reviewed by: rgrimes > > > > > >> > MFC after: 3 weeks. > > > > > >> > X-MFC: r332298 > > > > > >> > Sponsored by: iXsystems Inc. > > > > > >> > Differential Revision: https://reviews.freebsd.org/ > D15550 > > > > > >> > > > > > > >> > Modified: > > > > > >> > head/usr.sbin/bhyve/bhyverun.c > > > > > >> > > > > > > >> > Modified: head/usr.sbin/bhyve/bhyverun.c > > > > > >> > > > > > > >> > > > > > > ============================================================ > > > ================== > > > > > >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 > > > > > >> > (r334198) > > > > > >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 > > > > > >> > (r334199) > > > > > >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > > > > >> > c = 1, n = 1, s = 1, t = 1; > > > > > >> > ns = false, scts = false; > > > > > >> > str = strdup(opt); > > > > > >> > + assert(str != NULL); > > > > > >> > > > > > >> Using assert seems like an odd choice when you've already added > a > > > > > >> failure path and the strsep will crash immediately if assert is > > > elided. > > > > > > > > > > > > > > > > > > Just to make a better point, I had the same discussion about > > > assert(3) in > > > > > > another review, we don't do NDEBUG even for RELEASE. > > > > > > > > > > IMHO we only use assert for asserting things ought to never be > false > > > > > except in buggy code. Using assert for handling is poor practice. > > > > > > > > > > > > > Again, in this case we are using it all over the place and we must > > > replace > > > > it. Also we should document it in somewhere perhaps in the assert(3) > > > > otherwise myself and others will keep using it. If you use find, not > only > > > > myself is using it to check strdup! So what is the suggestion to > handle > > > > assert(3)? Deprecated it? > > > > > > Code that uses assert() in place of error handling is wrong and should > > > be fixed. assert(condition) means that condition must never happen > > > and if it does a bug has occurred (or the programmers assumptions are > > > wrong). In this case failure would not be due to a bug, but do to > > > resource exhaustion which is expected to be handled. > > > > > > > I agree with you! We have plenty of place that use strdup(3) without > check > > the errno ENOMEN return; so do you think would be better bypass a errno > > ENOMEN without check it and have a crash, or better abort(3) using > > assert(3) in case we have no memory available to allocated the memory > for a > > copy of a string? > > The correct code here would be one of: > > str = strdup(opt); > if (str == NULL) > goto out; > > str = strdup(opt); > if (str == NULL) > err(1, "unable to allocate option memory"); > One more thing, exit with err(1) is wrong, 1 is EPERM and should be 12 ENOMEN! :D > > > Personally I don't mind make couple extra lines of code to call abort(3) > or > > exit(3), but till there, if we don't make RELEASE using NDEBUG, what you > > guys are saying to me is more personal preference than anything else. > > The fact that we don't do NDEBUG builds normally does not allow us to > ignore that it exists. It's perfectly reasonable for a user to build > with CFLAGS+=NDEBUG. That need to work. If code is going to fail to > handle resource errors with NDEBUG set then it needs something like this > at the top of the file: > > #ifdef NDEBUG > #error The code depends on assert() for error handling > #endif > > -- Brooks > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-head@freebsd.org Fri May 25 18:34:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A167EEF065A for ; Fri, 25 May 2018 18:34:25 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4646DC10 for ; Fri, 25 May 2018 18:34:24 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-io0-x243.google.com with SMTP id d73-v6so7428881iog.3 for ; Fri, 25 May 2018 11:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GxncxAjKUaJa7BSqiHH3BfzwfTQX9TJpTQvyMX8BXGQ=; b=a3jstU8SExBvAb/VI5iW3GYWAqi2Bqm8hVbX9sxzltAl4RZSdDOrd8qJrvH8PSeBVn bLXs4uQwdUBSUbkItSbdT2HOLJQjBj76zmJssRsL+iAyptZCVCgVOjJVhzOq+THoZtmW XZca7oO+N4FofI9C/yXg1QCZIjMoB44Lptb4d7iaWyWOpK5zG5kWYHVHaUFgPCp9JJtS er6OfXUxkJHyOUItHSzfTfWa65srJvPbmaBPvHBaN9zfh2XACxjAKGxHWUl28/heaAkg UYmux33+EKUTL6TwBp2fYXyit2L5VcVN9ebJFrwYracDkhwzoloyCT6LrgEMvf3wRuDs ikQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GxncxAjKUaJa7BSqiHH3BfzwfTQX9TJpTQvyMX8BXGQ=; b=LvHjCeGivBf/E/USnlvTT5QI/jaru9dTeY2ADonKZxtXSqMmrziFsk1kAbBukuYNye zNthHMJLmVn4WLK4m5yYFW9X6O5Bw3bBkcyCz9RlPzM5IemZKTZ9xjy5RpP8tCnnywW9 CdhSgxtArb8GzLx10b7NdhKswu8yPY4CovQET183APeGG3rKaPDzsYsa2hO8K/LFQ2p9 9jXFgrhYx24PUyVkQNz6EZFMqJKoz2pLbD/8NNth/bKCb//L7YKcRWqgkpQGlKR6wTdy dZ0f8CChbfvBZE6DAjbN1O3JE3ucsCDNSvViBw5zdX9UvxN0rksqxdfjGP10PUgTAW/O ErEw== X-Gm-Message-State: ALKqPwehsCXcSSJm3X6X/s7795Nw7i/cAMb/11/NbkJiqbyui/O0GIkk yHYPczaOXT5LyO/kIfVMQeDd+A== X-Google-Smtp-Source: ADUXVKLt94aZvtIPfmagZiVBHCEi2G6Xpktw/mwHy9w+qvZggjrB1AHeoTSG1m65lmKbRr52dqWA5Q== X-Received: by 2002:a6b:b3d6:: with SMTP id c205-v6mr3293030iof.93.1527273263886; Fri, 25 May 2018 11:34:23 -0700 (PDT) Received: from mutt-hbsd ([62.102.148.67]) by smtp.gmail.com with ESMTPSA id e189-v6sm12919451ioe.0.2018.05.25.11.34.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 May 2018 11:34:23 -0700 (PDT) Date: Fri, 25 May 2018 14:34:03 -0400 From: Shawn Webb To: araujo@freebsd.org Cc: Brooks Davis , svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve Message-ID: <20180525183403.i3bt2npfc3fq2cgf@mutt-hbsd> References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="liawnm4m4jguetdk" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180323 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 18:34:25 -0000 --liawnm4m4jguetdk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 26, 2018 at 02:26:33AM +0800, Marcelo Araujo wrote: > 2018-05-26 2:21 GMT+08:00 Brooks Davis : >=20 > > On Sat, May 26, 2018 at 01:56:28AM +0800, Marcelo Araujo wrote: > > > 2018-05-26 1:44 GMT+08:00 Brooks Davis : > > > > > > > On Sat, May 26, 2018 at 01:21:33AM +0800, Marcelo Araujo wrote: > > > > > On Sat, May 26, 2018, 1:11 AM Eitan Adler > > wrote: > > > > > > > > > > > On 25 May 2018 at 08:23, Marcelo Araujo > > > > wrote: > > > > > > > > > > > > > > > > > > > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis > > > > wrote: > > > > > > >> > > > > > > >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wro= te: > > > > > > >> > Author: araujo > > > > > > >> > Date: Fri May 25 02:07:05 2018 > > > > > > >> > New Revision: 334199 > > > > > > >> > URL: https://svnweb.freebsd.org/changeset/base/334199 > > > > > > >> > > > > > > > >> > Log: > > > > > > >> > Fix a memory leak on topology_parse(). > > > > > > >> > > > > > > > >> > strdup(3) allocates memory for a copy of the string, does > > the > > > > copy > > > > > > and > > > > > > >> > returns a pointer to it. If there is no sufficient memory > > NULL > > > > is > > > > > > >> > returned > > > > > > >> > and the global errno is set to ENOMEM. > > > > > > >> > We do a sanity check to see if it was possible to alloca= te > > > > enough > > > > > > >> > memory. > > > > > > >> > > > > > > > >> > Also as we allocate memory, we need to free this memory > > used. > > > > Or it > > > > > > >> > will > > > > > > >> > going out of scope leaks the storage it points to. > > > > > > >> > > > > > > > >> > Reviewed by: rgrimes > > > > > > >> > MFC after: 3 weeks. > > > > > > >> > X-MFC: r332298 > > > > > > >> > Sponsored by: iXsystems Inc. > > > > > > >> > Differential Revision: https://reviews.freebsd.org/ > > D15550 > > > > > > >> > > > > > > > >> > Modified: > > > > > > >> > head/usr.sbin/bhyve/bhyverun.c > > > > > > >> > > > > > > > >> > Modified: head/usr.sbin/bhyve/bhyverun.c > > > > > > >> > > > > > > > >> > > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > > > >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 = 2018 > > > > > > >> > (r334198) > > > > > > >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 = 2018 > > > > > > >> > (r334199) > > > > > > >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > > > > > >> > c =3D 1, n =3D 1, s =3D 1, t =3D 1; > > > > > > >> > ns =3D false, scts =3D false; > > > > > > >> > str =3D strdup(opt); > > > > > > >> > + assert(str !=3D NULL); > > > > > > >> > > > > > > >> Using assert seems like an odd choice when you've already ad= ded > > a > > > > > > >> failure path and the strsep will crash immediately if assert= is > > > > elided. > > > > > > > > > > > > > > > > > > > > > Just to make a better point, I had the same discussion about > > > > assert(3) in > > > > > > > another review, we don't do NDEBUG even for RELEASE. > > > > > > > > > > > > IMHO we only use assert for asserting things ought to never be > > false > > > > > > except in buggy code. Using assert for handling is poor practic= e. > > > > > > > > > > > > > > > > Again, in this case we are using it all over the place and we must > > > > replace > > > > > it. Also we should document it in somewhere perhaps in the assert= (3) > > > > > otherwise myself and others will keep using it. If you use find, = not > > only > > > > > myself is using it to check strdup! So what is the suggestion to > > handle > > > > > assert(3)? Deprecated it? > > > > > > > > Code that uses assert() in place of error handling is wrong and sho= uld > > > > be fixed. assert(condition) means that condition must never happen > > > > and if it does a bug has occurred (or the programmers assumptions a= re > > > > wrong). In this case failure would not be due to a bug, but do to > > > > resource exhaustion which is expected to be handled. > > > > > > > > > > I agree with you! We have plenty of place that use strdup(3) without > > check > > > the errno ENOMEN return; so do you think would be better bypass a err= no > > > ENOMEN without check it and have a crash, or better abort(3) using > > > assert(3) in case we have no memory available to allocated the memory > > for a > > > copy of a string? > > > > The correct code here would be one of: > > > > str =3D strdup(opt); > > if (str =3D=3D NULL) > > goto out; > > >=20 > No, it is not the correct code! If we go out and free(str) we have nothing > to free, because we even didn't allocated memory for str. Hey Marcelo, I've authored this commit, which fixes the issues Brooks brought up (and with which I agree): https://github.com/HardenedBSD/hardenedBSD/commit/9c05b8def2c33e3889430cc2f= 54be0402a257366 Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --liawnm4m4jguetdk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlsIVw8ACgkQaoRlj1JF bu62mA/+PF/4L/jGX+cNQsaJ4rU/nW3wFTiKreIgoIOLEOKzQXzB1h1LlXFtK+P5 rgfYjbfnY7C+ose9TJkQhwtsJiq5OWZLACrzZ63P4SH5xlUw77QiH+GdbW9/6Hr9 kLzsMkBnujdGUBQ4S0/ThDzWxQg3LVAQdCAdq2R561E37Pbqiu9AqvAYc0AmkvAB SUFtRqK6H2t+x1+dWtG5RPKdiAxibjry1tjUc5ceAHRa40BouOsNJcAV3UmWCtGB tCaJHbaCu4vO5oeaH+G6lcnM0uSS5P780bWszOxAv2YyZQtbT/zhXLgSxaLnvIqn w/PotRN6mXNxHjCF3jMT3ufQDxi9RUXQ5uNAQphZX9dZPEq36jts+Eab/GxTkQ0P IMq5L+IFrCVzRS5JZ/pYQBM+JKsdT4V7uaglAdi2tGT0zdHvTMnkBdUtOGknTeOV LVmDmaaCzHqHhwR8jvlDnp7G+VLXo1iivtfudNCH5+WZirBjw4Pnt9LOaW83+wPF bN/S+1ZVrDlQGOKbEaisug6d5SRaXOgfTMV5jZ+I0kJ11K7S0hgd1sSkr5zV6slz JBnD+XqgQCE51CHCyqcFHLOz1LZXAeiy2jUmB9UXedoGL/G91O3A2K5NvPmtwJwf Fskq13Mj7EEZGWG3clhjXVazrHnDtJhkaI5sw8r946xCuBVjlcU= =Hl2A -----END PGP SIGNATURE----- --liawnm4m4jguetdk-- From owner-svn-src-head@freebsd.org Fri May 25 18:47:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70DF1EF0F5B for ; Fri, 25 May 2018 18:47:07 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCDEB6E346; Fri, 25 May 2018 18:47:06 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4PIl07D047013; Fri, 25 May 2018 11:47:00 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4PIl09V047012; Fri, 25 May 2018 11:47:00 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805251847.w4PIl09V047012@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve In-Reply-To: <20180525183403.i3bt2npfc3fq2cgf@mutt-hbsd> To: Shawn Webb Date: Fri, 25 May 2018 11:47:00 -0700 (PDT) CC: araujo@freebsd.org, Brooks Davis , svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, src-committers Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 18:47:07 -0000 -- Start of PGP signed section. > On Sat, May 26, 2018 at 02:26:33AM +0800, Marcelo Araujo wrote: > > 2018-05-26 2:21 GMT+08:00 Brooks Davis : > > > > > On Sat, May 26, 2018 at 01:56:28AM +0800, Marcelo Araujo wrote: > > > > 2018-05-26 1:44 GMT+08:00 Brooks Davis : > > > > > > > > > On Sat, May 26, 2018 at 01:21:33AM +0800, Marcelo Araujo wrote: > > > > > > On Sat, May 26, 2018, 1:11 AM Eitan Adler > > > wrote: > > > > > > > > > > > > > On 25 May 2018 at 08:23, Marcelo Araujo > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis > > > > > wrote: > > > > > > > >> > > > > > > > >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo wrote: > > > > > > > >> > Author: araujo > > > > > > > >> > Date: Fri May 25 02:07:05 2018 > > > > > > > >> > New Revision: 334199 > > > > > > > >> > URL: https://svnweb.freebsd.org/changeset/base/334199 > > > > > > > >> > > > > > > > > >> > Log: > > > > > > > >> > Fix a memory leak on topology_parse(). > > > > > > > >> > > > > > > > > >> > strdup(3) allocates memory for a copy of the string, does > > > the > > > > > copy > > > > > > > and > > > > > > > >> > returns a pointer to it. If there is no sufficient memory > > > NULL > > > > > is > > > > > > > >> > returned > > > > > > > >> > and the global errno is set to ENOMEM. > > > > > > > >> > We do a sanity check to see if it was possible to allocate > > > > > enough > > > > > > > >> > memory. > > > > > > > >> > > > > > > > > >> > Also as we allocate memory, we need to free this memory > > > used. > > > > > Or it > > > > > > > >> > will > > > > > > > >> > going out of scope leaks the storage it points to. > > > > > > > >> > > > > > > > > >> > Reviewed by: rgrimes > > > > > > > >> > MFC after: 3 weeks. > > > > > > > >> > X-MFC: r332298 > > > > > > > >> > Sponsored by: iXsystems Inc. > > > > > > > >> > Differential Revision: https://reviews.freebsd.org/ > > > D15550 > > > > > > > >> > > > > > > > > >> > Modified: > > > > > > > >> > head/usr.sbin/bhyve/bhyverun.c > > > > > > > >> > > > > > > > > >> > Modified: head/usr.sbin/bhyve/bhyverun.c > > > > > > > >> > > > > > > > > >> > > > > > > > > ============================================================ > > > > > ================== > > > > > > > >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 2018 > > > > > > > >> > (r334198) > > > > > > > >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 2018 > > > > > > > >> > (r334199) > > > > > > > >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > > > > > > >> > c = 1, n = 1, s = 1, t = 1; > > > > > > > >> > ns = false, scts = false; > > > > > > > >> > str = strdup(opt); > > > > > > > >> > + assert(str != NULL); > > > > > > > >> > > > > > > > >> Using assert seems like an odd choice when you've already added > > > a > > > > > > > >> failure path and the strsep will crash immediately if assert is > > > > > elided. > > > > > > > > > > > > > > > > > > > > > > > > Just to make a better point, I had the same discussion about > > > > > assert(3) in > > > > > > > > another review, we don't do NDEBUG even for RELEASE. > > > > > > > > > > > > > > IMHO we only use assert for asserting things ought to never be > > > false > > > > > > > except in buggy code. Using assert for handling is poor practice. > > > > > > > > > > > > > > > > > > > Again, in this case we are using it all over the place and we must > > > > > replace > > > > > > it. Also we should document it in somewhere perhaps in the assert(3) > > > > > > otherwise myself and others will keep using it. If you use find, not > > > only > > > > > > myself is using it to check strdup! So what is the suggestion to > > > handle > > > > > > assert(3)? Deprecated it? > > > > > > > > > > Code that uses assert() in place of error handling is wrong and should > > > > > be fixed. assert(condition) means that condition must never happen > > > > > and if it does a bug has occurred (or the programmers assumptions are > > > > > wrong). In this case failure would not be due to a bug, but do to > > > > > resource exhaustion which is expected to be handled. > > > > > > > > > > > > > I agree with you! We have plenty of place that use strdup(3) without > > > check > > > > the errno ENOMEN return; so do you think would be better bypass a errno > > > > ENOMEN without check it and have a crash, or better abort(3) using > > > > assert(3) in case we have no memory available to allocated the memory > > > for a > > > > copy of a string? > > > > > > The correct code here would be one of: > > > > > > str = strdup(opt); > > > if (str == NULL) > > > goto out; > > > > > > > No, it is not the correct code! If we go out and free(str) we have nothing > > to free, because we even didn't allocated memory for str. > > Hey Marcelo, > > I've authored this commit, which fixes the issues Brooks brought up > (and with which I agree): > > https://github.com/HardenedBSD/hardenedBSD/commit/9c05b8def2c33e3889430cc2f54be0402a257366 > > Thanks, And as the author of the function in question I ALSO agree that this fix by Shawn should be commited. Thank you Shawn, only a few hundred more like this in bhyve(8) to fix now.... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri May 25 18:54:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83451EF11AF; Fri, 25 May 2018 18:54:41 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18EF06E7DA; Fri, 25 May 2018 18:54:41 +0000 (UTC) (envelope-from araujo@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E00EB24CC1; Fri, 25 May 2018 18:54:40 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PIseWA073003; Fri, 25 May 2018 18:54:40 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PIseSi073002; Fri, 25 May 2018 18:54:40 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201805251854.w4PIseSi073002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 25 May 2018 18:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334216 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 334216 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 18:54:41 -0000 Author: araujo Date: Fri May 25 18:54:40 2018 New Revision: 334216 URL: https://svnweb.freebsd.org/changeset/base/334216 Log: After a long discussion about assert(3), we gonna use a HardenedBSD approach to chek strdup(3) memory allocation. Submitted by: Shaw Webb Reported by: brooks Obtained from: HardenedBSD Modified: head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 18:11:13 2018 (r334215) +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 18:54:40 2018 (r334216) @@ -193,7 +193,8 @@ topology_parse(const char *opt) c = 1, n = 1, s = 1, t = 1; ns = false, scts = false; str = strdup(opt); - assert(str != NULL); + if (str == NULL) + goto out; while ((cp = strsep(&str, ",")) != NULL) { if (sscanf(cp, "%i%n", &tmp, &chk) == 1) { @@ -225,6 +226,7 @@ topology_parse(const char *opt) goto out; } free(str); + str = NULL; /* * Range check 1 <= n <= UINT16_MAX all values @@ -253,7 +255,8 @@ topology_parse(const char *opt) return(0); out: - free(str); + if (str != NULL) + free(str); return (-1); } From owner-svn-src-head@freebsd.org Fri May 25 18:57:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3E5AEF1264; Fri, 25 May 2018 18:57:31 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51CD16E96C; Fri, 25 May 2018 18:57:31 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id f6-v6so16860420wmc.4; Fri, 25 May 2018 11:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=mBRrx5x4BhoSjZAq9IXJHcvmxk8OiBsWl461K6MCdA4=; b=c9FkEr6CSwq+OwM2YU/7peRscqB1UXxRUebOwIvIT+dhFxXues8/Kn7AWEkkNjvpox gpwA8lYb+fp8PW94MivPidwflXo9MJ2wWeYR4on5v/+JM66yqjX/IKNVme+gAX36uvov Qk2BtZqDkdWncCVhgI53QC8Wx+9z71kKgXzDi99AlU3YqctdtcktdVZBoYboNqbIYwT5 H7eQQZrJBFnrHevl3SRHCM5rRN+Y6fGgED4UHvJNroFvcMqxMJ6l9eJT/W/39lnAg5aK udZFI/qz9S+a+QHajqY1X4LgDyV8cAtbvg++EnMsVuA/dULY6vFMM3452bqqOOk8j/lC PCyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=mBRrx5x4BhoSjZAq9IXJHcvmxk8OiBsWl461K6MCdA4=; b=nda1zlpj3FAXulgEx4REu4AXmbRwmoBsj21qWEmoJNncsRHLATtknXnIfNHadKRq50 P2ab5QXuaVXcTHdsaYH0oIF907KijOIhM2pqZg+RX1DfQNpcnDpA+6xjYuMtuTI1AHNB UwxgNjsJjlFO9ifq1UE0qxX48drAA5JTmZ9hrRX3gWFVki601NLl7/hqzkcRNxz0P3id DyJoMCl5ay3RBE4E6cK0pG1cbSrROsMNyU5cOupyojt9MlR7fuHg3y3XnYQKFSSf5fVr UPscL8P6emxps5d7pyxLfEiz6yixzUecTEOzY628qvv8ARFN1Krc2bw73GP6LdgoXiya xzEA== X-Gm-Message-State: ALKqPwe03bL4mFiARjHfReA1W4AmBXEmXk9JC82h/vgE5zP23jmr+Nmc rGO9Ejdenlvuyw6l5sMzL7MPFi18jACcdOcUgnE= X-Google-Smtp-Source: AB8JxZpJsg93kX84W7bcAnHe0p7QNbjoVWuj1OMHE3rU1NADQs3lNQ0eJ3MBzhAw7bPk96X5gFLF0Ijq+axYu7RqftY= X-Received: by 2002:a2e:9cc7:: with SMTP id g7-v6mr2473632ljj.141.1527274650131; Fri, 25 May 2018 11:57:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:1fc9:0:0:0:0:0 with HTTP; Fri, 25 May 2018 11:57:29 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <20180525183403.i3bt2npfc3fq2cgf@mutt-hbsd> References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> <20180525183403.i3bt2npfc3fq2cgf@mutt-hbsd> From: Marcelo Araujo Date: Sat, 26 May 2018 02:57:29 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Shawn Webb Cc: Brooks Davis , svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 18:57:32 -0000 Thanks Shawn, I think there are plenty of places to fix this case! Thanks for the extra work :D. 2018-05-26 2:34 GMT+08:00 Shawn Webb : > On Sat, May 26, 2018 at 02:26:33AM +0800, Marcelo Araujo wrote: > > 2018-05-26 2:21 GMT+08:00 Brooks Davis : > > > > > On Sat, May 26, 2018 at 01:56:28AM +0800, Marcelo Araujo wrote: > > > > 2018-05-26 1:44 GMT+08:00 Brooks Davis : > > > > > > > > > On Sat, May 26, 2018 at 01:21:33AM +0800, Marcelo Araujo wrote: > > > > > > On Sat, May 26, 2018, 1:11 AM Eitan Adler > > > wrote: > > > > > > > > > > > > > On 25 May 2018 at 08:23, Marcelo Araujo < > araujobsdport@gmail.com> > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > On Fri, May 25, 2018, 11:11 PM Brooks Davis < > brooks@freebsd.org> > > > > > wrote: > > > > > > > >> > > > > > > > >> On Fri, May 25, 2018 at 02:07:05AM +0000, Marcelo Araujo > wrote: > > > > > > > >> > Author: araujo > > > > > > > >> > Date: Fri May 25 02:07:05 2018 > > > > > > > >> > New Revision: 334199 > > > > > > > >> > URL: https://svnweb.freebsd.org/changeset/base/334199 > > > > > > > >> > > > > > > > > >> > Log: > > > > > > > >> > Fix a memory leak on topology_parse(). > > > > > > > >> > > > > > > > > >> > strdup(3) allocates memory for a copy of the string, > does > > > the > > > > > copy > > > > > > > and > > > > > > > >> > returns a pointer to it. If there is no sufficient > memory > > > NULL > > > > > is > > > > > > > >> > returned > > > > > > > >> > and the global errno is set to ENOMEM. > > > > > > > >> > We do a sanity check to see if it was possible to > allocate > > > > > enough > > > > > > > >> > memory. > > > > > > > >> > > > > > > > > >> > Also as we allocate memory, we need to free this memory > > > used. > > > > > Or it > > > > > > > >> > will > > > > > > > >> > going out of scope leaks the storage it points to. > > > > > > > >> > > > > > > > > >> > Reviewed by: rgrimes > > > > > > > >> > MFC after: 3 weeks. > > > > > > > >> > X-MFC: r332298 > > > > > > > >> > Sponsored by: iXsystems Inc. > > > > > > > >> > Differential Revision: > https://reviews.freebsd.org/ > > > D15550 > > > > > > > >> > > > > > > > > >> > Modified: > > > > > > > >> > head/usr.sbin/bhyve/bhyverun.c > > > > > > > >> > > > > > > > > >> > Modified: head/usr.sbin/bhyve/bhyverun.c > > > > > > > >> > > > > > > > > >> > > > > > > > > ============================================================ > > > > > ================== > > > > > > > >> > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 01:38:59 > 2018 > > > > > > > >> > (r334198) > > > > > > > >> > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 02:07:05 > 2018 > > > > > > > >> > (r334199) > > > > > > > >> > @@ -193,6 +193,7 @@ topology_parse(const char *opt) > > > > > > > >> > c = 1, n = 1, s = 1, t = 1; > > > > > > > >> > ns = false, scts = false; > > > > > > > >> > str = strdup(opt); > > > > > > > >> > + assert(str != NULL); > > > > > > > >> > > > > > > > >> Using assert seems like an odd choice when you've already > added > > > a > > > > > > > >> failure path and the strsep will crash immediately if > assert is > > > > > elided. > > > > > > > > > > > > > > > > > > > > > > > > Just to make a better point, I had the same discussion about > > > > > assert(3) in > > > > > > > > another review, we don't do NDEBUG even for RELEASE. > > > > > > > > > > > > > > IMHO we only use assert for asserting things ought to never be > > > false > > > > > > > except in buggy code. Using assert for handling is poor > practice. > > > > > > > > > > > > > > > > > > > Again, in this case we are using it all over the place and we > must > > > > > replace > > > > > > it. Also we should document it in somewhere perhaps in the > assert(3) > > > > > > otherwise myself and others will keep using it. If you use find, > not > > > only > > > > > > myself is using it to check strdup! So what is the suggestion to > > > handle > > > > > > assert(3)? Deprecated it? > > > > > > > > > > Code that uses assert() in place of error handling is wrong and > should > > > > > be fixed. assert(condition) means that condition must never happen > > > > > and if it does a bug has occurred (or the programmers assumptions > are > > > > > wrong). In this case failure would not be due to a bug, but do to > > > > > resource exhaustion which is expected to be handled. > > > > > > > > > > > > > I agree with you! We have plenty of place that use strdup(3) without > > > check > > > > the errno ENOMEN return; so do you think would be better bypass a > errno > > > > ENOMEN without check it and have a crash, or better abort(3) using > > > > assert(3) in case we have no memory available to allocated the memory > > > for a > > > > copy of a string? > > > > > > The correct code here would be one of: > > > > > > str = strdup(opt); > > > if (str == NULL) > > > goto out; > > > > > > > No, it is not the correct code! If we go out and free(str) we have > nothing > > to free, because we even didn't allocated memory for str. > > Hey Marcelo, > > I've authored this commit, which fixes the issues Brooks brought up > (and with which I agree): > > https://github.com/HardenedBSD/hardenedBSD/commit/ > 9c05b8def2c33e3889430cc2f54be0402a257366 > > Thanks, > > -- > Shawn Webb > Cofounder and Security Engineer > HardenedBSD > > Tor-ified Signal: +1 443-546-8752 > Tor+XMPP+OTR: lattera@is.a.hacker.sx > GPG Key ID: 0x6A84658F52456EEE > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-head@freebsd.org Fri May 25 18:57:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 165BFEF1293; Fri, 25 May 2018 18:57:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B25236EA49; Fri, 25 May 2018 18:57:42 +0000 (UTC) (envelope-from np@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6818824CD5; Fri, 25 May 2018 18:57:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PIvgL6073171; Fri, 25 May 2018 18:57:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PIvgwH073170; Fri, 25 May 2018 18:57:42 GMT (envelope-from np@FreeBSD.org) Message-Id: <201805251857.w4PIvgwH073170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 25 May 2018 18:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334217 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 334217 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 18:57:43 -0000 Author: np Date: Fri May 25 18:57:41 2018 New Revision: 334217 URL: https://svnweb.freebsd.org/changeset/base/334217 Log: cxgbe(4): Suppress a warning about code that is used only with options RATELIMIT. Reported by: mmacy@ Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri May 25 18:54:40 2018 (r334216) +++ head/sys/dev/cxgbe/t4_sge.c Fri May 25 18:57:41 2018 (r334217) @@ -2202,6 +2202,7 @@ needs_tcp_csum(struct mbuf *m) return (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_TCP_IPV6 | CSUM_TSO)); } +#ifdef RATELIMIT static inline int needs_udp_csum(struct mbuf *m) { @@ -2209,6 +2210,7 @@ needs_udp_csum(struct mbuf *m) M_ASSERTPKTHDR(m); return (m->m_pkthdr.csum_flags & (CSUM_UDP | CSUM_UDP_IPV6)); } +#endif static inline int needs_vlan_insertion(struct mbuf *m) From owner-svn-src-head@freebsd.org Fri May 25 19:00:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AC27EF1410; Fri, 25 May 2018 19:00:29 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1531B6ED4B; Fri, 25 May 2018 19:00:29 +0000 (UTC) (envelope-from kibab@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E676324D12; Fri, 25 May 2018 19:00:28 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PJ0S70073360; Fri, 25 May 2018 19:00:28 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PJ0S3m073359; Fri, 25 May 2018 19:00:28 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <201805251900.w4PJ0S3m073359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Fri, 25 May 2018 19:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334218 - head/sys/dev/mmc/host X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: head/sys/dev/mmc/host X-SVN-Commit-Revision: 334218 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:00:29 -0000 Author: kibab Date: Fri May 25 19:00:28 2018 New Revision: 334218 URL: https://svnweb.freebsd.org/changeset/base/334218 Log: Fix building GENERIC-MMCCAM on arm64 Since GENERIC includes quite a few drivers now, all MMC drivers should have appropriate MMCCAM-related ifdefs and include opt_mmccam.h so that those ifdefs are actually processed correctly. Reviewed by: manu Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D15569 Modified: head/sys/dev/mmc/host/dwmmc_rockchip.c Modified: head/sys/dev/mmc/host/dwmmc_rockchip.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc_rockchip.c Fri May 25 18:57:41 2018 (r334217) +++ head/sys/dev/mmc/host/dwmmc_rockchip.c Fri May 25 19:00:28 2018 (r334218) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include +#include "opt_mmccam.h" + enum RKTYPE { RK2928 = 1, RK3328, From owner-svn-src-head@freebsd.org Fri May 25 19:02:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1106EF160D for ; Fri, 25 May 2018 19:02:02 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr0-x236.google.com (mail-wr0-x236.google.com [IPv6:2a00:1450:400c:c0c::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F0E56F0D0 for ; Fri, 25 May 2018 19:02:02 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr0-x236.google.com with SMTP id k5-v6so10844691wrn.3 for ; Fri, 25 May 2018 12:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hJ/93NnVLvbLh+R4z7cPXQlof1PWSdXQKiOl/Bb28ws=; b=kldt2PUfjAJBAoVZxQPykTw7YBLHG+S1R9cd6dm13OKAuzUel0U0MLEV5W6KZm24yQ ZeewKtJuOF+xVi1DVhzoyZk/BF2mshr8e2uKaBe20rH31HhVrnbqd3jbAVMWLAnoG6We SjfWcJPk4aEisVqop1t6rdcdRiElZt0ShydROBHCQXn6XiJfLzBLKehiCPkqVG2qt/HI iOKF1EvFE+viI0HUbCBjybNDvAXSmbdmWG6suN74OtoLc4oXxTYzajGOYnbDn+WGmYgq QXRqSbnod/AP1aJszQG3Lb58kLtqo0KOe4/HszRjiX4dlYx/bdZoKxnOIK/qKK9AuCR/ lccg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hJ/93NnVLvbLh+R4z7cPXQlof1PWSdXQKiOl/Bb28ws=; b=txDCs+tWBu+BKliysqOx6OPd6T0wc4kJ2rQBbnJd+9vCIbBsMW8Blv1BB3vrHMx7tP 03BQvFfaVhIHkoM5GaTqg7Mhq8Eiw2ix0+nBchofwrwph54mxEZNRCyWTPr4jYacQj71 NZUvOvHn14C2xzub976eyVIiWKC3SSc5htjjuu7rsfq6aGe3aM3/Bpxh8IXsBTLXAsIE 5B0dwp1Me1Ov7+CC/extbdlU6BFLkblYbfaifARpJ/wDHi0lHjL9U2eKeLlbUaOW+SdJ bLhyLV8vW8jtjM8Pl9M7BaBz2f6eAy94NbZKN3IsIQq3qIwBfktExnJzajXCqQkGL1Tb P8hw== X-Gm-Message-State: ALKqPwczgFgProAuiZxcJdROX9QrjbfTqxRMjVpBQO2KV90DxmQIkbAF J8DkxGo0vFLi2NIR2tlzwEKN3w== X-Google-Smtp-Source: AB8JxZp9h4bW9XY584I24wAP0JTZ9cTbEUvGzf8wz1o4f5wrDoRHPAcsJGWETSOKjUTlFTt1PGZPqw== X-Received: by 2002:adf:9383:: with SMTP id 3-v6mr3369238wrp.224.1527274920870; Fri, 25 May 2018 12:02:00 -0700 (PDT) Received: from mutt-hbsd ([31.31.74.131]) by smtp.gmail.com with ESMTPSA id l5-v6sm7781836wrn.92.2018.05.25.12.01.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 May 2018 12:01:59 -0700 (PDT) Date: Fri, 25 May 2018 15:01:40 -0400 From: Shawn Webb To: araujo@freebsd.org Cc: Brooks Davis , svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve Message-ID: <20180525190140.5od5oyw2tapf3jrj@mutt-hbsd> References: <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> <20180525183403.i3bt2npfc3fq2cgf@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="otn35r76rwtx3r2n" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180323 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:02:02 -0000 --otn35r76rwtx3r2n Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 26, 2018 at 02:57:29AM +0800, Marcelo Araujo wrote: > Thanks Shawn, >=20 > I think there are plenty of places to fix this case! Thanks for the extra > work :D. Any time. I'm glad to help. If you'd like, I might have time on Sunday to audit bhyve's code to find and fix more of these cases. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --otn35r76rwtx3r2n Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlsIXZAACgkQaoRlj1JF bu66sQ/9HvcaaOP3Ijn0yGa6/deDfjpNcT2sEV6SGrsjAxtvtsevsz6jlcC+cY1P 4fSvCYh9LMrbole91PH0dwLPo8Wxu4yWYv+MDSq2xO1if7wpKUJIk/8WapGBHtsl 4D3D7VcSlv/n2eftBBcsx6lU8KyyzXjNjC5WFP8/fO+NpQZTiY0ENuqrh0TUv6/D I5p+XnIfjuDppPaYuqsm8khmJ1l+LRWhyuzyT4WTsLu2PpUCJ74OUgqRZU+NtnJ8 3z4npVwuwB+90s6htRlPSKQELtOpz2KIV8IbVamwV+I8lZsVjP8u0TO3UYVjb/ev CvLijVIGLvuR73G7sfaAYsfZ3w0QVdAlnDZ2Ieow8R5DJWxT6X1OL1Owk8IrAP4e TMynRKvpQJIwYlpelCDlx/t9HaiJ1GXi5gbi2EXG4oMNsCJN7Wsjqn+0b5+AHpoo 4rJtutXWevPPxgB9P8zVKwQEBl/d19ldc+41N7HsasBFTgcDBFzb6jXNLWXHkawC /XrzMBXqKL/D51AvM4AXXcspHY9GjzasS+Zse7W1bKzd+ufJK1ocvqIk1XmzvzLJ aIgWBjuIOO9NeZ4HBGXUyJslrhq2lPC+HNScMV1ZWi0Hnkzam4nOYVkG3Td1TSdS sRZhqKwSdx6k+5m+c6r6jUicRxZsTkiC/ysxsdyd0kCB5/XKJig= =u7Qp -----END PGP SIGNATURE----- --otn35r76rwtx3r2n-- From owner-svn-src-head@freebsd.org Fri May 25 19:04:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6952EF16CC; Fri, 25 May 2018 19:04:10 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 428756F2AB; Fri, 25 May 2018 19:04:10 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id f8-v6so17134951wmc.4; Fri, 25 May 2018 12:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=CpsDTEgg+GCsj+MoeyXWJWRi+4KcGFae7iaW97UMQcc=; b=Nf2eSvRORQulhdeVw/gMp/3Bof/X5KkdaLVd6FhjJxsMiveJtyOFaGyFg+ogxy2mYG d1+G/kuabl91TM2oGk8WkXnUMmQhyM7bwNe2QaFcE+wMeaqARo/Xz+skh5APvEmu2oq+ eJJ4IOzGcY/U4qw9mMW298QA7JdPn7PU2bcE3NXgNT7ifn3V6DzwdnnbMFqZxjnYLZFP 45/L0zPNsDS2d7//Bo/IgLosedsDVCk1ZxUnF0UIx4/CgN0otUjW/kTrCbCCAfQduCIW o2dyse14kwzgb6jNcFNwM/5uK5GhL5h752XMdFjKNm3RVdVflKaAi91QGWO2bt/D5YVg 8sZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=CpsDTEgg+GCsj+MoeyXWJWRi+4KcGFae7iaW97UMQcc=; b=XKZBXm8CJ5OEr9JcBdXozIB6X4GRlnwSQwO+6GWNjVQLMTNmIg1Ojdl61xA9nmFk6J ek6uFZtpQw5ShjJL6/qRbVLWmP+gXoZwJAB3EGpE6C0ZosJVH8o0O3IAwnxI9onQeW9r E0LIAl9pVattrDaz6DaxKJlzwgqciv5LCl0Q/M2NgxZkulJ3va/mttbWVnoTZ4fMWWMJ MqAJDQQfhsBYLFnXRV8j0RER4oEHJIV2YBKaynWtDsQU351or0nXhFr7LJmmQIoBSnq1 /1LOACk18fnnVzFgL321i8Rb/m2noUG/FAHkq/B4gO8c7DfVVS5JlwRedXdV/1J+SFG3 CYQw== X-Gm-Message-State: ALKqPwfhwgXNm32cINkJjZJTx11iXPCjIdvDP6x8iu+4difie0DIoIqx 13jusmbdoHDENdvGPNIVPMP3OLHSvpGaa2SNnnkFbg== X-Google-Smtp-Source: ADUXVKKNtyXMcPgnCs0MQ1uRtiyUwJXAiAb3WDPFXQGtEB1iGXWL8w4altQi6G/HzEXGItOAf4sSRg9KkUQ0Qo0XiDs= X-Received: by 2002:a2e:8246:: with SMTP id j6-v6mr2510438ljh.72.1527275049287; Fri, 25 May 2018 12:04:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:1fc9:0:0:0:0:0 with HTTP; Fri, 25 May 2018 12:04:08 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <20180525190140.5od5oyw2tapf3jrj@mutt-hbsd> References: <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> <20180525183403.i3bt2npfc3fq2cgf@mutt-hbsd> <20180525190140.5od5oyw2tapf3jrj@mutt-hbsd> From: Marcelo Araujo Date: Sat, 26 May 2018 03:04:08 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Shawn Webb Cc: Brooks Davis , svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:04:11 -0000 2018-05-26 3:01 GMT+08:00 Shawn Webb : > On Sat, May 26, 2018 at 02:57:29AM +0800, Marcelo Araujo wrote: > > Thanks Shawn, > > > > I think there are plenty of places to fix this case! Thanks for the extra > > work :D. > > Any time. I'm glad to help. If you'd like, I might have time on Sunday > to audit bhyve's code to find and fix more of these cases. > Doesn't hurt and I think it is very welcome! Best, > > Thanks, > > -- > Shawn Webb > Cofounder and Security Engineer > HardenedBSD > > Tor-ified Signal: +1 443-546-8752 > Tor+XMPP+OTR: lattera@is.a.hacker.sx > GPG Key ID: 0x6A84658F52456EEE > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-head@freebsd.org Fri May 25 19:08:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A56DEEF179E; Fri, 25 May 2018 19:08:57 +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 002ED6F45A; Fri, 25 May 2018 19:08:56 +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 w4PJ8khd030235 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 25 May 2018 22:08:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w4PJ8khd030235 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w4PJ8kBW030234; Fri, 25 May 2018 22:08:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 25 May 2018 22:08:46 +0300 From: Konstantin Belousov To: Marcelo Araujo Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334216 - head/usr.sbin/bhyve Message-ID: <20180525190846.GL88128@kib.kiev.ua> References: <201805251854.w4PIseSi073002@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201805251854.w4PIseSi073002@repo.freebsd.org> User-Agent: Mutt/1.10.0 (2018-05-17) 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:08:57 -0000 On Fri, May 25, 2018 at 06:54:40PM +0000, Marcelo Araujo wrote: > Author: araujo > Date: Fri May 25 18:54:40 2018 > New Revision: 334216 > URL: https://svnweb.freebsd.org/changeset/base/334216 > > Log: > After a long discussion about assert(3), we gonna use a HardenedBSD > approach to chek strdup(3) memory allocation. > > Submitted by: Shaw Webb > Reported by: brooks > Obtained from: HardenedBSD > > Modified: > head/usr.sbin/bhyve/bhyverun.c > > Modified: head/usr.sbin/bhyve/bhyverun.c > ============================================================================== > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 18:11:13 2018 (r334215) > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 18:54:40 2018 (r334216) > @@ -193,7 +193,8 @@ topology_parse(const char *opt) > c = 1, n = 1, s = 1, t = 1; > ns = false, scts = false; > str = strdup(opt); > - assert(str != NULL); > + if (str == NULL) > + goto out; > > while ((cp = strsep(&str, ",")) != NULL) { > if (sscanf(cp, "%i%n", &tmp, &chk) == 1) { > @@ -225,6 +226,7 @@ topology_parse(const char *opt) > goto out; > } > free(str); > + str = NULL; > > /* > * Range check 1 <= n <= UINT16_MAX all values > @@ -253,7 +255,8 @@ topology_parse(const char *opt) > return(0); > > out: > - free(str); > + if (str != NULL) This check is useless. Free(3) is fine handling NULL argument. > + free(str); > return (-1); > } > From owner-svn-src-head@freebsd.org Fri May 25 19:12:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D335CEF1985; Fri, 25 May 2018 19:12:31 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88F096F921; Fri, 25 May 2018 19:12:31 +0000 (UTC) (envelope-from araujo@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B20125029; Fri, 25 May 2018 19:12:31 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PJCV1Q083025; Fri, 25 May 2018 19:12:31 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PJCVmC083024; Fri, 25 May 2018 19:12:31 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201805251912.w4PJCVmC083024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 25 May 2018 19:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334219 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 334219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:12:32 -0000 Author: araujo Date: Fri May 25 19:12:30 2018 New Revision: 334219 URL: https://svnweb.freebsd.org/changeset/base/334219 Log: We don't need check if str is NULL as free(3) will handle NULL argument. Reported by: kib@ Modified: head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 19:00:28 2018 (r334218) +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 19:12:30 2018 (r334219) @@ -255,8 +255,7 @@ topology_parse(const char *opt) return(0); out: - if (str != NULL) - free(str); + free(str); return (-1); } From owner-svn-src-head@freebsd.org Fri May 25 19:13:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 096D1EF19D0; Fri, 25 May 2018 19:13:13 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 787706FA6A; Fri, 25 May 2018 19:13:12 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id q4-v6so14752672wmq.1; Fri, 25 May 2018 12:13:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=gbmmhzbhKvr5s1V78RnIZ9+vqJcUVI2MBw/tA3EbnLw=; b=dX3kATkztrHwo8IVh2/dRX9hnN93FDS6MAISaL3MLBRfVFjbS4gbz/hnlrAYpxI7p+ wjItjaidYYlaJ3xJrqqH21lX8j3qWkt+EAwcMPjl9k8Exf5DnUlVQu0km7CNTq6bidRI 2dZ7/LFW5vQREazcZoGct3F+OqBvO5lK4AWAvLDUyG7+OxAIguQ1VfXnlKYo6hEF6ZGC x0EHIGc6y1QN33O2pEBtS/76nA3OxFNZwnt0yxlohBX/a9y6R1xPFdgygGLKEJKIWMZn ddbIyDiywlbWj6vi1c8E02Jlukg2ZZggGEDh0koXDHODk4YXt/VqAMVQETZkc6iCjiBY QdXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=gbmmhzbhKvr5s1V78RnIZ9+vqJcUVI2MBw/tA3EbnLw=; b=t7GUvRZGncndh4vP8S5NyxsZvR130aepW0+NLQJvr5bB4OA/qOEK8XNp96HBVtTpJX yCF/HF3n73vpwoFjfVyPGStffP2mpb+N9jm2zko4CgbYXXWGkT/L3vZlyXEPfSIs905r y3w/kFvgJhbadZu4KsaOdYBpY3QCkt2RMdrNfbblOn+ItDEsWe+UrvckuecJLv9WQo+Y Sn4U8IgvjVXefQ+7z68iIQQ0lL7SavXBctSkF4ac6/A0ujCo/+0ln5LNY9n8OS0FBXe+ CuwF5b/dKI7r6Sb592vEZbRgmUvngyOPi5xs14auMdH9+j6M/tNzQjzcU4U9L8jeHoSG vNAg== X-Gm-Message-State: ALKqPwd/bQbh4IteSW6HDWD6WWHSkbn/msfK1peMsYWU6mya9LceGUcQ RC2hkmVQV56fa/fo+rgErbvktwdRsT7ICnsc5k4= X-Google-Smtp-Source: AB8JxZplxFYPIT68IdTZ4GmkzqA/r1iyQxy9BhLRTx3Mbsz/+f4d45QftYtcyq+HYeMeB/watA0QZPkK3dOE4QVtG5k= X-Received: by 2002:a2e:9cc7:: with SMTP id g7-v6mr2501316ljj.141.1527275591528; Fri, 25 May 2018 12:13:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:1fc9:0:0:0:0:0 with HTTP; Fri, 25 May 2018 12:13:10 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <20180525190846.GL88128@kib.kiev.ua> References: <201805251854.w4PIseSi073002@repo.freebsd.org> <20180525190846.GL88128@kib.kiev.ua> From: Marcelo Araujo Date: Sat, 26 May 2018 03:13:10 +0800 Message-ID: Subject: Re: svn commit: r334216 - head/usr.sbin/bhyve To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:13:13 -0000 Fixed at r334219. Thanks. 2018-05-26 3:08 GMT+08:00 Konstantin Belousov : > On Fri, May 25, 2018 at 06:54:40PM +0000, Marcelo Araujo wrote: > > Author: araujo > > Date: Fri May 25 18:54:40 2018 > > New Revision: 334216 > > URL: https://svnweb.freebsd.org/changeset/base/334216 > > > > Log: > > After a long discussion about assert(3), we gonna use a HardenedBSD > > approach to chek strdup(3) memory allocation. > > > > Submitted by: Shaw Webb > > Reported by: brooks > > Obtained from: HardenedBSD > > > > Modified: > > head/usr.sbin/bhyve/bhyverun.c > > > > Modified: head/usr.sbin/bhyve/bhyverun.c > > ============================================================ > ================== > > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 18:11:13 2018 > (r334215) > > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 18:54:40 2018 > (r334216) > > @@ -193,7 +193,8 @@ topology_parse(const char *opt) > > c = 1, n = 1, s = 1, t = 1; > > ns = false, scts = false; > > str = strdup(opt); > > - assert(str != NULL); > > + if (str == NULL) > > + goto out; > > > > while ((cp = strsep(&str, ",")) != NULL) { > > if (sscanf(cp, "%i%n", &tmp, &chk) == 1) { > > @@ -225,6 +226,7 @@ topology_parse(const char *opt) > > goto out; > > } > > free(str); > > + str = NULL; > > > > /* > > * Range check 1 <= n <= UINT16_MAX all values > > @@ -253,7 +255,8 @@ topology_parse(const char *opt) > > return(0); > > > > out: > > - free(str); > > + if (str != NULL) > This check is useless. Free(3) is fine handling NULL argument. > > > + free(str); > > return (-1); > > } > > > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-head@freebsd.org Fri May 25 19:35:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0A28EF1FED for ; Fri, 25 May 2018 19:35:33 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B25270800 for ; Fri, 25 May 2018 19:35:33 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wm0-x22b.google.com with SMTP id j4-v6so17102373wme.1 for ; Fri, 25 May 2018 12:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PuSxm9Fch/IuRG8NCV5EKJYow+f00tWALotpMhozFn4=; b=hQm4bEMeqSnU6HNtRo02genOgOmHFtGkj+Cjw7vEyIM5Tv4q33trLGezZ/TCvlllC4 S5kaZrEJTQk/D+gfipt3T2J+ooj/8elTIw6WZasbecAkURMUDda2PQCNwhzJepOuENzm xqxx3I9qZhAdE+xutz6SwM3mqyQpfxX9FPzXIKn/HLSOuY44L9OqZ48FWcYmo+gMyHhV xdlf9gMYWc0V+l9rxzX2bnB63J5P/6fVC49M0nL3HXBu1wy7Tqm5wjdo+mDKrokgkQZ8 nxnar4z+Bjq1rgb/wnL7/oEE2YwT9kIOLQJFtHQ57csHQVX042EeL3AjNWnV2C6N9ou1 +W/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PuSxm9Fch/IuRG8NCV5EKJYow+f00tWALotpMhozFn4=; b=Y1h8mdR84grfKJnSNkB7fsxXntBc10UHbnMvJKzJYnBXdfSw96FOYBRQ3NPUM8SP/K 8yDKluOg5V9Jw3WRSQxoChdz5fxvgiWwIEeSlBqseM8w05mqhPFDRy2JBdH56h19964Y 6jJZph7gNs588JXjo6MpQcEcIRHmL956VBkmNR7lgT5r53tDYf30/4Afa3GxvxGxaKo7 S9Ce0fEFXjexB6RYgRoShXXeqzOjksH8RruJtp/8eNnAyrwHeATVAqM6M6uNNue7c7tt /EroG6HhZxXrT/xUEVqWsO/R58EHrwZ00gCIgAmlUS9PYw+xN1wt2xuaJBGaQCG0w5Cg pLXw== X-Gm-Message-State: ALKqPweinLo/nW45x3NXXTYsZ/1VwULvXN5ZNlM+MIl+Bt30qUXn3Zu4 wFSd74szgvz7UCy6TpVw/jJ8pQ== X-Google-Smtp-Source: ADUXVKL/Dlo3xGSVJBfirIa12kZ5BYCepMjaxVIg3LGwvdPTH+azGlWe56GHQhUYakTOdLN4FIaM0g== X-Received: by 2002:a1c:ec82:: with SMTP id h2-v6mr2522206wmi.137.1527276931974; Fri, 25 May 2018 12:35:31 -0700 (PDT) Received: from mutt-hbsd ([91.203.145.9]) by smtp.gmail.com with ESMTPSA id n23-v6sm6564545wmc.23.2018.05.25.12.35.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 May 2018 12:35:30 -0700 (PDT) Date: Fri, 25 May 2018 15:35:14 -0400 From: Shawn Webb To: Konstantin Belousov Cc: Marcelo Araujo , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r334216 - head/usr.sbin/bhyve Message-ID: <20180525193514.jsh2l674xlhq6b7d@mutt-hbsd> References: <201805251854.w4PIseSi073002@repo.freebsd.org> <20180525190846.GL88128@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ttoaj4wfu3jzojbt" Content-Disposition: inline In-Reply-To: <20180525190846.GL88128@kib.kiev.ua> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180323 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:35:34 -0000 --ttoaj4wfu3jzojbt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 25, 2018 at 10:08:46PM +0300, Konstantin Belousov wrote: > On Fri, May 25, 2018 at 06:54:40PM +0000, Marcelo Araujo wrote: > > Author: araujo > > Date: Fri May 25 18:54:40 2018 > > New Revision: 334216 > > URL: https://svnweb.freebsd.org/changeset/base/334216 > >=20 > > Log: > > After a long discussion about assert(3), we gonna use a HardenedBSD > > approach to chek strdup(3) memory allocation. > > =20 > > Submitted by: Shaw Webb > > Reported by: brooks > > Obtained from: HardenedBSD > >=20 > > Modified: > > head/usr.sbin/bhyve/bhyverun.c > >=20 > > Modified: head/usr.sbin/bhyve/bhyverun.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/usr.sbin/bhyve/bhyverun.c Fri May 25 18:11:13 2018 (r334215) > > +++ head/usr.sbin/bhyve/bhyverun.c Fri May 25 18:54:40 2018 (r334216) > > @@ -193,7 +193,8 @@ topology_parse(const char *opt) > > c =3D 1, n =3D 1, s =3D 1, t =3D 1; > > ns =3D false, scts =3D false; > > str =3D strdup(opt); > > - assert(str !=3D NULL); > > + if (str =3D=3D NULL) > > + goto out; > > =20 > > while ((cp =3D strsep(&str, ",")) !=3D NULL) { > > if (sscanf(cp, "%i%n", &tmp, &chk) =3D=3D 1) { > > @@ -225,6 +226,7 @@ topology_parse(const char *opt) > > goto out; > > } > > free(str); > > + str =3D NULL; > > =20 > > /* > > * Range check 1 <=3D n <=3D UINT16_MAX all values > > @@ -253,7 +255,8 @@ topology_parse(const char *opt) > > return(0); > > =20 > > out: > > - free(str); > > + if (str !=3D NULL) > This check is useless. Free(3) is fine handling NULL argument. Good catch. Thanks! --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --ttoaj4wfu3jzojbt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlsIZW8ACgkQaoRlj1JF bu61BhAAxyOGMsdmz2oHuymLmI/85evKlt/k2gr0zXOzzaUAxrOhE0skV2UOBtlu Ze6af5cVwka3035C+HWm8Bcuqw9t+EfkWQ4/1qgCMj86b5izOWriqwhB/D9sIISk GMrMZnnDHZOa6A2+5k/fZXGs5zJamLEWawBfWHhFf4IQnoyAQSJ4RlEG56QlwI52 xauGv2Sn+KKnQEDuwfjGYC3DtrkGiMtdH1OkahxYvMamrNjIBaGl3hCi1USDJMLM ZBlPen5FDDN/0seNawzRMIJmcBRvEGiom5C+Z0IxqZ0DYeBev1kDqdB6e69F7rOG 3YKiLJ7se4sutcwy3xyRfzUsU6kULwvIgnnRZtSKylNg+r0qgNkGZanucQcNRaFs ki9C5ZFIfw/NqAmhHpKCu6AhgETX5tl8MtxtCOBQ//tgnvRw/xrhCmXTgZeMVXW6 wdObYqKb4KZr4I0+eDJNQ9yptpWDEw/ryjht8T2z/nE0cchDJkdA69P0+2hXxzV8 mtobbd7RgXJt7hx6Hyn6tFqCAVYgnnOjxXJBnkjSLN11dqy8EuNIxKzwifCKTxKx UwOgg0GgMOn3aLTat3NNAkwdmxx6e1Kfc9HuWwBjowR8Eu5jKtZVYjtRBqaCtQct d+MgFX5IsRxcCZfcY+17P/wPmWi2Qa/rf2biTTX3TS93iMrZ52A= =vRX3 -----END PGP SIGNATURE----- --ttoaj4wfu3jzojbt-- From owner-svn-src-head@freebsd.org Fri May 25 19:36:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E1CBEF2055; Fri, 25 May 2018 19:36:27 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C57EC7094C; Fri, 25 May 2018 19:36:26 +0000 (UTC) (envelope-from feld@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A20BE25390; Fri, 25 May 2018 19:36:26 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PJaQcl093394; Fri, 25 May 2018 19:36:26 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PJaQIf093393; Fri, 25 May 2018 19:36:26 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201805251936.w4PJaQIf093393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Fri, 25 May 2018 19:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334221 - head/etc X-SVN-Group: head X-SVN-Commit-Author: feld X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 334221 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:36:27 -0000 Author: feld (ports committer) Date: Fri May 25 19:36:26 2018 New Revision: 334221 URL: https://svnweb.freebsd.org/changeset/base/334221 Log: rc.subr: Support loading environmental variables from a file The current support for setting environment via foo_env="" in rc.conf is not scalable and does not handle envs with spaces in the value. It seems a common pattern for some newer software is to skip configuration files altogether and rely on the env. This is well supported in systemd unit files and may be the inspiration for this trend. MFH: 1 week Differential Revision: https://reviews.freebsd.org/D14453 Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Fri May 25 19:16:05 2018 (r334220) +++ head/etc/rc.subr Fri May 25 19:36:26 2018 (r334221) @@ -754,6 +754,8 @@ check_startmsgs() # # ${name}_env n Environment variables to run ${command} with. # +# ${name}_env_file n File to source variables to run ${command} with. +# # ${name}_fib n Routing table number to run ${command} with. # # ${name}_nice n Nice level to run ${command} at. @@ -954,7 +956,14 @@ run_rc_command() _group=\$${name}_group _groups=\$${name}_groups \ _fib=\$${name}_fib _env=\$${name}_env \ _prepend=\$${name}_prepend _login_class=\${${name}_login_class:-daemon} \ - _limits=\$${name}_limits _oomprotect=\$${name}_oomprotect + _limits=\$${name}_limits _oomprotect=\$${name}_oomprotect \ + _env_file=\$${name}_env_file + + if [ -n "$_env_file" ] && [ -r "${_env_file}" ]; then # load env from file + set -a + . $_env_file + set +a + fi if [ -n "$_user" ]; then # unset $_user if running as that user if [ "$_user" = "$(eval $IDCMD)" ]; then From owner-svn-src-head@freebsd.org Fri May 25 19:45:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2722AEF23FE; Fri, 25 May 2018 19:45:34 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95B8070F32; Fri, 25 May 2018 19:45:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x242.google.com with SMTP id f21-v6so7607265iob.13; Fri, 25 May 2018 12:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cN0XSH1f+pCSffHajDTl6rPvAn9yder9oL8zKklZ+E4=; b=Mwq3NiPIt+OOi0UzjW+Wxd5J0XPjR98eEv0l1VG2CHnuuJIuwfPS6AGevQygWx91H9 K76sZfzeQMHLY32k8dxfPYhVlf5gMXpDeDetnB2Aowo716+49ADYbTv277/GW0tc/N+T U68IjYtZDOVBxFJgfOPVX+EJCCeJgM+XaUU8+cPV9bIDl268F5DEez5J9NjId9ZZnYrO E4uhjZCFmo+ftJ3GlsMyyU9QRuOt0W5SLxn9KNcGWorUZ+M5O55uc7dYDiutTZxU826e oHq3Pvj/wuyp8e8hWknDcVvg7JIFzDicZ2EqJ71IhDFaLGBU43KaMxHN5uJNiqSybmPb kvRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cN0XSH1f+pCSffHajDTl6rPvAn9yder9oL8zKklZ+E4=; b=hW1OYR1bgX8ukStYHax7vaj3AlZwJkO9cWobq95AOVb2k+IebyyIFl+aSq4/MQCivd h4Q6wtIOgT2MxIj04MmTVyRJ3mMunWkuGESDToeKRlJyNPClcH575heicXkC2dwx27rs gvwwJN3/Et0VNvTtrBizaoW66LYw07uRc3NjrWPJM9mPA3JB5vQzVmPHadqJxQ1bt+kS ao3Oazm5pnH57OzbG6TNEGBPgwCZCEPVaBlvvXY2OidGiaCneB7wQEpSwPWhkM//tJTj 4doEctLCebOICZ5DMs1KzV2Z710dId93iUoF+L9DsB4oE6Ch62kgO0sm1rn3hHXCTQ44 Q22Q== X-Gm-Message-State: ALKqPwet2R3MgTAOEA2m4UhSy3E8tqlylWHAvkF8VV9nEzwGrgKJE7De KafIVSCG5sCEoUfmSJ/w17Ap+HTaCBQuNP5XW095IQ== X-Google-Smtp-Source: ADUXVKKITyV7SlO1b11C9zlAAdRpfBkoLofX3v4N3NZlQCfJERo5S7Ygx0mYdpQKPx8hJfFWQw/d8DJ9l3WAjdfodtY= X-Received: by 2002:a6b:298c:: with SMTP id p134-v6mr1951685iop.288.1527277532682; Fri, 25 May 2018 12:45:32 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:8851:0:0:0:0:0 with HTTP; Fri, 25 May 2018 12:45:10 -0700 (PDT) In-Reply-To: <201805251854.w4PIseSi073002@repo.freebsd.org> References: <201805251854.w4PIseSi073002@repo.freebsd.org> From: Ed Maste Date: Fri, 25 May 2018 15:45:10 -0400 X-Google-Sender-Auth: nhkI5onOvL2m4s2HnjckCXn3xW8 Message-ID: Subject: Re: svn commit: r334216 - head/usr.sbin/bhyve To: Marcelo Araujo Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:45:34 -0000 On 25 May 2018 at 14:54, Marcelo Araujo wrote: > Author: araujo > Date: Fri May 25 18:54:40 2018 > New Revision: 334216 > URL: https://svnweb.freebsd.org/changeset/base/334216 > > Log: > After a long discussion about assert(3), we gonna use a HardenedBSD > approach to chek strdup(3) memory allocation. I'm not sure what you mean by "a HardenedBSD approach" here -- checking return values is just proper practice. From owner-svn-src-head@freebsd.org Fri May 25 19:48:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8F4BEF2887; Fri, 25 May 2018 19:48:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CE7571225; Fri, 25 May 2018 19:48:27 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6870F25549; Fri, 25 May 2018 19:48:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PJmRTi098245; Fri, 25 May 2018 19:48:27 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PJmRbj098244; Fri, 25 May 2018 19:48:27 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805251948.w4PJmRbj098244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 25 May 2018 19:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334222 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 334222 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:48:28 -0000 Author: mmacy Date: Fri May 25 19:48:26 2018 New Revision: 334222 URL: https://svnweb.freebsd.org/changeset/base/334222 Log: rtrequest1_fib: we need to always bump the ifaddr refcount when we take a reference from an rtentry. r334118 introduced a case when this was not done. While we're here make the intent more obvious by moving the refcount bump down to when we know we'll actually need it. Reported by: markj Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Fri May 25 19:36:26 2018 (r334221) +++ head/sys/net/route.c Fri May 25 19:48:26 2018 (r334222) @@ -1586,12 +1586,9 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru error = rt_getifa_fib(info, fibnum); if (error) return (error); - } else - ifa_ref(info->rti_ifa); - ifa = info->rti_ifa; + } rt = uma_zalloc(V_rtzone, M_NOWAIT); if (rt == NULL) { - ifa_free(ifa); return (ENOBUFS); } rt->rt_flags = RTF_UP | flags; @@ -1600,7 +1597,6 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru * Add the gateway. Possibly re-malloc-ing the storage for it. */ if ((error = rt_setgate(rt, dst, gateway)) != 0) { - ifa_free(ifa); uma_zfree(V_rtzone, rt); return (error); } @@ -1623,6 +1619,8 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru * This moved from below so that rnh->rnh_addaddr() can * examine the ifa and ifa->ifa_ifp if it so desires. */ + ifa = info->rti_ifa; + ifa_ref(ifa); rt->rt_ifa = ifa; rt->rt_ifp = ifa->ifa_ifp; rt->rt_weight = 1; From owner-svn-src-head@freebsd.org Fri May 25 19:51:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35D4EEF2B0E; Fri, 25 May 2018 19:51:19 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAAA37145B; Fri, 25 May 2018 19:51:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x236.google.com with SMTP id e20-v6so8235676itc.1; Fri, 25 May 2018 12:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9nL5sVLXuqqbhkwsBv11kGhnsfX3Op4Ppgi6dIc3dtw=; b=chygsn1a+Sx+eeMUT/Vw3OP6qOYwxqNBsELZe11mqz9gyRWP5/2TuXYvdSh7i5Fnpa jjJ3N6pOWC0dMm+OKE1RCW/ThLe58e4KkjPhCbu66GPDO/o6Rv7eXjrZGR5yzznuAJ4c 8t6A9/OaZ36WQIL4Ovis25J6Yksn24WMr+JNu8r33+8FY9DI2YpHQothUeoXfXWrO5H+ FvnTe867Q2bKlYc1zNMqri+Za5iohvBaAXYVKBkvAMs58EUSa1ps5vHxXfCFRRGx/H33 /7JTNRvlT/qiU8WMmg6hiE35YXYrXZ9en2gIlKJZZZ2mATNbKeeqkCXotr7s4KoXBeet HB9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9nL5sVLXuqqbhkwsBv11kGhnsfX3Op4Ppgi6dIc3dtw=; b=dDxEFaVk8jNS4yY0vIUvYRfgjv6rcSVNlyScnoJKGjoCx5Sn3dFnBSquwGgH+mJRfC hPhQeQ7/h81QAA0iqFB3oBG4e/CzVIV82nnLU5W522A/YFrj+UplhXmBd53VfVAJygwZ pL/O99EdFZuIL9PsSpVZKo890rMI0yHuH+9OkDWxsjjzP4Q2eIU3ath5xnVHuBUAv7KP u1Q/XuUtmn59U1+bbglVfg5/suP1+88QpOxD4qoSj0uM/073WUvcD9f2NQPCKO6BKpAY SUqod0U7p5PHPnMbwjR09ynEtrkvXLfOIgB/qLwhKOAQv4dCGDeo3kCKiKtM3B6CPV06 qMuw== X-Gm-Message-State: ALKqPwd2yQXnWnnS5mt9HHrDSNEVkoBADcXPxJ3EKvfZfUAFDUFJq08H CoR28JrZg1UGuuEmmMsrDz3krJglcUOSGsBT544c5Q== X-Google-Smtp-Source: AB8JxZrQ3B61HEheYH42cW8k7UTCoAhJNEVGF2ByOM77Phcv60Z+/5pnJ2u9x+HtA4+Ykotww+IQQvJ5PkHV0dKwvXI= X-Received: by 2002:a24:3555:: with SMTP id k82-v6mr3301863ita.49.1527277878025; Fri, 25 May 2018 12:51:18 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:8851:0:0:0:0:0 with HTTP; Fri, 25 May 2018 12:50:57 -0700 (PDT) In-Reply-To: References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> From: Ed Maste Date: Fri, 25 May 2018 15:50:57 -0400 X-Google-Sender-Auth: Odv5xI00AcwwCvH-JpdY5Uo0YWM Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Marcelo Araujo Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 19:51:19 -0000 On 25 May 2018 at 14:29, Marcelo Araujo wrote: > > One more thing, exit with err(1) is wrong, 1 is EPERM and should be 12 > ENOMEN! :D No, please see the err(3) manpage - err's first argument is the exit code for the program, not an errno. (err suggests using exit codes from sysexits(3), but there is much disagreement about that. Either way it's not an errno.) From owner-svn-src-head@freebsd.org Fri May 25 20:03:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 985EDEF2F0E; Fri, 25 May 2018 20:03:00 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 300A871CED; Fri, 25 May 2018 20:03:00 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x232.google.com with SMTP id e20-v6so8273142itc.1; Fri, 25 May 2018 13:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=dkfLG56k44pB2Ze2kcgAIXxctRAM0PX+81gBrF858JQ=; b=hk7rVznwGo0HMkEqvJdcFdp9jN0I5LughEkxBJ2DIrWDBG7W25U/ZYXQ1Sy0+tXF3/ pzRLTw0glXB82GVFEVtN0hGl9F9wyddxrY+lAGYXYgI1NWQ6rzEw3jrbx9fNDsDiwWUn YiDgKHNmfromMEeqF4rUZ2mbOw5/pvw8shFjc71YJ/DcHQIecyqgf1UfM7Eqt5GZ+s39 nEfH2GzJyHQ6dZkoI8OQZw4izl7uewWTpTBpDGRONrl3N3rcHLz/qbrYvnPqPU/3oRSu uHt5U1rdAQnuhOTlQaLbktuppjiUrJaB8O8Uo5qi4A9NHlHQl8ejIMS3iWJlCIJSgtk7 UU9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=dkfLG56k44pB2Ze2kcgAIXxctRAM0PX+81gBrF858JQ=; b=FybGFlZJv0ewRrhvbxmO3nUJafW0ZBdJhnN+BBQmYFfsbpUhtwgRyNtwPd51su1NTl M0Ggg6dHhDj0HkZ5YsFfLML8XhTE2lpSZQDnR27bOeLGLH6HwdzYulSwpCZxFXZdxD4/ WMzsHE879PNjrzRd92uBT8D78sg5OYye4/FHNf1qAH676yGiZqiGiQ+gxDArLCxE1PKx 3nt7mjwD9G/3NGcGIla0VoARDxGisk/jxMIZSies0Qii5S8lbXpHrIWOV+245F5FrZ8O ZLg89UzdG4xBPXDuSyanUOy2aW2ferzRW14dQ2rM+ItferG8SeqDZ7g8KU9aT1DsQWkc 9ioA== X-Gm-Message-State: ALKqPwdpUs54fDUwGD3u/OibE5PzDLmkkwnk0XS25YHwCz8FIvfc7HIN 3fisQmJV3UAgzUYEcHgObp5EsNw3wZ/xaYd1JiwhTg== X-Google-Smtp-Source: AB8JxZpL0IBa7Wg+Nnmkp1vZqLEqJTa4Onw4fLSwiHSsRMYOnGgOM75dtC6HG+DsiqyAwrxCKZEiJPgSS3n/rAEuwxQ= X-Received: by 2002:a24:8b41:: with SMTP id g62-v6mr3440748ite.114.1527278579360; Fri, 25 May 2018 13:02:59 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:82a7:0:0:0:0:0 with HTTP; Fri, 25 May 2018 13:02:38 -0700 (PDT) In-Reply-To: References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> From: Ed Maste Date: Fri, 25 May 2018 16:02:38 -0400 X-Google-Sender-Auth: J0Dr5avlUo4UE7_DJyU6ZXzrSIg Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Marcelo Araujo Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:03:00 -0000 On 25 May 2018 at 14:26, Marcelo Araujo wrote: > >> The fact that we don't do NDEBUG builds normally does not allow us to >> ignore that it exists. It's perfectly reasonable for a user to build >> with CFLAGS+=NDEBUG. That need to work. If code is going to fail to >> handle resource errors with NDEBUG set then it needs something like this >> at the top of the file: > > Please document it in some place! NDEBUG is documented in assert(3). The man page should have more of an explanation (and examples) of the possible pitfalls of assert() though. From owner-svn-src-head@freebsd.org Fri May 25 20:08:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4B8FEF2FFF; Fri, 25 May 2018 20:08:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A5E871EC9; Fri, 25 May 2018 20:08:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id EA6747B84; Fri, 25 May 2018 20:08:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 248B9419; Fri, 25 May 2018 20:08:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id ORu45hOl6a9y; Fri, 25 May 2018 20:08:54 +0000 (UTC) To: Matt Macy , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 16BFB414 References: <201805240430.w4O4U6Js001134@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Subject: Re: svn commit: r334128 - in head: . lib/libpmcstat lib/libpmcstat/pmu-events lib/libpmcstat/pmu-events/arch lib/libpmcstat/pmu-events/arch/arm64 lib/libpmcstat/pmu-events/arch/arm64/arm lib/libpmcstat... Message-ID: Date: Fri, 25 May 2018 13:08:54 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201805240430.w4O4U6Js001134@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5A7xcxOCbMT9DXKZfXWZcU8v889phVa5o" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:08:58 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5A7xcxOCbMT9DXKZfXWZcU8v889phVa5o Content-Type: multipart/mixed; boundary="nLTYkr8l3ZYwmGdN808jGQfO2df1OzYio"; protected-headers="v1" From: Bryan Drewery To: Matt Macy , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r334128 - in head: . lib/libpmcstat lib/libpmcstat/pmu-events lib/libpmcstat/pmu-events/arch lib/libpmcstat/pmu-events/arch/arm64 lib/libpmcstat/pmu-events/arch/arm64/arm lib/libpmcstat... References: <201805240430.w4O4U6Js001134@repo.freebsd.org> In-Reply-To: <201805240430.w4O4U6Js001134@repo.freebsd.org> --nLTYkr8l3ZYwmGdN808jGQfO2df1OzYio Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/23/2018 9:30 PM, Matt Macy wrote: > Author: mmacy > Date: Thu May 24 04:30:06 2018 > New Revision: 334128 > URL: https://svnweb.freebsd.org/changeset/base/334128 >=20 > Log: > libpmcstat: compile in events based on json description >=20 > Added: > head/lib/libpmcstat/libpmcstat_pmu_util.c (contents, props changed)= > head/lib/libpmcstat/pmu-events/ > head/lib/libpmcstat/pmu-events/Makefile (contents, props changed) =2E.. > # cat lib/libpmcstat/pmu-events/Makefile > # $FreeBSD$ >=20 > PROG=3Djevents > SRCS=3Djevents.c jsmn.c json.c > CFLAGS+=3D -Wno-cast-qual > .PATH: ${.CURDIR} > build-tools: jevents > MAN=3D > .include Several things wrong here and in lib/libpmcstat/Makefile 1. Newlines? Existing style from other Makefiles? style.Makefile(5) 2. .PATH implicitly has .CURDIR in it already. 3. Need special META_MODE handling for the build-tools target. I don't necessarily expect people to get this right but every other use of build-tools in the tree has a pattern that isn't used here. 4. You used HOST_OBJTOP in lib/libpmcstat/Makefile to refer to jevents for some reason when nothing else does. This is really just the META_MODE pattern being wrong. I'm fixing all of this. --=20 Regards, Bryan Drewery --nLTYkr8l3ZYwmGdN808jGQfO2df1OzYio-- --5A7xcxOCbMT9DXKZfXWZcU8v889phVa5o Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJbCG1WAAoJEDXXcbtuRpfP76YH/0Vxv6knMWSVssAb/SMNY8yr PqpAaqVAEWZVnmizQXC3QBY8cRGNxHc28q218FSRfLBIuAeDSU0wTQbFi/1ekxv4 nv+ThkPKqsQGWTv9z/q4nUfFUSzqIUES+y4oI5ezoxQBNJQKB8kL4NPLYzAcajTa dWcZSC9g4Y9gTPbayIN+SiOXZpuAsTIMW7USHbe1LQ6LqdMELchKPcSJbJAOY94n 19BEoD1wQHlECVldpVuFtpAMVDBPQDRTpp33RdHWT3ovKWnH5pvBHvjdqVrJH73S f/Be4rsw0vmBJLeiOddUQlF+KwmcaUfidMsoBzzhuXKyLwiyx0e0z9/tmicAgIk= =5eOP -----END PGP SIGNATURE----- --5A7xcxOCbMT9DXKZfXWZcU8v889phVa5o-- From owner-svn-src-head@freebsd.org Fri May 25 20:09:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFC04EF3042 for ; Fri, 25 May 2018 20:09:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63CF571FB0 for ; Fri, 25 May 2018 20:09:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id o185-v6so7719048iod.0 for ; Fri, 25 May 2018 13:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=p6A+eMf3r77K707wiDNf8eNxHcjLaCWS+y39QXlr9Cw=; b=g6tb34AtjXDIpbFbTi+FvXlr3uLzgB9z3szeKyZWRYr8fQUkNAytJg74qhI1ocXyqg 9BTEY5rhbZqbQotMrYZlnH6kCbwp+tgqMKEJo+XISzeA6YWAzgNwh9JMSXjuO91ZwrMa gV4G0MXr1EfNjV7xyCTTDdk68yIWtfTMwkAEofGQZdy02WmXjV7TeoS2K1evxaEt35og bK/KoI+Nez/ZEAV3O1V1hIKlTcZpO8OYwl5a48L12yBcuv2EuU8S8BDKY/t7Zta7RK8H aYLC45wptNed2EhTkgZX2G8p4y3dgQb6JVu+r03hXR6HEiyRtg+O/ZHv3HWZnIdmi0DO xWNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=p6A+eMf3r77K707wiDNf8eNxHcjLaCWS+y39QXlr9Cw=; b=KL8CHxD9r+2g2A5r33l0WF75OEcwWyy6c/jvVmSRCIJjbwxNe33dAxjQ6IyTy5lfp6 rMew+Ybf9TvfdPJUGEtBdi32vP9wfi/om9sk+xPdgTTxUESjsOng1mRq7/xhZOTK94AO mEw3GPP3dwP0C76cOvWXOF0N3xhNkAMOa2+ScKs4c9KmZi06cMwjRDUZzdghecjOwnR1 9RcTs6hE0wB4LlIBfYXXEYBA2BkVcK+5a/fhz59vZhUtYFngJXzO7WfYZq7c+JJLN853 Ut6xKCgRawYvp1TJj3IujdNNzsMf6XQgDiB/jcxFXg1t2wnhr2QGT0LYh/wJf7cPrP7E lEeA== X-Gm-Message-State: ALKqPwevrVEwR7Kb8QVzHMJqvbXKTo+Hi8Na/ayP8tLjNDHRrcN08D/y N44e+7320Y8VObiHcrNYmoKIE6w9CLYbOulXOZQkAg== X-Google-Smtp-Source: ADUXVKIg5Hy7DNsG2lbWC5jUur//5y+HIrdXzMbByI9lzNHnA+Nzgd3RS4MXFXK+10q16v2++8I/X4pAtY//0p7A+48= X-Received: by 2002:a6b:3846:: with SMTP id f67-v6mr3374531ioa.117.1527278949532; Fri, 25 May 2018 13:09:09 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:d028:0:0:0:0:0 with HTTP; Fri, 25 May 2018 13:09:08 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> From: Warner Losh Date: Fri, 25 May 2018 14:09:08 -0600 X-Google-Sender-Auth: pQT_diGslr05k9jvRRfs13vhEU4 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Ed Maste Cc: Marcelo Araujo , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:09:11 -0000 On Fri, May 25, 2018 at 2:02 PM, Ed Maste wrote: > On 25 May 2018 at 14:26, Marcelo Araujo wrote: > > > >> The fact that we don't do NDEBUG builds normally does not allow us to > >> ignore that it exists. It's perfectly reasonable for a user to build > >> with CFLAGS+=NDEBUG. That need to work. If code is going to fail to > >> handle resource errors with NDEBUG set then it needs something like this > >> at the top of the file: > > > > Please document it in some place! > > NDEBUG is documented in assert(3). The man page should have more of an > explanation (and examples) of the possible pitfalls of assert() > though > NDEBUG has been documented in the assert man page since it entered Unix via PBW in the 7th Edition Unix from Bell Labs. It's part of the C standard, as well as many POSIX and SVID docs. Warner From owner-svn-src-head@freebsd.org Fri May 25 20:11:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63205EF3126; Fri, 25 May 2018 20:11:33 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA7307223E; Fri, 25 May 2018 20:11:32 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id l1-v6so17529107wmb.2; Fri, 25 May 2018 13:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ChWTbw2q/E0g3jnJYfiF/CRnt4MKZQQ2DPdDxR/rrqI=; b=XoWbFhI5V4526nx6qFyktQNtgesEwTXdDbRQcUnTLfiQyxGztYjnsAlMXWF4M7hzdQ brUde8c01Y6U3QUIcZu4FrT4vYf+iUTkRu6A3xFTsGpIGMmQysPvlSvvQU4j0rS/JOWN 1mKkW6yU59KqMEHF0YHUasQN5hKLX9o6tJtpNVLqRy1SWRSWX8l6v6G3bypuDv/R5v7w yCu37S+w5Gd0WxtjjwenYUiiUg+VQzvysQPkMqYiKICkmNGCnuIklA1ecO9dTCNZQ378 XLUeIe6FE+hi6ASUrRLrpxW+WaP+xXbarltM4AnRmQs8ZhQOrlQDjzLpwNxQ4O7YVXpp 4TQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=ChWTbw2q/E0g3jnJYfiF/CRnt4MKZQQ2DPdDxR/rrqI=; b=H2YiFXbpH+oSW5RZ4rWOgPi/rSgYHq1o1JcRLSjs82mkrcM5B3OMGNp8FRGYJZdx+Q TeqasjBSVaUCJ6c5suXl/Y0Jmc4H7c8e6GVA8ZEUn0IFYpoZHOvDmZI3jp31Gm5uzBCK kWuFc0BGH7H27yHzcseRHFEXFOUWYQvLhCyx1sr9Z1UpVtnqf6LaZqAAffn9l9iLAIHS Zar/fsfC4zftyYY80jEVHnKO9stRShbw1JHN9iwu1xv0OW9CzgSG/GKVjY/UXkO3UOSV eb5S76Amxk4083KMR1u/kIpuzgpcf/UV8P40alymLget/jOZrCv1obPMG6THqmZJ6yRE V0KA== X-Gm-Message-State: ALKqPwcWSKPgOa3TQrH7Uw08I0ZyeQzFkwoEypv4QZWLA0YrNFobXjxD p4QYhEG2tlzEeDnc3hOK3KLrYA== X-Google-Smtp-Source: ADUXVKLQzWLx16mi3Pkphxi+oRJ2VhaH5bJE2luSfn4My1QlaVhwMG3mgjkT7r9OJaFpPSo6pWYcug== X-Received: by 2002:a1c:96c1:: with SMTP id y184-v6mr2713486wmd.156.1527279090559; Fri, 25 May 2018 13:11:30 -0700 (PDT) Received: from brick (cpc92302-cmbg19-2-0-cust461.5-4.cable.virginm.net. [82.1.209.206]) by smtp.gmail.com with ESMTPSA id k16-v6sm8651724wrh.25.2018.05.25.13.11.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 May 2018 13:11:29 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 25 May 2018 21:11:28 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: araujo@freebsd.org Cc: Brooks Davis , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve Message-ID: <20180525201128.GA97785@brick> Mail-Followup-To: araujo@freebsd.org, Brooks Davis , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:11:33 -0000 On 0526T0226, Marcelo Araujo wrote: > 2018-05-26 2:21 GMT+08:00 Brooks Davis : [..] > > The correct code here would be one of: > > > > str = strdup(opt); > > if (str == NULL) > > goto out; > > > > No, it is not the correct code! If we go out and free(str) we have nothing > to free, because we even didn't allocated memory for str. FWIW, calling free(3) on a NULL pointer is perfectly fine. From owner-svn-src-head@freebsd.org Fri May 25 20:11:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 449BCEF3283; Fri, 25 May 2018 20:11:42 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFD47722EE; Fri, 25 May 2018 20:11:40 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wr0-x234.google.com with SMTP id j1-v6so11119030wrm.1; Fri, 25 May 2018 13:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=4sJQe+33lO1zy3ahhUIGjk+fG9PMoIXtofZfa0cCbz8=; b=s3KIE3kKbhISJB+dM2HwD5ZbwOEg5qK7dKv8dNJ97zBsAIKgsMTewHVrwvzTYaJx75 2fiKkjG2f9ghEf+pTAjImixSkE9zh2Qt5g32hf5FgQVRlRpOi0FSPAaXHzjaMafiVvGD ND1dNt++8r+WMD39vVFABh7RCjXMQuLS7EeVv9oRGRiNnvSZaJEfOoaIA7s9jNJFJgZa 3b0zq61yYmU5W4BGYNPuSz5LRuxeE2g4tEwVTUfi23/lHPFm8Bs3sbjaRg4MY1ilBczB CalYmXWl6QwlROTGLTiMnF2F7hJsbdDL9VozrIR0esZTDaoBYTIjz1ugbwb+5tOZTuij zcKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=4sJQe+33lO1zy3ahhUIGjk+fG9PMoIXtofZfa0cCbz8=; b=UtSSFKplFpUzWL8Z+f7hsGVmYd/izGJx5v0FyQPzk5gqtjrp7jixNXtcTu+8mISs7k +Co5cgC+bokG7FgJdRIHFtek2Ob+VeZW1YyuGxDwhTPxpSD/wssK69kahrqke/Fb4CsE ttWBrz5aqDON+HEas8gjBmHf4gBxiAF7x06nvKFBAxUmGZsUUHk16Ef72jf3aTB3MSTj /QK7t5YhGYlhhiXWuAqmQ6opiLycKXXSFpcwGhwGkzHlbLCLGHzUKbf4xM7kE/H3svmQ ILklSe/2R7PVorhcXJuswrFKZSVTTyqcObeHzCRtZ8o46eceG0ac4oIvwJEVi4ZHYgft PiiA== X-Gm-Message-State: ALKqPwevMf3+4LOxYCQHC/4hpt89nhRGD+ETDluxnZCk54JCX3SbXO50 dTyQAmsE/ofMclEksgbZk4YsongzcLxlPRzKKOQ= X-Google-Smtp-Source: ADUXVKJFrMwx4a3BdaXCX0cPVhEtVQCViwA+ars5aDvsLU72DiX73VoWXc/2MAwycQZ6PFu3VMCMQcCAhWRhHzHisBw= X-Received: by 2002:a19:3b0e:: with SMTP id i14-v6mr2297420lfa.48.1527279098747; Fri, 25 May 2018 13:11:38 -0700 (PDT) MIME-Version: 1.0 References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> In-Reply-To: Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Sat, 26 May 2018 04:11:27 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: Warner Losh Cc: Ed Maste , Marcelo Araujo , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:11:42 -0000 On Sat, May 26, 2018, 4:09 AM Warner Losh wrote: > > > On Fri, May 25, 2018 at 2:02 PM, Ed Maste wrote: > >> On 25 May 2018 at 14:26, Marcelo Araujo wrote: >> > >> >> The fact that we don't do NDEBUG builds normally does not allow us to >> >> ignore that it exists. It's perfectly reasonable for a user to build >> >> with CFLAGS+=NDEBUG. That need to work. If code is going to fail to >> >> handle resource errors with NDEBUG set then it needs something like >> this >> >> at the top of the file: >> > >> > Please document it in some place! >> >> NDEBUG is documented in assert(3). The man page should have more of an >> explanation (and examples) of the possible pitfalls of assert() >> though >> > > NDEBUG has been documented in the assert man page since it entered Unix > via PBW in the 7th Edition Unix from Bell Labs. It's part of the C > standard, as well as many POSIX and SVID docs. > Yes I can read that! Now tell me, do we build FreeBSD without assert? If we do, probably we can't run it without crash! > Warner > From owner-svn-src-head@freebsd.org Fri May 25 20:22:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58BAFEF35D4; Fri, 25 May 2018 20:22:46 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C85C472A31; Fri, 25 May 2018 20:22:45 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4PKMes4047390; Fri, 25 May 2018 13:22:40 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4PKMdPY047389; Fri, 25 May 2018 13:22:39 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805252022.w4PKMdPY047389@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve In-Reply-To: To: araujo@freebsd.org Date: Fri, 25 May 2018 13:22:39 -0700 (PDT) CC: Warner Losh , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:22:46 -0000 > On Sat, May 26, 2018, 4:09 AM Warner Losh wrote: > > > > > > > On Fri, May 25, 2018 at 2:02 PM, Ed Maste wrote: > > > >> On 25 May 2018 at 14:26, Marcelo Araujo wrote: > >> > > >> >> The fact that we don't do NDEBUG builds normally does not allow us to > >> >> ignore that it exists. It's perfectly reasonable for a user to build > >> >> with CFLAGS+=NDEBUG. That need to work. If code is going to fail to > >> >> handle resource errors with NDEBUG set then it needs something like > >> this > >> >> at the top of the file: > >> > > >> > Please document it in some place! > >> > >> NDEBUG is documented in assert(3). The man page should have more of an > >> explanation (and examples) of the possible pitfalls of assert() > >> though > >> > > > > NDEBUG has been documented in the assert man page since it entered Unix > > via PBW in the 7th Edition Unix from Bell Labs. It's part of the C > > standard, as well as many POSIX and SVID docs. > > > > Yes I can read that! Now tell me, do we build FreeBSD without assert? > > If we do, probably we can't run it without crash! So that makes it perfectly fine to continue what is a well known bad practice? I do not think so. Many people have tried to persuade you that the *proper* way to check the return from a function is with an if statement, not with an assert, please try to accept that this is pretty much standard accepted portable 'C' coding, and realize all those places you see assert(foo) checking the return of a function are more than likely lurking bugs to be fixed. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri May 25 20:27:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33BE1EF36ED; Fri, 25 May 2018 20:27:39 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-wr0-x236.google.com (mail-wr0-x236.google.com [IPv6:2a00:1450:400c:c0c::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 806EC72CFB; Fri, 25 May 2018 20:27:38 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-wr0-x236.google.com with SMTP id a15-v6so11175774wrm.0; Fri, 25 May 2018 13:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=trwEcnOdVIUUOVulV0i7oQHeYt5Cc8AS2F4O93UJ/S0=; b=TL80OoXZSkhOO4DyeKbubMYp2Kpq6r07cghXNmynKHbf2DxBQjiaz5UnrllK8qEQML 4Rv0sKs4bhVAYXXnRnM0Ugl3mfZllHbRFzU2bc7RY/iqgjt7T0TMZEOhNcEjPj1hbU7E VWLzh7ZvcJamAANMl0cMGfGYyGnJKwtr0bFl4us1PeDEsBLfzyGkcp7fyzNisbIwKutK yRPh4LOWaUURxorcFciRnrXLToWiqo5D/owcpMGPfa/By1hFzm5PH6EhKoe83tRTN+kW qKA03TeKWKvZW21NeoKSCZqnjveDQ/Wk69bw86LrYMSs9Paq4HOjNc5smzdmJ9GEFmrR R1GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=trwEcnOdVIUUOVulV0i7oQHeYt5Cc8AS2F4O93UJ/S0=; b=J0kovg6S4PHdND07Vem84H5/DAVlaEDoW0iV1I6NuOgSdz4OVfpkm2TaKLCE8JI1wY MOGvf7Vcdlr8lYqM3byt8VlmzOFXO5TaBWZjljmwAaMkhou4IlmgYtlH7xM7sPWNpKbJ fQEegmyBou0ej7mvfi8nFUrWebV+Y8YOMLuV5D8IrpW/lC+SUSKGS4TFSD6wiJn3LBE/ 7mCIumygKVTiUQI0Zr/VUq8qABsh7NFpBBf4AO/ehHAhnzxddu+NpYpgKA8M3n3Gwc0j iboQzxTXNhodkGYwOZfAAr0JRYiYYrfnu4Hg8OXDzZwC7xQA8U360lcs0QYdp/wjFcy6 6oeg== X-Gm-Message-State: ALKqPwfY9E2LhZcq4yzMlwI3yCKkEJtlRPlCiEX6Id/d1rouVkvf9dzE teMFoyg0kWn3ZotzHCAHmY6WO1efrQCcMCCn8/s= X-Google-Smtp-Source: ADUXVKIW5tupC5dzjalu/HeYTFSTgExGALvUf7vsKrx6IhcpII4qk21rOJNCM18DIlgTZwdl7fZ28folyM5V3g7dZAw= X-Received: by 2002:a19:f611:: with SMTP id x17-v6mr2291201lfe.116.1527280057256; Fri, 25 May 2018 13:27:37 -0700 (PDT) MIME-Version: 1.0 References: <201805252022.w4PKMdPY047389@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201805252022.w4PKMdPY047389@pdx.rh.CN85.dnsmgr.net> Reply-To: araujo@freebsd.org From: Marcelo Araujo Date: Sat, 26 May 2018 04:27:25 +0800 Message-ID: Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve To: "Rodney W. Grimes" Cc: Marcelo Araujo , Warner Losh , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:27:39 -0000 On Sat, May 26, 2018, 4:22 AM Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On Sat, May 26, 2018, 4:09 AM Warner Losh wrote: > > > > > > > > > > > On Fri, May 25, 2018 at 2:02 PM, Ed Maste wrote: > > > > > >> On 25 May 2018 at 14:26, Marcelo Araujo > wrote: > > >> > > > >> >> The fact that we don't do NDEBUG builds normally does not allow us > to > > >> >> ignore that it exists. It's perfectly reasonable for a user to > build > > >> >> with CFLAGS+=NDEBUG. That need to work. If code is going to fail > to > > >> >> handle resource errors with NDEBUG set then it needs something like > > >> this > > >> >> at the top of the file: > > >> > > > >> > Please document it in some place! > > >> > > >> NDEBUG is documented in assert(3). The man page should have more of an > > >> explanation (and examples) of the possible pitfalls of assert() > > >> though > > >> > > > > > > NDEBUG has been documented in the assert man page since it entered Unix > > > via PBW in the 7th Edition Unix from Bell Labs. It's part of the C > > > standard, as well as many POSIX and SVID docs. > > > > > > > Yes I can read that! Now tell me, do we build FreeBSD without assert? > > > > If we do, probably we can't run it without crash! > > So that makes it perfectly fine to continue what is a well known bad > practice? I do not think so. > > Many people have tried to persuade you that the *proper* way to check > the return from a function is with an if statement, not with an assert, > please try to accept that this is pretty much standard accepted portable > 'C' coding, and realize all those places you see assert(foo) checking > the return of a function are more than likely lurking bugs to be fixed. > I never said that I didn't accepted that! What I have been saying the issue is all around and we need to fix it. Please don't twist my words! Best, > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-head@freebsd.org Fri May 25 20:32:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F770EF38F9; Fri, 25 May 2018 20:32:52 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A1267315D; Fri, 25 May 2018 20:32:51 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4PKWnrk047433; Fri, 25 May 2018 13:32:49 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4PKWnOF047432; Fri, 25 May 2018 13:32:49 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805252032.w4PKWnOF047432@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve In-Reply-To: To: araujo@freebsd.org Date: Fri, 25 May 2018 13:32:49 -0700 (PDT) CC: "Rodney W. Grimes" , Warner Losh , Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:32:52 -0000 > On Sat, May 26, 2018, 4:22 AM Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > > On Sat, May 26, 2018, 4:09 AM Warner Losh wrote: > > > > > > > > > > > > > > > On Fri, May 25, 2018 at 2:02 PM, Ed Maste wrote: > > > > > > > >> On 25 May 2018 at 14:26, Marcelo Araujo > > wrote: > > > >> > > > > >> >> The fact that we don't do NDEBUG builds normally does not allow us > > to > > > >> >> ignore that it exists. It's perfectly reasonable for a user to > > build > > > >> >> with CFLAGS+=NDEBUG. That need to work. If code is going to fail > > to > > > >> >> handle resource errors with NDEBUG set then it needs something like > > > >> this > > > >> >> at the top of the file: > > > >> > > > > >> > Please document it in some place! > > > >> > > > >> NDEBUG is documented in assert(3). The man page should have more of an > > > >> explanation (and examples) of the possible pitfalls of assert() > > > >> though > > > >> > > > > > > > > NDEBUG has been documented in the assert man page since it entered Unix > > > > via PBW in the 7th Edition Unix from Bell Labs. It's part of the C > > > > standard, as well as many POSIX and SVID docs. > > > > > > > > > > Yes I can read that! Now tell me, do we build FreeBSD without assert? > > > > > > If we do, probably we can't run it without crash! > > > > So that makes it perfectly fine to continue what is a well known bad > > practice? I do not think so. > > > > Many people have tried to persuade you that the *proper* way to check > > the return from a function is with an if statement, not with an assert, > > please try to accept that this is pretty much standard accepted portable > > 'C' coding, and realize all those places you see assert(foo) checking > > the return of a function are more than likely lurking bugs to be fixed. > > > > I never said that I didn't accepted that! You flat out rejected it, more than once, and from more than one source. > What I have been saying the issue > is all around and we need to fix it. You never said we need to fix any of the asserts until prehaps just now. > Please don't twist my words! I did not twist your words. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri May 25 20:40:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FCD4EF3B2C; Fri, 25 May 2018 20:40:25 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0B473573; Fri, 25 May 2018 20:40:25 +0000 (UTC) (envelope-from brooks@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E23B25D98; Fri, 25 May 2018 20:40:25 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PKePSb026208; Fri, 25 May 2018 20:40:25 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PKeNWf026201; Fri, 25 May 2018 20:40:23 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201805252040.w4PKeNWf026201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 25 May 2018 20:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334223 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/vm X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/vm X-SVN-Commit-Revision: 334223 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:40:25 -0000 Author: brooks Date: Fri May 25 20:40:23 2018 New Revision: 334223 URL: https://svnweb.freebsd.org/changeset/base/334223 Log: Make vadvise compat freebsd11. The vadvise syscall (aka ovadvise) is undocumented and has always been implmented as returning EINVAL. Put the syscall under COMPAT11 and provide a userspace implementation. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15557 Added: head/lib/libc/sys/vadvise.c (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master head/sys/vm/vm_unix.c Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Fri May 25 19:48:26 2018 (r334222) +++ head/lib/libc/sys/Makefile.inc Fri May 25 20:40:23 2018 (r334223) @@ -46,6 +46,7 @@ NOASM+= getdirentries.o PSEUDO+= _getdirentries.o SRCS+= pipe.c +SRCS+= vadvise.c INTERPOSED = \ accept \ Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Fri May 25 19:48:26 2018 (r334222) +++ head/lib/libc/sys/Symbol.map Fri May 25 20:40:23 2018 (r334223) @@ -1010,8 +1010,6 @@ FBSDprivate_1.0 { __sys_utrace; _uuidgen; __sys_uuidgen; - _vadvise; - __sys_vadvise; _wait4; __sys_wait4; _wait6; Added: head/lib/libc/sys/vadvise.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/vadvise.c Fri May 25 20:40:23 2018 (r334223) @@ -0,0 +1,46 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2018 SRI International + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include + +int vadvise(int); + +int +vadvise(int arg __unused) +{ + + return (EINVAL); +} Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Fri May 25 19:48:26 2018 (r334222) +++ head/sys/compat/freebsd32/syscalls.master Fri May 25 20:40:23 2018 (r334223) @@ -173,8 +173,7 @@ 70 AUE_SSTK NOPROTO { int sstk(int incr); } 71 AUE_MMAP COMPAT|NOPROTO { int mmap(void *addr, int len, \ int prot, int flags, int fd, int pos); } -72 AUE_O_VADVISE NOPROTO { int ovadvise(int anom); } vadvise \ - ovadvise_args int +72 AUE_O_VADVISE COMPAT11|NOPROTO { int vadvise(int anom); } 73 AUE_MUNMAP NOPROTO { int munmap(void *addr, size_t len); } 74 AUE_MPROTECT STD { int freebsd32_mprotect(void *addr, \ size_t len, int prot); } Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Fri May 25 19:48:26 2018 (r334222) +++ head/sys/kern/syscalls.master Fri May 25 20:40:23 2018 (r334223) @@ -229,8 +229,7 @@ 70 AUE_SSTK STD { int sstk(int incr); } 71 AUE_MMAP COMPAT { int mmap(_In_ void *addr, int len, int prot, \ int flags, int fd, long pos); } -72 AUE_O_VADVISE STD { int ovadvise(int anom); } vadvise \ - ovadvise_args int +72 AUE_O_VADVISE COMPAT11 { int vadvise(int anom); } 73 AUE_MUNMAP STD { int munmap(_In_ void *addr, size_t len); } 74 AUE_MPROTECT STD { int mprotect(_In_ void *addr, \ size_t len, int prot); } Modified: head/sys/vm/vm_unix.c ============================================================================== --- head/sys/vm/vm_unix.c Fri May 25 19:48:26 2018 (r334222) +++ head/sys/vm/vm_unix.c Fri May 25 20:40:23 2018 (r334223) @@ -231,20 +231,11 @@ done: #endif /* defined(__aarch64__) || defined(__riscv__) */ } -#ifndef _SYS_SYSPROTO_H_ -struct ovadvise_args { - int anom; -}; -#endif - -/* - * MPSAFE - */ -/* ARGSUSED */ +#ifdef COMPAT_FREEBSD11 int -sys_ovadvise(struct thread *td, struct ovadvise_args *uap) +freebsd11_vadvise(struct thread *td, struct freebsd11_vadvise_args *uap) { - /* START_GIANT_OPTIONAL */ - /* END_GIANT_OPTIONAL */ + return (EINVAL); } +#endif From owner-svn-src-head@freebsd.org Fri May 25 20:41:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD216EF3D2D; Fri, 25 May 2018 20:41:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CD877383B; Fri, 25 May 2018 20:41:29 +0000 (UTC) (envelope-from brooks@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E87725ED4; Fri, 25 May 2018 20:41:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PKfTOG030329; Fri, 25 May 2018 20:41:29 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PKfRaX030319; Fri, 25 May 2018 20:41:27 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201805252041.w4PKfRaX030319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 25 May 2018 20:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334224 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern sys X-SVN-Commit-Revision: 334224 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:41:30 -0000 Author: brooks Date: Fri May 25 20:41:26 2018 New Revision: 334224 URL: https://svnweb.freebsd.org/changeset/base/334224 Log: Regen after r334223: make vadvise compat freebsd11. Modified: head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Fri May 25 20:40:23 2018 (r334223) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Fri May 25 20:41:26 2018 (r334224) @@ -77,7 +77,7 @@ #define FREEBSD32_SYS_sbrk 69 #define FREEBSD32_SYS_sstk 70 /* 71 is old mmap */ -#define FREEBSD32_SYS_vadvise 72 +#define FREEBSD32_SYS_freebsd11_vadvise 72 #define FREEBSD32_SYS_munmap 73 #define FREEBSD32_SYS_freebsd32_mprotect 74 #define FREEBSD32_SYS_madvise 75 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Fri May 25 20:40:23 2018 (r334223) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Fri May 25 20:41:26 2018 (r334224) @@ -81,7 +81,7 @@ const char *freebsd32_syscallnames[] = { "sbrk", /* 69 = sbrk */ "sstk", /* 70 = sstk */ "compat.mmap", /* 71 = old mmap */ - "vadvise", /* 72 = vadvise */ + "compat11.vadvise", /* 72 = freebsd11 vadvise */ "munmap", /* 73 = munmap */ "freebsd32_mprotect", /* 74 = freebsd32_mprotect */ "madvise", /* 75 = madvise */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Fri May 25 20:40:23 2018 (r334223) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Fri May 25 20:41:26 2018 (r334224) @@ -128,7 +128,7 @@ struct sysent freebsd32_sysent[] = { { AS(sbrk_args), (sy_call_t *)sys_sbrk, AUE_SBRK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 69 = sbrk */ { AS(sstk_args), (sy_call_t *)sys_sstk, AUE_SSTK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 70 = sstk */ { compat(AS(ommap_args),mmap), AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 71 = old mmap */ - { AS(ovadvise_args), (sy_call_t *)sys_ovadvise, AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = vadvise */ + { compat11(AS(freebsd11_vadvise_args),vadvise), AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = freebsd11 vadvise */ { AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 73 = munmap */ { AS(freebsd32_mprotect_args), (sy_call_t *)freebsd32_mprotect, AUE_MPROTECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 74 = freebsd32_mprotect */ { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 75 = madvise */ Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Fri May 25 20:40:23 2018 (r334223) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Fri May 25 20:41:26 2018 (r334224) @@ -435,13 +435,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 1; break; } - /* ovadvise */ - case 72: { - struct ovadvise_args *p = params; - iarg[0] = p->anom; /* int */ - *n_args = 1; - break; - } /* munmap */ case 73: { struct munmap_args *p = params; @@ -3944,16 +3937,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* ovadvise */ - case 72: - switch(ndx) { - case 0: - p = "int"; - break; - default: - break; - }; - break; /* munmap */ case 73: switch(ndx) { @@ -9081,11 +9064,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* sstk */ case 70: - if (ndx == 0 || ndx == 1) - p = "int"; - break; - /* ovadvise */ - case 72: if (ndx == 0 || ndx == 1) p = "int"; break; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Fri May 25 20:40:23 2018 (r334223) +++ head/sys/kern/init_sysent.c Fri May 25 20:41:26 2018 (r334224) @@ -121,7 +121,7 @@ struct sysent sysent[] = { { AS(sbrk_args), (sy_call_t *)sys_sbrk, AUE_SBRK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 69 = sbrk */ { AS(sstk_args), (sy_call_t *)sys_sstk, AUE_SSTK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 70 = sstk */ { compat(AS(ommap_args),mmap), AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 71 = old mmap */ - { AS(ovadvise_args), (sy_call_t *)sys_ovadvise, AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = vadvise */ + { compat11(AS(freebsd11_vadvise_args),vadvise), AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = freebsd11 vadvise */ { AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 73 = munmap */ { AS(mprotect_args), (sy_call_t *)sys_mprotect, AUE_MPROTECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 74 = mprotect */ { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 75 = madvise */ Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Fri May 25 20:40:23 2018 (r334223) +++ head/sys/kern/syscalls.c Fri May 25 20:41:26 2018 (r334224) @@ -78,7 +78,7 @@ const char *syscallnames[] = { "sbrk", /* 69 = sbrk */ "sstk", /* 70 = sstk */ "compat.mmap", /* 71 = old mmap */ - "vadvise", /* 72 = vadvise */ + "compat11.vadvise", /* 72 = freebsd11 vadvise */ "munmap", /* 73 = munmap */ "mprotect", /* 74 = mprotect */ "madvise", /* 75 = madvise */ Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Fri May 25 20:40:23 2018 (r334223) +++ head/sys/kern/systrace_args.c Fri May 25 20:41:26 2018 (r334224) @@ -432,13 +432,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 1; break; } - /* ovadvise */ - case 72: { - struct ovadvise_args *p = params; - iarg[0] = p->anom; /* int */ - *n_args = 1; - break; - } /* munmap */ case 73: { struct munmap_args *p = params; @@ -3949,16 +3942,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* ovadvise */ - case 72: - switch(ndx) { - case 0: - p = "int"; - break; - default: - break; - }; - break; /* munmap */ case 73: switch(ndx) { @@ -9030,11 +9013,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* sstk */ case 70: - if (ndx == 0 || ndx == 1) - p = "int"; - break; - /* ovadvise */ - case 72: if (ndx == 0 || ndx == 1) p = "int"; break; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Fri May 25 20:40:23 2018 (r334223) +++ head/sys/sys/syscall.h Fri May 25 20:41:26 2018 (r334224) @@ -77,7 +77,7 @@ #define SYS_sbrk 69 #define SYS_sstk 70 /* 71 is old mmap */ -#define SYS_vadvise 72 +#define SYS_freebsd11_vadvise 72 #define SYS_munmap 73 #define SYS_mprotect 74 #define SYS_madvise 75 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Fri May 25 20:40:23 2018 (r334223) +++ head/sys/sys/syscall.mk Fri May 25 20:41:26 2018 (r334224) @@ -59,7 +59,7 @@ MIASM = \ vfork.o \ sbrk.o \ sstk.o \ - vadvise.o \ + freebsd11_vadvise.o \ munmap.o \ mprotect.o \ madvise.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Fri May 25 20:40:23 2018 (r334223) +++ head/sys/sys/sysproto.h Fri May 25 20:41:26 2018 (r334224) @@ -264,9 +264,6 @@ struct sbrk_args { struct sstk_args { char incr_l_[PADL_(int)]; int incr; char incr_r_[PADR_(int)]; }; -struct ovadvise_args { - char anom_l_[PADL_(int)]; int anom; char anom_r_[PADR_(int)]; -}; struct munmap_args { char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; @@ -1828,7 +1825,6 @@ int sys_msync(struct thread *, struct msync_args *); int sys_vfork(struct thread *, struct vfork_args *); int sys_sbrk(struct thread *, struct sbrk_args *); int sys_sstk(struct thread *, struct sstk_args *); -int sys_ovadvise(struct thread *, struct ovadvise_args *); int sys_munmap(struct thread *, struct munmap_args *); int sys_mprotect(struct thread *, struct mprotect_args *); int sys_madvise(struct thread *, struct madvise_args *); @@ -2493,6 +2489,9 @@ struct freebsd11_mknod_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; char dev_l_[PADL_(int)]; int dev; char dev_r_[PADR_(int)]; }; +struct freebsd11_vadvise_args { + char anom_l_[PADL_(int)]; int anom; char anom_r_[PADR_(int)]; +}; struct freebsd11_stat_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char ub_l_[PADL_(struct freebsd11_stat *)]; struct freebsd11_stat * ub; char ub_r_[PADR_(struct freebsd11_stat *)]; @@ -2570,6 +2569,7 @@ struct freebsd11_mknodat_args { char dev_l_[PADL_(uint32_t)]; uint32_t dev; char dev_r_[PADR_(uint32_t)]; }; int freebsd11_mknod(struct thread *, struct freebsd11_mknod_args *); +int freebsd11_vadvise(struct thread *, struct freebsd11_vadvise_args *); int freebsd11_stat(struct thread *, struct freebsd11_stat_args *); int freebsd11_fstat(struct thread *, struct freebsd11_fstat_args *); int freebsd11_lstat(struct thread *, struct freebsd11_lstat_args *); @@ -2658,7 +2658,7 @@ int freebsd11_mknodat(struct thread *, struct freebsd1 #define SYS_AUE_sbrk AUE_SBRK #define SYS_AUE_sstk AUE_SSTK #define SYS_AUE_ommap AUE_MMAP -#define SYS_AUE_vadvise AUE_O_VADVISE +#define SYS_AUE_freebsd11_vadvise AUE_O_VADVISE #define SYS_AUE_munmap AUE_MUNMAP #define SYS_AUE_mprotect AUE_MPROTECT #define SYS_AUE_madvise AUE_MADVISE From owner-svn-src-head@freebsd.org Fri May 25 20:42:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D965EF3DB3; Fri, 25 May 2018 20:42:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1089673B67; Fri, 25 May 2018 20:42:29 +0000 (UTC) (envelope-from brooks@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6F2825F22; Fri, 25 May 2018 20:42:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PKgSxW030403; Fri, 25 May 2018 20:42:28 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PKgSBv030402; Fri, 25 May 2018 20:42:28 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201805252042.w4PKgSBv030402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 25 May 2018 20:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334225 - head X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 334225 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:42:29 -0000 Author: brooks Date: Fri May 25 20:42:28 2018 New Revision: 334225 URL: https://svnweb.freebsd.org/changeset/base/334225 Log: Support -DNO_CLEAN builds across r334223+r334224. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri May 25 20:41:26 2018 (r334224) +++ head/Makefile.inc1 Fri May 25 20:42:28 2018 (r334225) @@ -809,7 +809,8 @@ _cleanobj_fast_depend_hack: .PHONY # 20180405 r332080 shmat # 20180406 r332119 setlogin # 20180411 r332443 exect -.for f in exect fstat fstatat fstatfs getdirentries getfsstat setlogin shmat sigreturn statfs +# 20180525 r334224 vadvise +.for f in exect fstat fstatat fstatfs getdirentries getfsstat setlogin shmat sigreturn statfs vadvise .if exists(${OBJTOP}/lib/libc/.depend.${f}.o) @if egrep -qw '${f}\.[sS]' \ ${OBJTOP}/lib/libc/.depend.${f}.o; then \ From owner-svn-src-head@freebsd.org Fri May 25 20:55:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72C4DEF4315; Fri, 25 May 2018 20:55:30 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFF8474265; Fri, 25 May 2018 20:55:29 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-wm0-f48.google.com with SMTP id o78-v6so17787363wmg.0; Fri, 25 May 2018 13:55:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Wn16NnG3OxHXGZ20BygCxK4S5c9pOtXn7U/6CxT3r/U=; b=IZhyu6WZZ9OiZWVhBdMlTb5x95wZqLpMyxP8ozzTfpBuuxxsHrXm6+R4lgMYI1CVTv tKqy9E1ByRGn3Ru+HiQp0FoylI5+BuuUqHbICLA/ZhwfdkhH8G9VrYk9lq3VVSwLhrCY mzq5riiHehR/S7t7Zy7y7+P8n6lvJV12Mq4OEXg8DvumRl+BRQScG8v7Cr3lZEgMI8KK TW4tbyuUXQs3OuH7uiVxClVzLtrWmHEb1Ji/m8PCngnsqt7Ieb3vfmK7RWqitawql00v UE74MjpOYzYX3L7/xkaaocjBGY20QbUv9xd4Ziq9b/pA1eP8gWHJBPiOjQQ/zLfkyC0P VtmQ== X-Gm-Message-State: ALKqPwfVe2vnWGW4H3WwWcquAMk/iDjjEm/Sgzis5LtnGRceJ+QyJWTD JuPEbnWQWgyB4IIa2hZrC4o9/r3+rcw= X-Google-Smtp-Source: ADUXVKLzyd2E+N2g9iVNp21j1HqD7x32XXhmKSVDVZWcyEU7XfoFY0//fdqVpskRij0p2XJxOjwNUA== X-Received: by 2002:a2e:8794:: with SMTP id n20-v6mr2656541lji.38.1527281723359; Fri, 25 May 2018 13:55:23 -0700 (PDT) Received: from oxy (89-76-8-18.dynamic.chello.pl. [89.76.8.18]) by smtp.gmail.com with ESMTPSA id p76-v6sm5621641lfp.44.2018.05.25.13.55.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 May 2018 13:55:23 -0700 (PDT) Date: Fri, 25 May 2018 22:56:30 +0200 From: Mateusz Piotrowski <0mp@FreeBSD.org> To: Mark Felder Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334221 - head/etc Message-ID: <20180525225630.4a74642e@oxy> In-Reply-To: <201805251936.w4PJaQIf093393@repo.freebsd.org> References: <201805251936.w4PJaQIf093393@repo.freebsd.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 20:55:30 -0000 On Fri, 25 May 2018 19:36:26 +0000 (UTC) Mark Felder wrote: >Author: feld (ports committer) >Date: Fri May 25 19:36:26 2018 >New Revision: 334221 >URL: https://svnweb.freebsd.org/changeset/base/334221 > >Log: > rc.subr: Support loading environmental variables from a file > > The current support for setting environment via foo_env="" in rc.conf is > not scalable and does not handle envs with spaces in the value. It seems > a common pattern for some newer software is to skip configuration files > altogether and rely on the env. This is well supported in systemd unit > files and may be the inspiration for this trend. > > MFH: 1 week > Differential Revision: https://reviews.freebsd.org/D14453 Do you plan to update the rc.subr manual as well? From owner-svn-src-head@freebsd.org Fri May 25 21:10:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BAE6EF479D; Fri, 25 May 2018 21:10:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B8A1748F4; Fri, 25 May 2018 21:10:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 572D79254; Fri, 25 May 2018 21:10:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 26791810; Fri, 25 May 2018 21:10:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id qxCvU6vuNK5R; Fri, 25 May 2018 21:10:22 +0000 (UTC) To: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com F183880B References: <201805091344.w49Dist5061908@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Subject: Re: svn commit: r333407 - head/share/mk Message-ID: <88989fda-4d0b-af16-8d08-28b6cdba0d34@FreeBSD.org> Date: Fri, 25 May 2018 14:10:20 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201805091344.w49Dist5061908@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="22b1Za7qULLbYDKqE6Ar9axKfiB0ikgYH" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:10:27 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --22b1Za7qULLbYDKqE6Ar9axKfiB0ikgYH Content-Type: multipart/mixed; boundary="natiugY9Vw2GDyLnvO066LNJBisE4afca"; protected-headers="v1" From: Bryan Drewery To: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <88989fda-4d0b-af16-8d08-28b6cdba0d34@FreeBSD.org> Subject: Re: svn commit: r333407 - head/share/mk References: <201805091344.w49Dist5061908@repo.freebsd.org> In-Reply-To: <201805091344.w49Dist5061908@repo.freebsd.org> --natiugY9Vw2GDyLnvO066LNJBisE4afca Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/9/2018 6:44 AM, Brad Davis wrote: > Author: brd > Date: Wed May 9 13:44:54 2018 > New Revision: 333407 > URL: https://svnweb.freebsd.org/changeset/base/333407 >=20 > Log: > Enable directory creation with FILESDIR. > =20 > This is part of packaging base work. > =20 > Reviewed by: will > Approved by: bapt (mentor), allanjude (mentor) > Differential Revision: https://reviews.freebsd.org/D15130 >=20 Please update share/mk/bsd.README too. I know I haven't been very responsive but it's partly because I'm still fundamentally against this feature. It's adding a mechanism to replace mtree without considering the whole picture and only binding it to FILES rather than a bsd.dirs.mk; It doesn't actually satisfy replacing mtree files since it only works if there is a FILESGROUP used (FILES must be non-empty). So what's the point? My major concern is added confusion. The creation of directories for installing is a pain point at work for developers but I don't think this is enough. I liked the idea of `install "-D"` but I know it's not efficient and had some implementation issues. More below... > Modified: > head/share/mk/bsd.files.mk > head/share/mk/bsd.own.mk >=20 > Modified: head/share/mk/bsd.files.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/bsd.files.mk Wed May 9 12:25:23 2018 (r333406) > +++ head/share/mk/bsd.files.mk Wed May 9 13:44:54 2018 (r333407) > @@ -67,7 +67,7 @@ STAGE_AS_${file:T}=3D ${${group}NAME_${file:T}} > STAGE_DIR.${file:T}=3D ${STAGE_OBJTOP}${${group}DIR_${file:T}} > stage_as.${file:T}: ${file} > =20 > -installfiles-${group}: _${group}INS_${file:T} > +installfiles-${group}: installdirs-${group} _${group}INS_${file:T} > _${group}INS_${file:T}: ${file} > ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \ > -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ > @@ -77,10 +77,24 @@ _${group}INS_${file:T}: ${file} > _${group}FILES+=3D ${file} > .endif > .endfor > + > + > +installdirs-${group}: > + @echo installing dirs ${group}DIR ${${group}DIR} > +.for dir in ${${group}DIR} > +.if defined(NO_ROOT) > + ${INSTALL} ${${group}TAG_ARGS} -d ${DESTDIR}${dir} > +.else > + ${INSTALL} ${${group}TAG_ARGS} -d -o ${DIROWN} -g ${DIRGRP} \ > + -m ${DIRMODE} ${DESTDIR}${dir} I missed this before but the OWN/GRP/MODE usage needs to be per group just like the FILES group ones are above; it needs to be able to modify the permissions per group rather than only using the globals. > +.endif > +.endfor > + > + > .if !empty(_${group}FILES) > stage_files.${group}: ${_${group}FILES} > =20 > -installfiles-${group}: _${group}INS > +installfiles-${group}: installdirs-${group} _${group}INS > _${group}INS: ${_${group}FILES} > .if defined(${group}NAME) > ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \ >=20 > Modified: head/share/mk/bsd.own.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/bsd.own.mk Wed May 9 12:25:23 2018 (r333406) > +++ head/share/mk/bsd.own.mk Wed May 9 13:44:54 2018 (r333407) > @@ -75,6 +75,13 @@ > # CONFMODE Configuration file mode. [644] > # > # > +# DIROWN Directory owner. [root] > +# > +# DIRGRP Directory group. [wheel] > +# > +# DIRMODE Directory mode. [755] > +# > +# > # DOCDIR Base path for system documentation (e.g. PSD, USD, > # handbook, FAQ etc.). [${SHAREDIR}/doc] > # > @@ -185,6 +192,10 @@ MANDIR?=3D ${SHAREDIR}/man/man > MANOWN?=3D ${SHAREOWN} > MANGRP?=3D ${SHAREGRP} > MANMODE?=3D ${NOBINMODE} > + > +DIROWN?=3D root > +DIRGRP?=3D wheel > +DIRMODE?=3D 755 > =20 > DOCDIR?=3D ${SHAREDIR}/doc > DOCOWN?=3D ${SHAREOWN} >=20 --=20 Regards, Bryan Drewery --natiugY9Vw2GDyLnvO066LNJBisE4afca-- --22b1Za7qULLbYDKqE6Ar9axKfiB0ikgYH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJbCHu9AAoJEDXXcbtuRpfPjeQIAMnprIZUQb7S6H5z0Z1QItF+ pUqA3e/oO0ebn/hBRWRKAdUjo0NbR5mZ7dYQrAi/8OROxwkoZ5cSRraJYAuahE6a Poml4iTKBF+WSU4Brv88ImXMf03q3lVl1IFltPKaeukH+zyCiYbM14tqwtPAorZ6 iwFkLfgnEA4tofSBrs183XGNdAc/NZNTNXzI10yxmxZ8QsJRj7x81F7uVCSsRBUh ByTt2f/AqDm9a0Y9cm512UkY+SRzbIV8jghUhFFi8UtuSnKPgGOu5zTnyUZFaT14 bT2MXwM1+U/CwzllyauoDk59UyXG8Rd83O1fV2+fgYUYhU/PwoNMqeV6C3gTUwI= =7BFT -----END PGP SIGNATURE----- --22b1Za7qULLbYDKqE6Ar9axKfiB0ikgYH-- From owner-svn-src-head@freebsd.org Fri May 25 21:16:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8A8BEF4AED; Fri, 25 May 2018 21:16:22 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75A4D74E9B; Fri, 25 May 2018 21:16:22 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id AA49621B00; Fri, 25 May 2018 17:16:16 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Fri, 25 May 2018 17:16:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=mPF2oW PqsY4/plHqEnStp7M5vZViFsWRFhQVNg4OJv8=; b=SpGJBMBNXPSDq38S9an7VG y6OfPNEC0J/kESskc5/7T1r9tLQxIJ6u0rHDuWVH5FG6ySxiSeMqWAMgK3H8WhXP WjDJim2nEHKxl27V6jgNXej0ioXe6N1G75ZzRCBvDIDRZ0TuKtZG7e+Q2/WtYSlk qCImvcOJJqd9emLIcgXgrYZqZwTfapTnfBCC5oMkXFHZ3RWdZOiIk4CpCFDawEey TjJb88Bh53RmVjtfQtOHsznm73vgh1IioX0p88Ct8WRs250BJFVLYxpKcLeNmVPu e+ohuN//QqVtUWgFjyvMT8HOuCXV1YzTo3fzAkOm7pIrNzocxAJerL+86mv5RdXw == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 571634109; Fri, 25 May 2018 17:16:16 -0400 (EDT) Message-Id: <1527282976.2998202.1385985472.601C2852@webmail.messagingengine.com> From: Brad Davis To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-29e6b281 Subject: Re: svn commit: r333407 - head/share/mk References: <201805091344.w49Dist5061908@repo.freebsd.org> <88989fda-4d0b-af16-8d08-28b6cdba0d34@FreeBSD.org> In-Reply-To: <88989fda-4d0b-af16-8d08-28b6cdba0d34@FreeBSD.org> Date: Fri, 25 May 2018 15:16:16 -0600 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:16:23 -0000 On Fri, May 25, 2018, at 3:10 PM, Bryan Drewery wrote: > On 5/9/2018 6:44 AM, Brad Davis wrote: > > Author: brd > > Date: Wed May 9 13:44:54 2018 > > New Revision: 333407 > > URL: https://svnweb.freebsd.org/changeset/base/333407 > > > > Log: > > Enable directory creation with FILESDIR. > > > > This is part of packaging base work. > > > > Reviewed by: will > > Approved by: bapt (mentor), allanjude (mentor) > > Differential Revision: https://reviews.freebsd.org/D15130 > > > > Please update share/mk/bsd.README too. > > I know I haven't been very responsive but it's partly because I'm still > fundamentally against this feature. It's adding a mechanism to replace > mtree without considering the whole picture and only binding it to FILES > rather than a bsd.dirs.mk; It doesn't actually satisfy replacing mtree > files since it only works if there is a FILESGROUP used (FILES must be > non-empty). So what's the point? My major concern is added confusion. > The creation of directories for installing is a pain point at work for > developers but I don't think this is enough. I liked the idea of > `install "-D"` but I know it's not efficient and had some implementation > issues. > > More below... Funny that you mention bsd.dirs.mk because that is coming.. after a reorg to fix a few other issues that will make this a lot easier.. > > Modified: > > head/share/mk/bsd.files.mk > > head/share/mk/bsd.own.mk > > > > Modified: head/share/mk/bsd.files.mk > > ============================================================================== > > --- head/share/mk/bsd.files.mk Wed May 9 12:25:23 2018 (r333406) > > +++ head/share/mk/bsd.files.mk Wed May 9 13:44:54 2018 (r333407) > > @@ -67,7 +67,7 @@ STAGE_AS_${file:T}= ${${group}NAME_${file:T}} > > STAGE_DIR.${file:T}= ${STAGE_OBJTOP}${${group}DIR_${file:T}} > > stage_as.${file:T}: ${file} > > > > -installfiles-${group}: _${group}INS_${file:T} > > +installfiles-${group}: installdirs-${group} _${group}INS_${file:T} > > _${group}INS_${file:T}: ${file} > > ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \ > > -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ > > @@ -77,10 +77,24 @@ _${group}INS_${file:T}: ${file} > > _${group}FILES+= ${file} > > .endif > > .endfor > > + > > + > > +installdirs-${group}: > > + @echo installing dirs ${group}DIR ${${group}DIR} > > +.for dir in ${${group}DIR} > > +.if defined(NO_ROOT) > > + ${INSTALL} ${${group}TAG_ARGS} -d ${DESTDIR}${dir} > > +.else > > + ${INSTALL} ${${group}TAG_ARGS} -d -o ${DIROWN} -g ${DIRGRP} \ > > + -m ${DIRMODE} ${DESTDIR}${dir} > > I missed this before but the OWN/GRP/MODE usage needs to be per group > just like the FILES group ones are above; it needs to be able to modify > the permissions per group rather than only using the globals. This is part of the coming bsd.dirs.mk work. I need to whack the last few bugs and push it for review. Regards, Brad Davis From owner-svn-src-head@freebsd.org Fri May 25 21:25:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2833BEF4DF1 for ; Fri, 25 May 2018 21:25:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49FFD754F4 for ; Fri, 25 May 2018 21:25:27 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 1f6b65ac-6062-11e8-8837-614b7c574d04 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 1f6b65ac-6062-11e8-8837-614b7c574d04; Fri, 25 May 2018 21:25:19 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w4PLPIpV008111; Fri, 25 May 2018 15:25:18 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1527283518.32688.164.camel@freebsd.org> Subject: Re: svn commit: r333407 - head/share/mk From: Ian Lepore To: Bryan Drewery , Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 25 May 2018 15:25:18 -0600 In-Reply-To: <88989fda-4d0b-af16-8d08-28b6cdba0d34@FreeBSD.org> References: <201805091344.w49Dist5061908@repo.freebsd.org> <88989fda-4d0b-af16-8d08-28b6cdba0d34@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:25:28 -0000 On Fri, 2018-05-25 at 14:10 -0700, Bryan Drewery wrote: > On 5/9/2018 6:44 AM, Brad Davis wrote: > > > > Author: brd > > Date: Wed May  9 13:44:54 2018 > > New Revision: 333407 > > URL: https://svnweb.freebsd.org/changeset/base/333407 > > > > Log: > >   Enable directory creation with FILESDIR. > >    > >   This is part of packaging base work. > >    > >   Reviewed by: will > >   Approved by: bapt (mentor), allanjude (mentor) > >   Differential Revision: https://reviews.freebsd.org/D15130 > > > Please update share/mk/bsd.README too. > > I know I haven't been very responsive but it's partly because I'm still > fundamentally against this feature. It's adding a mechanism to replace > mtree without considering the whole picture and only binding it to FILES > rather than a bsd.dirs.mk; It doesn't actually satisfy replacing mtree > files since it only works if there is a FILESGROUP used (FILES must be > non-empty). So what's the point? My major concern is added confusion. > The creation of directories for installing is a pain point at work for > developers but I don't think this is enough. I liked the idea of > `install "-D"` but I know it's not efficient and had some implementation > issues. I welcome this work. If it's not complete/perfect, we can iterate towards that, but mtree is not a good solution for out-of-tree builds that use the build machinery in /usr/share/mk. The lack of a solution other than mtree has led to half a dozen different hacks scattered around the makefiles in our application repo, and it's about time this hole in the build system gets plugged. -- Ian From owner-svn-src-head@freebsd.org Fri May 25 21:46:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A89E4EF55C2; Fri, 25 May 2018 21:46:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD79B76255; Fri, 25 May 2018 21:46:09 +0000 (UTC) (envelope-from bdrewery@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62CD3268D6; Fri, 25 May 2018 21:46:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PLk7V3009259; Fri, 25 May 2018 21:46:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PLk7vL009258; Fri, 25 May 2018 21:46:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201805252146.w4PLk7vL009258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 25 May 2018 21:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334226 - head/lib/libpmcstat/pmu-events X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/lib/libpmcstat/pmu-events X-SVN-Commit-Revision: 334226 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:46:10 -0000 Author: bdrewery Date: Fri May 25 21:46:07 2018 New Revision: 334226 URL: https://svnweb.freebsd.org/changeset/base/334226 Log: Cleanup style Modified: head/lib/libpmcstat/pmu-events/Makefile Modified: head/lib/libpmcstat/pmu-events/Makefile ============================================================================== --- head/lib/libpmcstat/pmu-events/Makefile Fri May 25 20:42:28 2018 (r334225) +++ head/lib/libpmcstat/pmu-events/Makefile Fri May 25 21:46:07 2018 (r334226) @@ -1,9 +1,10 @@ # $FreeBSD$ -PROG=jevents -SRCS=jevents.c jsmn.c json.c +PROG= jevents +SRCS= jevents.c jsmn.c json.c CFLAGS+= -Wno-cast-qual -.PATH: ${.CURDIR} -build-tools: jevents MAN= + +build-tools: jevents + .include From owner-svn-src-head@freebsd.org Fri May 25 21:46:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD817EF5648; Fri, 25 May 2018 21:46:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70DD17659C; Fri, 25 May 2018 21:46:50 +0000 (UTC) (envelope-from bdrewery@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51C2D268D8; Fri, 25 May 2018 21:46:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PLkomA009428; Fri, 25 May 2018 21:46:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PLkonH009427; Fri, 25 May 2018 21:46:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201805252146.w4PLkonH009427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 25 May 2018 21:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334227 - head/lib/libpmcstat X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/lib/libpmcstat X-SVN-Commit-Revision: 334227 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:46:50 -0000 Author: bdrewery Date: Fri May 25 21:46:49 2018 New Revision: 334227 URL: https://svnweb.freebsd.org/changeset/base/334227 Log: Use proper BTOOLSPATH for build-tools path. Modified: head/lib/libpmcstat/Makefile Modified: head/lib/libpmcstat/Makefile ============================================================================== --- head/lib/libpmcstat/Makefile Fri May 25 21:46:07 2018 (r334226) +++ head/lib/libpmcstat/Makefile Fri May 25 21:46:49 2018 (r334227) @@ -25,11 +25,7 @@ EVENT_ARCH="x86" EVENT_ARCH="powerpc" .endif -.if defined(HOST_OBJTOP) -JEVENTS= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents -.else -JEVENTS= pmu-events/jevents -.endif +JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents libpmcstat_events.c: ${JEVENTS} ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c From owner-svn-src-head@freebsd.org Fri May 25 21:46:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BAC6EF566D; Fri, 25 May 2018 21:46:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21C4B765C1; Fri, 25 May 2018 21:46:54 +0000 (UTC) (envelope-from bdrewery@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E313E268D9; Fri, 25 May 2018 21:46:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PLkr8s009473; Fri, 25 May 2018 21:46:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PLkrKN009472; Fri, 25 May 2018 21:46:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201805252146.w4PLkrKN009472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 25 May 2018 21:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334228 - head/lib/libpmcstat X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/lib/libpmcstat X-SVN-Commit-Revision: 334228 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:46:57 -0000 Author: bdrewery Date: Fri May 25 21:46:53 2018 New Revision: 334228 URL: https://svnweb.freebsd.org/changeset/base/334228 Log: META_MODE: Fix trying to rebuild jevents due to missing .meta file. The tool is built separately in buildworld in a subdirectory rather than how other build-tools are done. Subdirectory builds in lib/libpmcstat remain broken since the tool cannot be auto-built from here. Modified: head/lib/libpmcstat/Makefile Modified: head/lib/libpmcstat/Makefile ============================================================================== --- head/lib/libpmcstat/Makefile Fri May 25 21:46:49 2018 (r334227) +++ head/lib/libpmcstat/Makefile Fri May 25 21:46:53 2018 (r334228) @@ -26,6 +26,9 @@ EVENT_ARCH="powerpc" .endif JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents +# This file is built in a subdirectory so never try to rebuild +# it here due to missing meta file. +${JEVENTS}: .NOMETA libpmcstat_events.c: ${JEVENTS} ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c From owner-svn-src-head@freebsd.org Fri May 25 21:52:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08CF0EF59C3; Fri, 25 May 2018 21:52:36 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8664676D28; Fri, 25 May 2018 21:52:35 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-wm0-f48.google.com with SMTP id f8-v6so18028267wmc.4; Fri, 25 May 2018 14:52:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G9d+9FPRvAK3ZySvvp+AMUpG/QAiwdDA1q24Ka/cEb4=; b=fIvstsusWZM8bM57bH2nfv8VzKF+yyq4r+gxKZsKyCOs37IxGIkR2vb9irUD0uq7wR R5siwmtjIYsa22FzAVpXDVaOMvRkHasLZLpZuoxUOrGXNLjjslpDhLfsLyQi+cFTgPF1 ZrfjN1VfFJOozSYbFR3jufY0OuDNAl7/WT/kMjayf5HKjlUWgVtepNECtlhBMv4hVzyO /kPJspgRbGY8mwu9r7Bo/e/ENJQfaKjII7aM9doZ6TXFR3M49RCopHrVgB61qziqp2ZO F50pjpB2XZOht+aYsCDYA0DrlM6DpTFkmQm1sWEo8YaTQ/z2gsyeZUS7PnOoisqz7LTT 5yCQ== X-Gm-Message-State: ALKqPwewA6+7clqW2+zN7ykndtkFaGXrSlx2ZYXEa//WcOUv4fyE7C8W yIyM1ILZ8q5WnYMzlY7ic3udTS05msg= X-Google-Smtp-Source: ADUXVKL3Mmsf+lDT9XkC7Go/n80p8w+1oTBdHNQtreNVdKmXzbst2kS4DHJF/Ng7j6pjaclbpkqNEA== X-Received: by 2002:a2e:1947:: with SMTP id p68-v6mr2722787lje.114.1527284672614; Fri, 25 May 2018 14:44:32 -0700 (PDT) Received: from oxy (89-76-8-18.dynamic.chello.pl. [89.76.8.18]) by smtp.gmail.com with ESMTPSA id a199-v6sm3915370lfb.57.2018.05.25.14.44.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 May 2018 14:44:32 -0700 (PDT) Date: Fri, 25 May 2018 23:45:38 +0200 From: Mateusz Piotrowski <0mp@FreeBSD.org> To: Mark Felder Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334221 - head/etc Message-ID: <20180525234538.11977afc@oxy> In-Reply-To: <20180525225630.4a74642e@oxy> References: <201805251936.w4PJaQIf093393@repo.freebsd.org> <20180525225630.4a74642e@oxy> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:52:36 -0000 On Fri, 25 May 2018 22:56:30 +0200 Mateusz Piotrowski <0mp@FreeBSD.org> wrote: >On Fri, 25 May 2018 19:36:26 +0000 (UTC) >Mark Felder wrote: > >>Author: feld (ports committer) >>Date: Fri May 25 19:36:26 2018 >>New Revision: 334221 >>URL: https://svnweb.freebsd.org/changeset/base/334221 >> >>Log: >> rc.subr: Support loading environmental variables from a file >> >> The current support for setting environment via foo_env="" in rc.conf is >> not scalable and does not handle envs with spaces in the value. It seems >> a common pattern for some newer software is to skip configuration files >> altogether and rely on the env. This is well supported in systemd unit >> files and may be the inspiration for this trend. >> >> MFH: 1 week >> Differential Revision: https://reviews.freebsd.org/D14453 > >Do you plan to update the rc.subr manual as well? I've just submitted an update to the rc.subr manual to Phabricator. https://reviews.freebsd.org/D15578 From owner-svn-src-head@freebsd.org Fri May 25 23:47:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C00EAEF7821 for ; Fri, 25 May 2018 23:47:46 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-ot0-f195.google.com (mail-ot0-f195.google.com [74.125.82.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 559ED79AC3 for ; Fri, 25 May 2018 23:47:46 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-ot0-f195.google.com with SMTP id i5-v6so7863997otf.1 for ; Fri, 25 May 2018 16:47:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/KsQ0DO5IWoHMRgJKvqj/0Li/Z5PV9Oe8fg+dNbdVxU=; b=OAI+kuQLbjC+uRia0ER8KSulkVYlSQy99K7ivpXS71VQg7sD3afa1Cr8KOe0/8V0SG y8soHWfFcTYD4Hig7oTxBlDlF726E+X35yORrWDWPLGNlaO3RJAxt9MEaByFwx/1hwn5 ooVQiiBXs8bvjw4uiEfHa/O122ivVDWSoIof5hYJsyAFYWdpFKPA7mC6cQcWpOhuC+GK JwoHMGxL/sdR70vusvE9iZbXBVYFybPDm3MKqBj2zZkKJShCfyfz9iipd3yBHqtLeOAw /9dw5xm5knRUH6kexnOQ8UVdbdQqJSaDNfzgV9LDQzLiQpwv7GaLW8my/n72ZiQS1gWH IFNQ== X-Gm-Message-State: ALKqPwfcqZ7Xb3VRMEYI4kSdAeSDYI0wzt7oxQF8Wrel7Sm0Jk/ihfGQ PwWDIM5iFlV6PdzeCB9eUPaab1XC5EzxFuEqP+VtJQ== X-Google-Smtp-Source: ADUXVKKty3ZmQvs54xJM/EouTRqrs/fIldTxxvrX9MZrPWdB9QGTvJAIW1KP7K3fIxn/vrYrjlv+j4exWlxxR51wshE= X-Received: by 2002:a9d:40ad:: with SMTP id n42-v6mr2737540ote.389.1527291724400; Fri, 25 May 2018 16:42:04 -0700 (PDT) MIME-Version: 1.0 References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <20180525003949.GA710@lonesome.com> <05C5BD86-70D0-4B02-AC29-36E68B3602AE@FreeBSD.org> In-Reply-To: <05C5BD86-70D0-4B02-AC29-36E68B3602AE@FreeBSD.org> From: Maxim Sobolev Date: Fri, 25 May 2018 16:41:52 -0700 Message-ID: Subject: Re: Deorbiting i386 To: David Chisnall Cc: Mark Linimon , Matthew Macy , Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-Mailman-Approved-At: Sat, 26 May 2018 00:35:48 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 23:47:47 -0000 That again is very subjective view, David. Sorry. Arm32 is kinda kind of the hill these days in the low-power/low cost space, but arm as a company is much more interested it seems in going into server / mobile device space rather than solidifying it's current de-facto kingdom. Those platforms based on their IP are very short lived and tightly coupled to a particular vendor with zillions busses, various kinds of weird quirks, vendor-maintained bootloaders etc. On the other hand, Intel is quickly closing the gap. If you've seen any of the atom bay trail systems in action you may understand what I mean. You get full blown x64 system with four cores and it takes only 2W of power. This is roughly equivalent of ARM8 system with a single core @ only 900MHz. So my prediction is in the 32-bit land arm will fade out as a platform and be replaced with RiscV in matter of few years and i386 will probably continue to be the platform of choice for many if Intel/Amd play that card right. -Max On Fri, May 25, 2018, 12:27 AM David Chisnall wrote: > On 25 May 2018, at 05:27, Maxim Sobolev wrote: > > > > The idea looks very inmature and short-sighted to me. i386 is here to > stay not as a server/desktop platform but as an embedded/low power/low co= st > platform for at least 5-10 years to come. There are plenty of application= s > in the world that don't need > 3gb of memory space and have no use for > extra bits (and extra silicon) to function. > > This argument seems very odd to me. If you are targeting the embedded > space, it is far easier to build a low-power chip that targets the x86-64 > ISA than the x86-32 ISA. You can move all of the 80-bit floating point > stuff into microcode. You can put anything using pair-of-32-bit-register > 64-bit operations into slow microcode. You can skimp on store forwarding > for stack addresses. You actually need fewer rename registers (one of th= e > biggest consumers of power), because x86-64 code needs to do less registe= r > juggling to fit in the architectural register space. All of these things > are big consumers of power and area and are far less necessary when runni= ng > code compiled for x86-64. You can also do tricks like the one that Intel > did on the early Atoms, where the SSE ALUs are actually only 64 bits wide > and the 128-bit ops are cracked into pairs of 64-bit micro-ops. > > As to =E2=80=98not needing more than 3GB of memory space=E2=80=99, that= =E2=80=99s what the x32 ABI > is for. This lets you get all of the advantages of the x86-64 ISA (of > which there are very many, in comparison to x86-32), without needing 64-b= it > pointers. You get the instruction density of x86-64 combined with the da= ta > density of x86-32. This is what Intel and Centaur have been pushing in t= he > embedded space for several years. > > You do pay a slight hardware cost from supporting a 48-bit virtual addres= s > space, though with superpages that=E2=80=99s negligible and the hardware = targeted > at these applications often doesn=E2=80=99t support more than a 32-bit vi= rtual > address space. > > And this completely ignores the fact that Intel has almost no presence in > the low-end embedded space. AArch32 is vastly more important there and i= f > we dropped x86-32 and shifted that effort to AArch32 then I think we=E2= =80=99d see > a lot more adoption. > > David > From owner-svn-src-head@freebsd.org Sat May 26 00:41:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FCB5EF8E54; Sat, 26 May 2018 00:41:51 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CE087B384; Sat, 26 May 2018 00:41:51 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F34645B9; Sat, 26 May 2018 00:41:50 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4Q0foo9097995; Sat, 26 May 2018 00:41:50 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4Q0foJ7097994; Sat, 26 May 2018 00:41:50 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201805260041.w4Q0foJ7097994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 26 May 2018 00:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334230 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 334230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 00:41:51 -0000 Author: jhibbits Date: Sat May 26 00:41:50 2018 New Revision: 334230 URL: https://svnweb.freebsd.org/changeset/base/334230 Log: Only crop the VPN on POWER4 and derivatives for TLBIE operations Summary: PowerISA 2.03 and later require bits 14:65 in the RB register argument, which is the full value of the vpn argument post-shift. Only POWER4, POWER4+, and PPC970* need the upper 16 bits cropped. With this change FreeBSD can boot to multi-user on POWER9. Reviewed by: nwhitehorn Differential Revision: https://reviews.freebsd.org/D15581 Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Fri May 25 23:18:06 2018 (r334229) +++ head/sys/powerpc/aim/moea64_native.c Sat May 26 00:41:50 2018 (r334230) @@ -133,6 +133,8 @@ __FBSDID("$FreeBSD$"); /* POWER9 only permits a 64k partition table size. */ #define PART_SIZE 0x10000 +static int moea64_crop_tlbie; + static __inline void TLBIE(uint64_t vpn) { #ifndef __powerpc64__ @@ -144,12 +146,14 @@ TLBIE(uint64_t vpn) { static volatile u_int tlbie_lock = 0; vpn <<= ADDR_PIDX_SHFT; - vpn &= ~(0xffffULL << 48); /* Hobo spinlock: we need stronger guarantees than mutexes provide */ while (!atomic_cmpset_int(&tlbie_lock, 0, 1)); isync(); /* Flush instruction queue once lock acquired */ + if (moea64_crop_tlbie) + vpn &= ~(0xffffULL << 48); + #ifdef __powerpc64__ __asm __volatile("tlbie %0" :: "r"(vpn) : "memory"); __asm __volatile("eieio; tlbsync; ptesync" ::: "memory"); @@ -428,6 +432,15 @@ moea64_bootstrap_native(mmu_t mmup, vm_offset_t kernel moea64_early_bootstrap(mmup, kernelstart, kernelend); + switch (mfpvr() >> 16) { + case IBMPOWER4: + case IBMPOWER4PLUS: + case IBM970: + case IBM970FX: + case IBM970GX: + case IBM970MP: + moea64_crop_tlbie = true; + } /* * Allocate PTEG table. */ From owner-svn-src-head@freebsd.org Sat May 26 00:46:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4304CEF9041; Sat, 26 May 2018 00:46:09 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E149E7B575; Sat, 26 May 2018 00:46:08 +0000 (UTC) (envelope-from erj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6A5E6FD; Sat, 26 May 2018 00:46:08 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4Q0k8JZ099091; Sat, 26 May 2018 00:46:08 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4Q0k8l2099090; Sat, 26 May 2018 00:46:08 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201805260046.w4Q0k8l2099090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Sat, 26 May 2018 00:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334231 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: erj X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 334231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 00:46:09 -0000 Author: erj Date: Sat May 26 00:46:08 2018 New Revision: 334231 URL: https://svnweb.freebsd.org/changeset/base/334231 Log: iflib: Add new shared flag: IFLIB_ADMIN_ALWAYS_RUN ixl(4)'s nvmupdate utility expects the nvmupdate process to run while the interface is down; these nvm update commands use the admin queue, so the admin queue needs to be able to generate interrupts and be processed while the interface is down. So add a flag that ixl(4) sets that lets the entire admin task run even when the interface is marked down/IFF_DRV_RUNNING isn't set. With this change, nvmupdate should function like it did pre-iflib. Reviewed by: gallatin@, sbruno@ MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D15575 Modified: head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat May 26 00:41:50 2018 (r334230) +++ head/sys/net/iflib.c Sat May 26 00:46:08 2018 (r334231) @@ -3807,7 +3807,8 @@ _task_fn_admin(void *context) ctx->ifc_flags &= ~(IFC_DO_RESET|IFC_DO_WATCHDOG); STATE_UNLOCK(ctx); - if (!running & !oactive) + if ((!running & !oactive) && + !(ctx->ifc_sctx->isc_flags & IFLIB_ADMIN_ALWAYS_RUN)) return; CTX_LOCK(ctx); Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Sat May 26 00:41:50 2018 (r334230) +++ head/sys/net/iflib.h Sat May 26 00:46:08 2018 (r334231) @@ -358,7 +358,10 @@ typedef enum { * autogenerate a MAC address */ #define IFLIB_GEN_MAC 0x08000 - +/* + * Interface needs admin task to ignore interface up/down status + */ +#define IFLIB_ADMIN_ALWAYS_RUN 0x10000 /* From owner-svn-src-head@freebsd.org Sat May 26 02:45:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4567FEFBCD8; Sat, 26 May 2018 02:45:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA2317EB9E; Sat, 26 May 2018 02:45:41 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB46A1AB8; Sat, 26 May 2018 02:45:41 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4Q2jfkk059536; Sat, 26 May 2018 02:45:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4Q2jfKh059535; Sat, 26 May 2018 02:45:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201805260245.w4Q2jfKh059535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 26 May 2018 02:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334232 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 334232 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 02:45:42 -0000 Author: jhibbits Date: Sat May 26 02:45:41 2018 New Revision: 334232 URL: https://svnweb.freebsd.org/changeset/base/334232 Log: Correct a typo for opal temperature sensor type constant Modified: head/sys/powerpc/powernv/opal_sensor.c Modified: head/sys/powerpc/powernv/opal_sensor.c ============================================================================== --- head/sys/powerpc/powernv/opal_sensor.c Sat May 26 00:46:08 2018 (r334231) +++ head/sys/powerpc/powernv/opal_sensor.c Sat May 26 02:45:41 2018 (r334232) @@ -228,7 +228,7 @@ opal_sensor_attach(device_t dev) SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "sensor_min", CTLTYPE_INT | CTLFLAG_RD, sc, sensor_id, opal_sensor_sysctl, - (sc->sc_type == OPAL_MSG_TYPE_MAX) ? "IK" : "I", + (sc->sc_type == OPAL_SENSOR_TEMP) ? "IK" : "I", "minimum value"); } @@ -238,7 +238,7 @@ opal_sensor_attach(device_t dev) SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "sensor_max", CTLTYPE_INT | CTLFLAG_RD, sc, sensor_id, opal_sensor_sysctl, - (sc->sc_type == OPAL_MSG_TYPE_MAX) ? "IK" : "I", + (sc->sc_type == OPAL_SENSOR_TEMP) ? "IK" : "I", "maximum value"); } From owner-svn-src-head@freebsd.org Sat May 26 02:59:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0182EFC785; Sat, 26 May 2018 02:59:35 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 564D67F35C; Sat, 26 May 2018 02:59:35 +0000 (UTC) (envelope-from alc@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29C0D1C48; Sat, 26 May 2018 02:59:35 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4Q2xYsl064895; Sat, 26 May 2018 02:59:34 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4Q2xYQP064894; Sat, 26 May 2018 02:59:34 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201805260259.w4Q2xYQP064894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 26 May 2018 02:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334233 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 334233 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 02:59:35 -0000 Author: alc Date: Sat May 26 02:59:34 2018 New Revision: 334233 URL: https://svnweb.freebsd.org/changeset/base/334233 Log: Use pmap_enter(..., psind=1) in vm_fault_populate() on amd64. While superpage mappings were already being created by automatic promotion in vm_fault_populate(), this change reduces the cost of creating those mappings. Essentially, one pmap_enter(..., psind=1) call takes the place of 512 pmap_enter(..., psind=0) calls, and that one pmap_enter(..., psind=1) call eliminates the allocation of a page table page. Reviewed by: kib MFC after: 10 days Differential Revision: https://reviews.freebsd.org/D15572 Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat May 26 02:45:41 2018 (r334232) +++ head/sys/vm/vm_fault.c Sat May 26 02:59:34 2018 (r334233) @@ -380,9 +380,11 @@ static int vm_fault_populate(struct faultstate *fs, vm_prot_t prot, int fault_type, int fault_flags, boolean_t wired, vm_page_t *m_hold) { + struct mtx *m_mtx; + vm_offset_t vaddr; vm_page_t m; vm_pindex_t map_first, map_last, pager_first, pager_last, pidx; - int rv; + int i, npages, psind, rv; MPASS(fs->object == fs->first_object); VM_OBJECT_ASSERT_WLOCKED(fs->first_object); @@ -455,26 +457,44 @@ vm_fault_populate(struct faultstate *fs, vm_prot_t pro pager_last = map_last; } for (pidx = pager_first, m = vm_page_lookup(fs->first_object, pidx); - pidx <= pager_last; pidx++, m = vm_page_next(m)) { - vm_fault_populate_check_page(m); - vm_fault_dirty(fs->entry, m, prot, fault_type, fault_flags, - true); + pidx <= pager_last; + pidx += npages, m = vm_page_next(&m[npages - 1])) { + vaddr = fs->entry->start + IDX_TO_OFF(pidx) - fs->entry->offset; +#if defined(__amd64__) + psind = m->psind; + if (psind > 0 && ((vaddr & (pagesizes[psind] - 1)) != 0 || + pidx + OFF_TO_IDX(pagesizes[psind]) - 1 > pager_last || + !pmap_ps_enabled(fs->map->pmap))) + psind = 0; +#else + psind = 0; +#endif + npages = atop(pagesizes[psind]); + for (i = 0; i < npages; i++) { + vm_fault_populate_check_page(&m[i]); + vm_fault_dirty(fs->entry, &m[i], prot, fault_type, + fault_flags, true); + } VM_OBJECT_WUNLOCK(fs->first_object); - pmap_enter(fs->map->pmap, fs->entry->start + IDX_TO_OFF(pidx) - - fs->entry->offset, m, prot, fault_type | (wired ? - PMAP_ENTER_WIRED : 0), 0); + pmap_enter(fs->map->pmap, vaddr, m, prot, fault_type | (wired ? + PMAP_ENTER_WIRED : 0), psind); VM_OBJECT_WLOCK(fs->first_object); - if (pidx == fs->first_pindex) - vm_fault_fill_hold(m_hold, m); - vm_page_lock(m); - if ((fault_flags & VM_FAULT_WIRE) != 0) { - KASSERT(wired, ("VM_FAULT_WIRE && !wired")); - vm_page_wire(m); - } else { - vm_page_activate(m); + m_mtx = NULL; + for (i = 0; i < npages; i++) { + vm_page_change_lock(&m[i], &m_mtx); + if ((fault_flags & VM_FAULT_WIRE) != 0) { + KASSERT(wired, ("VM_FAULT_WIRE && !wired")); + vm_page_wire(&m[i]); + } else + vm_page_activate(&m[i]); + if (m_hold != NULL && m[i].pindex == fs->first_pindex) { + *m_hold = &m[i]; + vm_page_hold(&m[i]); + } + vm_page_xunbusy(&m[i]); } - vm_page_unlock(m); - vm_page_xunbusy(m); + if (m_mtx != NULL) + mtx_unlock(m_mtx); } curthread->td_ru.ru_majflt++; return (KERN_SUCCESS); From owner-svn-src-head@freebsd.org Sat May 26 04:24:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FE1DEFD854; Sat, 26 May 2018 04:24:26 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CF7581821; Sat, 26 May 2018 04:24:26 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC4F12BEB; Sat, 26 May 2018 04:24:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4Q4OP2p010663; Sat, 26 May 2018 04:24:25 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4Q4OPTh010662; Sat, 26 May 2018 04:24:25 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201805260424.w4Q4OPTh010662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 26 May 2018 04:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334234 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 334234 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 04:24:26 -0000 Author: jhibbits Date: Sat May 26 04:24:25 2018 New Revision: 334234 URL: https://svnweb.freebsd.org/changeset/base/334234 Log: Fix a typo missed in r334232 Modified: head/sys/powerpc/powernv/opal_sensor.c Modified: head/sys/powerpc/powernv/opal_sensor.c ============================================================================== --- head/sys/powerpc/powernv/opal_sensor.c Sat May 26 02:59:34 2018 (r334233) +++ head/sys/powerpc/powernv/opal_sensor.c Sat May 26 04:24:25 2018 (r334234) @@ -211,7 +211,7 @@ opal_sensor_attach(device_t dev) sc->sc_handle = sensor_id; SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "sensor", CTLTYPE_INT | CTLFLAG_RD, sc, sensor_id, - opal_sensor_sysctl, (sc->sc_type == OPAL_MSG_TYPE_MAX) ? "IK" : "I", + opal_sensor_sysctl, (sc->sc_type == OPAL_SENSOR_TEMP) ? "IK" : "I", "current value"); SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "type", From owner-svn-src-head@freebsd.org Sat May 26 04:33:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CA43EFDB1C; Sat, 26 May 2018 04:33:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B38A681F0D; Sat, 26 May 2018 04:33:20 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9447F2D83; Sat, 26 May 2018 04:33:20 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4Q4XKN5015834; Sat, 26 May 2018 04:33:20 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4Q4XKlu015832; Sat, 26 May 2018 04:33:20 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201805260433.w4Q4XKlu015832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 26 May 2018 04:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334235 - in head/sys/powerpc: aim include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: aim include X-SVN-Commit-Revision: 334235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 04:33:21 -0000 Author: jhibbits Date: Sat May 26 04:33:19 2018 New Revision: 334235 URL: https://svnweb.freebsd.org/changeset/base/334235 Log: On POWER9 clear the HID0_RADIX before enabling the page tables POWER9 supports Radix page tables in addition to Hashed page tables. When Radix page tables are in use, the TLB is cut in half, so that half of the TLB is used for the page walk cache. This is the default behavior, however FreeBSD currently does not support Radix tables. Clear this bit so that we can use the full TLB. Do this in the MMU logic so that configuration can be localized to the specific translation format. Once we do support Radix tables, the setup for that will be localized to the Radix MMU kobj. Modified: head/sys/powerpc/aim/moea64_native.c head/sys/powerpc/include/hid.h Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Sat May 26 04:24:25 2018 (r334234) +++ head/sys/powerpc/aim/moea64_native.c Sat May 26 04:33:19 2018 (r334235) @@ -116,6 +116,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -383,6 +384,12 @@ moea64_cpu_bootstrap_native(mmu_t mmup, int ap) */ mtmsr(mfmsr() & ~PSL_DR & ~PSL_IR); + + switch (mfpvr() >> 16) { + case IBMPOWER9: + mtspr(SPR_HID0, mfspr(SPR_HID0) & ~HID0_RADIX); + break; + } /* * Install kernel SLB entries Modified: head/sys/powerpc/include/hid.h ============================================================================== --- head/sys/powerpc/include/hid.h Sat May 26 04:24:25 2018 (r334234) +++ head/sys/powerpc/include/hid.h Sat May 26 04:33:19 2018 (r334235) @@ -33,6 +33,7 @@ #define _POWERPC_HID_H_ /* Hardware Implementation Dependent registers for the PowerPC */ +#define HID0_RADIX 0x0080000000000000 /* Enable Radix page tables (POWER9) */ #define HID0_EMCP 0x80000000 /* Enable machine check pin */ #define HID0_DBP 0x40000000 /* Disable 60x bus parity generation */ From owner-svn-src-head@freebsd.org Sat May 26 05:15:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA729EFE498; Sat, 26 May 2018 05:15:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5750882CC6; Sat, 26 May 2018 05:15:08 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3367B33E2; Sat, 26 May 2018 05:15:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4Q5F86S035726; Sat, 26 May 2018 05:15:08 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4Q5F8mQ035725; Sat, 26 May 2018 05:15:08 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805260515.w4Q5F8mQ035725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 26 May 2018 05:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334236 - head/sbin/kldstat X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/kldstat X-SVN-Commit-Revision: 334236 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 05:15:08 -0000 Author: eadler Date: Sat May 26 05:15:07 2018 New Revision: 334236 URL: https://svnweb.freebsd.org/changeset/base/334236 Log: kldstat: align "Size" to the right This change also makes alignment and spacing an explicit number rather than a bunch of spaces. Reviewed by: mmacy Requested by: Yuri Pankov Modified: head/sbin/kldstat/kldstat.c Modified: head/sbin/kldstat/kldstat.c ============================================================================== --- head/sbin/kldstat/kldstat.c Sat May 26 04:33:19 2018 (r334235) +++ head/sbin/kldstat/kldstat.c Sat May 26 05:15:07 2018 (r334236) @@ -190,9 +190,9 @@ main(int argc, char** argv) } if (humanized) - printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' '); + printf("Id Refs Address%*c %5s Name\n", POINTER_WIDTH - 7, ' ', "Size"); else - printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' '); + printf("Id Refs Address%*c %8s Name\n", POINTER_WIDTH - 7, ' ', "Size"); if (fileid != 0) printfile(fileid, verbose, humanized); else From owner-svn-src-head@freebsd.org Sat May 26 05:42:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B8FBEFEAEA for ; Sat, 26 May 2018 05:42:48 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9D9D836F2 for ; Sat, 26 May 2018 05:42:47 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yw0-f170.google.com (mail-yw0-f170.google.com [209.85.161.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id 932542030E for ; Sat, 26 May 2018 05:42:47 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yw0-f170.google.com with SMTP id v190-v6so18502ywa.12 for ; Fri, 25 May 2018 22:42:47 -0700 (PDT) X-Gm-Message-State: ALKqPwf0SmGmz8mGpJ1uG4Sm+Zm7Oso9k+6Rbw5ky44dP81PRxFwHv90 JFnvcIMG7/cJ24ptuJk8Z+rCXhC7s/SBOzoZcmtpKg== X-Google-Smtp-Source: ADUXVKK3g7l843zN0H/5HFCHF1si3LKgPDPc4+Mvl2txKNmBEk89aPze4DdjdLsLirNc98aMGAdBsd98Gk9rZYtuduI= X-Received: by 2002:a81:a68a:: with SMTP id d132-v6mr2900901ywh.387.1527313366931; Fri, 25 May 2018 22:42:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Fri, 25 May 2018 22:42:16 -0700 (PDT) In-Reply-To: <20180521063953.GA70671@FreeBSD.org> References: <201805202319.w4KNJ9hj038452@repo.freebsd.org> <20180521094344.Q1053@besplex.bde.org> <20180521063953.GA70671@FreeBSD.org> From: Eitan Adler Date: Fri, 25 May 2018 22:42:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333945 - head/usr.bin/top To: Alexey Dokuchaev Cc: Bruce Evans , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 05:42:48 -0000 On 20 May 2018 at 23:39, Alexey Dokuchaev wrote: > On Mon, May 21, 2018 at 10:32:30AM +1000, Bruce Evans wrote: >> ... >> > if (smpmode && namelength > SMPUNAMELEN) >> > namelength = SMPUNAMELEN; >> > else if (namelength > UPUNAMELEN) >> ... what about this? commit 7d041879b4d0ad11818b5f5875b1198a722841d7 Author: Eitan Adler Date: Sat May 26 04:30:48 2018 +0000 top(1): allow to configure the max username length Some users prefer shorter names, and MAXLOGNAME is not a perfect method of coming up with a default. Use 8, by request, and allow users to configure it. diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 0f31d87..d6a9b41 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -50,8 +50,9 @@ #include "layout.h" #define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var)) -#define SMPUNAMELEN 13 -#define UPUNAMELEN 15 +#ifndef MAXTOPNAMELEN +#define MAXTOPNAMELEN 8 +#endif extern struct timeval timeout; static int smpmode; @@ -329,11 +330,7 @@ machine_init(struct statics *statics) NULL, 0) == 0 && carc_en == 1) carc_enabled = 1; - namelength = MAXLOGNAME; - if (smpmode && namelength > SMPUNAMELEN) - namelength = SMPUNAMELEN; - else if (namelength > UPUNAMELEN) - namelength = UPUNAMELEN; + namelength = MAXTOPNAMELEN; kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open"); if (kd == NULL) -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Sat May 26 08:43:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED3FBF6E0B7; Sat, 26 May 2018 08:43:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 2FA7087E08; Sat, 26 May 2018 08:43:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 32B4D104C4AE; Sat, 26 May 2018 18:42:54 +1000 (AEST) Date: Sat, 26 May 2018 18:42:53 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler cc: Alexey Dokuchaev , Bruce Evans , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r333945 - head/usr.bin/top In-Reply-To: Message-ID: <20180526175225.Y2558@besplex.bde.org> References: <201805202319.w4KNJ9hj038452@repo.freebsd.org> <20180521094344.Q1053@besplex.bde.org> <20180521063953.GA70671@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=uyavkMrdAAAA:8 a=2Zs28DNd_5JVJXk8RF0A:9 a=LgjS_5B3MOc4BwW_:21 a=bYBxrsk4H7JLRLFv:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=j2_G595jqNHTxQgNwHU2:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 08:43:04 -0000 On Fri, 25 May 2018, Eitan Adler wrote: > On 20 May 2018 at 23:39, Alexey Dokuchaev wrote: >> On Mon, May 21, 2018 at 10:32:30AM +1000, Bruce Evans wrote: >>> ... >>>> if (smpmode && namelength > SMPUNAMELEN) >>>> namelength = SMPUNAMELEN; >>>> else if (namelength > UPUNAMELEN) >>> > ... > > what about this? It is now too simple. > commit 7d041879b4d0ad11818b5f5875b1198a722841d7 > Author: Eitan Adler > Date: Sat May 26 04:30:48 2018 +0000 > > top(1): allow to configure the max username length > > Some users prefer shorter names, and MAXLOGNAME is not a perfect method > of coming up with a default. Use 8, by request, and allow users to > configure it. 8 was the (default) minimum name length, but this makes it the (default) maximum. This is a surprising change... > diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c > index 0f31d87..d6a9b41 100644 > --- a/usr.bin/top/machine.c > +++ b/usr.bin/top/machine.c > @@ -50,8 +50,9 @@ > #include "layout.h" > > #define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var)) > -#define SMPUNAMELEN 13 > -#define UPUNAMELEN 15 > +#ifndef MAXTOPNAMELEN > +#define MAXTOPNAMELEN 8 > +#endif 13 was not too bad as a default maximum. 15 was bogus. Most users use SMP so would never see 15 being used. The extra 2 for UP is to waste space made available by not having a column for the CPU number. But width 2 for this field broke a year or 2 ago on large systems with more than 99 CPUs. The format string for the CPU number is still hard-coded to " %2d". Several fields are formatted correctly with variable width. The USER field is one of these. > > extern struct timeval timeout; > static int smpmode; > @@ -329,11 +330,7 @@ machine_init(struct statics *statics) > NULL, 0) == 0 && carc_en == 1) > carc_enabled = 1; > > - namelength = MAXLOGNAME; > - if (smpmode && namelength > SMPUNAMELEN) > - namelength = SMPUNAMELEN; > - else if (namelength > UPUNAMELEN) > - namelength = UPUNAMELEN; > + namelength = MAXTOPNAMELEN; > > kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open"); > if (kd == NULL) I don't like having many run-time configuration options, but one for this would work well. Default to either 8 or 13 so as to not surprise too many users. But have a runtime option to set change the default. This is almost as easy as having a compile-time option (don't have both). It takes just 1 letter in the getopt string and 3 lines in a case statement for top's usual sloppy arg parsing (case X; namelength = atoi(optarg); break;). Documentation takes about the same as for a compile-time option. The old code would have been efficient enough on most systems it it had stopped trying to find the longest name after finding one that is as long as the maximum. To avoid long scans on large systems with a silly order of user name (like sorting the shortest ones first), stop after about 100 names. I think adjusting the format to match the width of the USER field is done correctly. Thus dynamically reducing the width to much less than 8 is already useful for getting more columns in the COMMAND field. AFAIK there is no way to control the widths of the other fields. Certainly not the CPU number field. Bruce From owner-svn-src-head@freebsd.org Sat May 26 04:24:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71E05EFD875; Sat, 26 May 2018 04:24:35 +0000 (UTC) (envelope-from lidl@pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254:11::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E92381902; Sat, 26 May 2018 04:24:35 +0000 (UTC) (envelope-from lidl@pix.net) Received: from torb.pix.net (torb.pix.net [192.168.16.32]) (authenticated bits=0) by hydra.pix.net (8.15.2/8.15.2) with ESMTPA id w4Q4OILd036768; Sat, 26 May 2018 00:24:18 -0400 (EDT) (envelope-from lidl@pix.net) Subject: Re: Deorbiting i386 To: Matthew Macy , Andrew Gallatin Cc: Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> From: Kurt Lidl Message-ID: <3bedf170-4f51-9b49-8f52-fc6d0dd4e342@pix.net> Date: Sat, 26 May 2018 00:24:18 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 26 May 2018 11:00:00 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 04:24:35 -0000 On 5/24/18 3:22 PM, Matthew Macy wrote: > i386 is definitely on the wane, but so long as it's used by more than > a handful of people it will be supported. All you need to know about > sparc64 vitality is that HEAD didn't boot for 3 months until last week. I stopped testing HEAD on sparc64 when the introduction if the iflib'd igb driver made booting on a sparc64 equipped with a dual-port igb PCI card stop working. -Kurt From owner-svn-src-head@freebsd.org Sat May 26 04:29:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A23E6EFD965; Sat, 26 May 2018 04:29:43 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41F9181B8B; Sat, 26 May 2018 04:29:42 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 0016D388; Fri, 25 May 2018 23:29:35 -0500 (CDT) Date: Fri, 25 May 2018 23:29:34 -0500 From: Mark Linimon To: Matthew Macy Cc: Kurt Lidl , Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: Deorbiting i386 Message-ID: <20180526042934.GA4634@lonesome.com> References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <3bedf170-4f51-9b49-8f52-fc6d0dd4e342@pix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Sat, 26 May 2018 11:00:08 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 04:29:43 -0000 On Fri, May 25, 2018 at 09:27:43PM -0700, Matthew Macy wrote: > So we should have added an Ultra II off of ebay to our test matrix? You've made your point. Next. mcl From owner-svn-src-head@freebsd.org Sat May 26 04:27:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB111EFD924; Sat, 26 May 2018 04:27:44 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36BC081A80; Sat, 26 May 2018 04:27:44 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by mail-io0-x231.google.com with SMTP id y2-v6so3273099iob.11; Fri, 25 May 2018 21:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qGEsRCmgbOnUQYdcHN5K2lIq8QiN7rnxIxPAv8oDt6Y=; b=PcarMnVm+zh9iGK4277IIn2YMo2xDq7hjFXHCbR55U24hxJKefQbZsNwfAD4YytdlK za5xy/L35B/9IiyRKb2GJdgozAS1ksVJsb5vSGUJfCQP2s+FlYFibBK/CrCUX4OcbAzO qVZmsSnzrutlknzeZJofXwxszYy91bpw/ZvPVy655p2SioJA1V1Hl4sYtqMh4yboUlAx kT/ZsvBP7HYRhojZu+ycrPi7LZUyDeSKDcKlgsBIyRbRsXctawi1Geb0Qbmph+N3dWoG osHk5CsMn+YVXqm7nUX+5NizNsZLocAgwjpuJ8MgXlwx5OLwMYCRSv3mhIdYEZU6DuSC mv0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qGEsRCmgbOnUQYdcHN5K2lIq8QiN7rnxIxPAv8oDt6Y=; b=NKPy6yVKYPxZPSL4ZOyHMtkL6Z5IybBb3UTiljEBplV0jSo5rWaPIzXJ+4fXnbKfvd 55Vjvwc2QR2oH5+GPezVej4De3ExPbgUkF50XASWZ7ftT8i6p2Aaq07+ey4/I1bKajIg j2XiN1IfcCQgcts//C+9oznFdUKyvMCJnCF2myBoMxSNY+ciJbPoYgVH9M7/iFAkn6Aj Jjig5kRtm89VQltUTmIXNyDsf5YmdSgSDrwKc+CWuUYYY+rUbnBA8VbtZSeIaOoNIvVB yhVJxOzAcWfecZ+V2Eu4h9pq1MBZdusK1dmmPRYwDHDC+Kao2EzocQmwOSt/mjn6S5ei BFpA== X-Gm-Message-State: ALKqPwcSKYyU2yuZDV1hkTll/Wv7caO+y/oRYWdTNi0t6jZMDdWK/5Cs qo3ub+5e0StkIDt5xPKWJfha48nuYNGvtyq++iqAqg== X-Google-Smtp-Source: ADUXVKIqiIQt+xsQWUsP/yLMDBnBQeHjRF0/BnOjGDcgFKjEULHoDiiaXTt0AnU8dj+LCL4rcFXUU3cDW/XiiIbsNbE= X-Received: by 2002:a6b:3b43:: with SMTP id i64-v6mr4434529ioa.133.1527308863511; Fri, 25 May 2018 21:27:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Fri, 25 May 2018 21:27:43 -0700 (PDT) In-Reply-To: <3bedf170-4f51-9b49-8f52-fc6d0dd4e342@pix.net> References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <3bedf170-4f51-9b49-8f52-fc6d0dd4e342@pix.net> From: Matthew Macy Date: Fri, 25 May 2018 21:27:43 -0700 Message-ID: Subject: Re: Deorbiting i386 To: Kurt Lidl Cc: Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Mark Linimon , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Sat, 26 May 2018 11:00:07 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 04:27:44 -0000 On Fri, May 25, 2018 at 9:24 PM, Kurt Lidl wrote: > On 5/24/18 3:22 PM, Matthew Macy wrote: >> >> i386 is definitely on the wane, but so long as it's used by more than >> a handful of people it will be supported. All you need to know about >> sparc64 vitality is that HEAD didn't boot for 3 months until last week. > > > I stopped testing HEAD on sparc64 when the introduction if the iflib'd > igb driver made booting on a sparc64 equipped with a dual-port igb > PCI card stop working. So we should have added an Ultra II off of ebay to our test matrix? -M From owner-svn-src-head@freebsd.org Sat May 26 11:13:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B8EFF7196C; Sat, 26 May 2018 11:13:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E19A6BA17; Sat, 26 May 2018 11:13:18 +0000 (UTC) (envelope-from trasz@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00220721A; Sat, 26 May 2018 11:13:17 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QBDHXs014903; Sat, 26 May 2018 11:13:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QBDHEv014902; Sat, 26 May 2018 11:13:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201805261113.w4QBDHEv014902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 26 May 2018 11:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334237 - in head: etc/defaults release/tools X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: etc/defaults release/tools X-SVN-Commit-Revision: 334237 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 11:13:18 -0000 Author: trasz Date: Sat May 26 11:13:17 2018 New Revision: 334237 URL: https://svnweb.freebsd.org/changeset/base/334237 Log: Revert r333493, which was a temporary fix for 11.2-RELEASE, and instead switch the default kldxref_enable to YES. The reason is that it's required for every image that's being cross-built, as kldxref(8) cannot handle files for non-native architectures. For the one that is not - amd64 - having it on by default doesn't change anything; the script is noop if the linker.hints already exists. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/etc/defaults/rc.conf head/release/tools/arm.subr Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat May 26 05:15:07 2018 (r334236) +++ head/etc/defaults/rc.conf Sat May 26 11:13:17 2018 (r334237) @@ -43,7 +43,7 @@ devd_enable="YES" # Run devd, to trigger programs on devd_flags="" # Additional flags for devd(8). devmatch_enable="YES" # Demand load kernel modules based on device ids. #kld_list="" # Kernel modules to load after local disks are mounted -kldxref_enable="NO" # Build linker.hints files with kldxref(8). +kldxref_enable="YES" # Build linker.hints files with kldxref(8). kldxref_clobber="NO" # Overwrite old linker.hints at boot. kldxref_module_path="" # Override kern.module_path. A ';'-delimited list. powerd_enable="NO" # Run powerd to lower our power usage. Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Sat May 26 05:15:07 2018 (r334236) +++ head/release/tools/arm.subr Sat May 26 11:13:17 2018 (r334237) @@ -122,7 +122,6 @@ arm_install_base() { echo 'sendmail_outbound_enable="NO"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'sendmail_msp_queue_enable="NO"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'growfs_enable="YES"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf - echo 'kldxref_enable="YES"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf sync umount_loop ${CHROOTDIR}/${DESTDIR} From owner-svn-src-head@freebsd.org Sat May 26 07:58:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E10A1F6BCF6; Sat, 26 May 2018 07:58:31 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [46.226.110.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "theravensnest.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FE4A868C1; Sat, 26 May 2018 07:58:31 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.1.65] (host109-159-20-183.range109-159.btcentralplus.com [109.159.20.183]) (authenticated bits=0) by theravensnest.org (8.15.2/8.15.2) with ESMTPSA id w4Q7w0B4091172 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 26 May 2018 07:58:00 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: mail: Host host109-159-20-183.range109-159.btcentralplus.com [109.159.20.183] claimed to be [192.168.1.65] Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Deorbiting i386 From: David Chisnall In-Reply-To: Date: Sat, 26 May 2018 08:58:02 +0100 Cc: Mark Linimon , Matthew Macy , Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1A6567CD-5BE8-4E80-A262-00ADB75CF35A@FreeBSD.org> References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <20180525003949.GA710@lonesome.com> <05C5BD86-70D0-4B02-AC29-36E68B3602AE@FreeBSD.org> To: Maxim Sobolev X-Mailer: Apple Mail (2.3273) X-Mailman-Approved-At: Sat, 26 May 2018 11:30:00 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 07:58:32 -0000 On 26 May 2018, at 00:41, Maxim Sobolev wrote: >=20 > If you've seen any of the atom bay trail systems in action you may = understand what I mean. You get full blown x64 system with four cores = and it takes only 2W of power. Which is pretty much my point - if you want a low-power x86 system for = embedded use, it=E2=80=99s going to be x86-64, not x86-32 (though = hopefully you=E2=80=99re using a 32-bit ABI with it). David From owner-svn-src-head@freebsd.org Sat May 26 13:20:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEB04F75BB7 for ; Sat, 26 May 2018 13:20:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59C2D6F643 for ; Sat, 26 May 2018 13:20:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22d.google.com with SMTP id 200-v6so8364750ioz.6 for ; Sat, 26 May 2018 06:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DwNdVj7QrJ7HUNIuYNmKdQV0p9TznOWnbeIy+C9AFP4=; b=hcCjjbhQHnajTd4CKmnx5LQIMkbuhPIQIqTJMnj3zlRKuiQw3u88BYGXEVi1fAw0IJ COLtU6IxUphGVGFonROob5sGHpnjuZ5rEQ/LR8qcUJnDDU5VgEac80/Jv9MwTFFoPYtx wB5zU8LuE0yiL3cB8GKNkeJwJD8NTwCmJ8AXVmzj1Eu4Bs37L9XJ61NtDjtik9If1idk NHX8/u94vG/DtyRtxGXpmo+er9hD6awzgSPbsNGhS1U/2U/kAdICg/ejEYGYi/5Jvd7Y K6gwWHQ0tDsSGBmZTB6YNASl2NMhWAF2KXFBU+d5Y0gNzTBHhNQhoVXLdzbK73plQbYs Mc/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DwNdVj7QrJ7HUNIuYNmKdQV0p9TznOWnbeIy+C9AFP4=; b=GDzQThtfgzbqQeM1+hXE3+IKzxqRF1foHVKM8wUzNKed4t3aMgS5TQrGPYFvgBCtQA cjRivvaU0FzQ9Vf7954+qdaCFwQOrGPGuyIDr5DqV1Ify3vdG09Kcs0AbU85ZM2Xd2vN /0iIG8jV/N0VBEqVHejsuW3jWEzofWOhXFB15f1ROXb6W8/cwVGD7ouDbzAvDmI1h4JA Dod5c0mNCVKwwknONIg09zFNosmh2m2HggKsp6Fy/JSTsVZbn8m8zkBn4ehxjoF0HKhs w689NF5z52u0w8lBPvdcl43+IDNETpvbJ9bU1+OlD5bkr61237IqidtrBo9AFiZJu2e1 bwKQ== X-Gm-Message-State: ALKqPwdqn6Waxy56QzgwuXQu9GXiHsni+Zpk1M6Nbulz/ACVdlkxfKHa 4A/hNTbO7lISwSYiCruaqCbbVf1IU3jB4l+NF7Yxiw== X-Google-Smtp-Source: ADUXVKJazTfthCZV5RPGkNuq8bZy9O7u7sLi+M9fj5BzIikhe6bqp84dm6ogQmL6E44980Mrx2ciggTtL2E/+try5gk= X-Received: by 2002:a6b:1c87:: with SMTP id c129-v6mr403987ioc.39.1527340853303; Sat, 26 May 2018 06:20:53 -0700 (PDT) MIME-Version: 1.0 References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <20180525003949.GA710@lonesome.com> <05C5BD86-70D0-4B02-AC29-36E68B3602AE@FreeBSD.org> <1A6567CD-5BE8-4E80-A262-00ADB75CF35A@FreeBSD.org> In-Reply-To: <1A6567CD-5BE8-4E80-A262-00ADB75CF35A@FreeBSD.org> From: Warner Losh Date: Sat, 26 May 2018 07:20:41 -0600 Message-ID: Subject: Re: Deorbiting i386 To: David Chisnall Cc: Maxim Sobolev , Mark Linimon , Matthew Macy , Andrew Gallatin , Pedro Giffuni , Cy Schubert , Brooks Davis , Eugene Grosbein , Stefan Esser , "rgrimes@freebsd.org" , Gleb Smirnoff , Sean Bruno , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-Mailman-Approved-At: Sat, 26 May 2018 13:58:50 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 13:20:55 -0000 On Sat, May 26, 2018, 1:58 AM David Chisnall wrote: > On 26 May 2018, at 00:41, Maxim Sobolev wrote: > > > > If you've seen any of the atom bay trail systems in action you may > understand what I mean. You get full blown x64 system with four cores and > it takes only 2W of power. > > Which is pretty much my point - if you want a low-power x86 system for > embedded use, it=E2=80=99s going to be x86-64, not x86-32 (though hopeful= ly you=E2=80=99re > using a 32-bit ABI with it). > The only viable 32bit abi on FreeBSD is i386 now. And that works today. Sure, other theoretical ones are out there, but none are close to production ready on FreeBSD. Until they are, talk of removing i386 support is just crazy talk that will go nowhere. Warner > From owner-svn-src-head@freebsd.org Sat May 26 14:01:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2E5DF76E8A; Sat, 26 May 2018 14:01:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62F6E70C71; Sat, 26 May 2018 14:01:45 +0000 (UTC) (envelope-from vangyzen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 441B210D0C; Sat, 26 May 2018 14:01:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QE1jt7098075; Sat, 26 May 2018 14:01:45 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QE1jQF098074; Sat, 26 May 2018 14:01:45 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201805261401.w4QE1jQF098074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 26 May 2018 14:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334238 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334238 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 14:01:45 -0000 Author: vangyzen Date: Sat May 26 14:01:44 2018 New Revision: 334238 URL: https://svnweb.freebsd.org/changeset/base/334238 Log: kdb_trap: Fix use of uninitialized data In some cases, other_cpus was used without being initialized. Thankfully, it was harmless. Reported by: Coverity CID: 1385265 Sponsored by: Dell EMC Modified: head/sys/kern/subr_kdb.c Modified: head/sys/kern/subr_kdb.c ============================================================================== --- head/sys/kern/subr_kdb.c Sat May 26 11:13:17 2018 (r334237) +++ head/sys/kern/subr_kdb.c Sat May 26 14:01:44 2018 (r334238) @@ -708,9 +708,10 @@ kdb_trap(int type, int code, struct trapframe *tf) kdb_active--; #ifdef SMP - CPU_AND(&other_cpus, &stopped_cpus); - if (did_stop_cpus) + if (did_stop_cpus) { + CPU_AND(&other_cpus, &stopped_cpus); restart_cpus(other_cpus); + } #endif intr_restore(intr); From owner-svn-src-head@freebsd.org Sat May 26 14:14:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01D22F773FA; Sat, 26 May 2018 14:14:57 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABBB47131D; Sat, 26 May 2018 14:14:56 +0000 (UTC) (envelope-from vangyzen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D37510EF9; Sat, 26 May 2018 14:14:56 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QEEuXN004213; Sat, 26 May 2018 14:14:56 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QEEuBf004212; Sat, 26 May 2018 14:14:56 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201805261414.w4QEEuBf004212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 26 May 2018 14:14:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334239 - head/sys/dev/hyperv/netvsc X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sys/dev/hyperv/netvsc X-SVN-Commit-Revision: 334239 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 14:14:57 -0000 Author: vangyzen Date: Sat May 26 14:14:56 2018 New Revision: 334239 URL: https://svnweb.freebsd.org/changeset/base/334239 Log: if_hn: fix use of uninitialized variable omcast was used without being initialized in the non-multicast case. The only effect was that the interface's multicast output counter could be incorrect. Reported by: Coverity CID: 1379662 MFC after: 3 days Sponsored by: Dell EMC Modified: head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Sat May 26 14:01:44 2018 (r334238) +++ head/sys/dev/hyperv/netvsc/if_hn.c Sat May 26 14:14:56 2018 (r334239) @@ -5939,8 +5939,7 @@ hn_transmit(struct ifnet *ifp, struct mbuf *m) int obytes, omcast; obytes = m->m_pkthdr.len; - if (m->m_flags & M_MCAST) - omcast = 1; + omcast = (m->m_flags & M_MCAST) != 0; if (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) { if (bpf_peers_present(ifp->if_bpf)) { From owner-svn-src-head@freebsd.org Sat May 26 14:23:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85D05F7780C; Sat, 26 May 2018 14:23:12 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28DD27195C; Sat, 26 May 2018 14:23:12 +0000 (UTC) (envelope-from vangyzen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0517811098; Sat, 26 May 2018 14:23:12 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QENBcU009083; Sat, 26 May 2018 14:23:11 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QENBjm009082; Sat, 26 May 2018 14:23:11 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201805261423.w4QENBjm009082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 26 May 2018 14:23:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334240 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 334240 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 14:23:12 -0000 Author: vangyzen Date: Sat May 26 14:23:11 2018 New Revision: 334240 URL: https://svnweb.freebsd.org/changeset/base/334240 Log: kern_cpuset: fix small leak on error path The "mask" was leaked on some error paths. Reported by: Coverity CID: 1384683 Sponsored by: Dell EMC Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Sat May 26 14:14:56 2018 (r334239) +++ head/sys/kern/kern_cpuset.c Sat May 26 14:23:11 2018 (r334240) @@ -2038,6 +2038,9 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t le if (domainsetsize < sizeof(domainset_t) || domainsetsize > DOMAINSET_MAXSIZE / NBBY) return (ERANGE); + if (policy <= DOMAINSET_POLICY_INVALID || + policy > DOMAINSET_POLICY_MAX) + return (EINVAL); /* In Capability mode, you can only set your own CPU set. */ if (IN_CAPABILITY_MODE(td)) { if (level != CPU_LEVEL_WHICH) @@ -2071,15 +2074,14 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t le } DOMAINSET_COPY(mask, &domain.ds_mask); domain.ds_policy = policy; - if (policy <= DOMAINSET_POLICY_INVALID || - policy > DOMAINSET_POLICY_MAX) - return (EINVAL); /* Translate preferred policy into a mask and fallback. */ if (policy == DOMAINSET_POLICY_PREFER) { /* Only support a single preferred domain. */ - if (DOMAINSET_COUNT(&domain.ds_mask) != 1) - return (EINVAL); + if (DOMAINSET_COUNT(&domain.ds_mask) != 1) { + error = EINVAL; + goto out; + } domain.ds_prefer = DOMAINSET_FFS(&domain.ds_mask) - 1; /* This will be constrained by domainset_shadow(). */ DOMAINSET_FILL(&domain.ds_mask); From owner-svn-src-head@freebsd.org Sat May 26 14:58:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FEC5F7825E; Sat, 26 May 2018 14:58:34 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot0-x22e.google.com (mail-ot0-x22e.google.com [IPv6:2607:f8b0:4003:c0f::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2C5B72B63; Sat, 26 May 2018 14:58:33 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot0-x22e.google.com with SMTP id 15-v6so9182182otn.12; Sat, 26 May 2018 07:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hBTZmGvPXS+xIr6MOW789L3SW0aBcbMurFykUzrDOH8=; b=Y0Wr2/bpC6inLeAxmZUCjP81YhWag+3Wjs8lMtT9d5TAQnC4VcxR6/35W5iQ1eD2gu dBfpQpk4CuOaZzk8cCTPZWpmaJ7I56eGvhIU1nnGln4tj1g/VZVfZosEQ/R0LVaORXqS uMwgS2e+CtXfLJ3wTOcPJpJpvvu6RmcPxbgtvdd6F62OaRy/Quegaw7QOR9TAO9zs9RL 82nicYJYuuqh3QM4B/43+ZUVdLnl6+Xkmg/haKidbQX+kZzQf3qHK+uhyqNpet58hy+c 5HsaOeWZ3ERKwCe3Cm9oQE22tL+qbCY3MT4pTl1nXwx4dEuy5qQUOzTMkDRMiCPAKuKc T9mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hBTZmGvPXS+xIr6MOW789L3SW0aBcbMurFykUzrDOH8=; b=Irk8/pO8JTHAa1si4eg+f5AepXy+gkHTWIilMUjsLBErysYE4alHU9EPM3PdtzNY/a 8T7dWDGOQTc7ODMpnm3HRrKE8/VvK9R6xkCErSJ2gHbaD5+m5rKQ2jNpWQvD4mIZrfFs vntnPpXp/tz0fPCeQrtWdG/KcJXUeGMWa2cepV2W34j2hC6s8xQSYm5MhE7RhaFpjMmD uRwjjXThcuqhnOP3lfuV2BzFd2aQK3DRjXyktFVFNltmXN1ZP5iUBAeS+irMH8UIEYAq Qdie7u9qUbp/vVLBiMmLziw8VJ5ZYpZ8wvdeX0VI2ebnVjPRdCDmoO4EeK64sijBAlaR 4nRQ== X-Gm-Message-State: ALKqPwcDUD47IEB5ypRsd22G/llDZMLB1gtn6ja3sVq7dgTP1crkXep/ HdCfi5cGNqYgvOD+VgKpmfgxaNR1greKgvG/vio= X-Google-Smtp-Source: ADUXVKIBakfuUMQlOkjIfYfAV8HWcctpOx4FUsw7l9QY1W2Jn0J/cbl24ED1o5xBQqS9c2cYr7yW20ZnHQwBxj5At9Y= X-Received: by 2002:a9d:52a4:: with SMTP id f36-v6mr4120139oth.0.1527346713176; Sat, 26 May 2018 07:58:33 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:348e:0:0:0:0:0 with HTTP; Sat, 26 May 2018 07:58:32 -0700 (PDT) In-Reply-To: References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <20180525003949.GA710@lonesome.com> <05C5BD86-70D0-4B02-AC29-36E68B3602AE@FreeBSD.org> <1A6567CD-5BE8-4E80-A262-00ADB75CF35A@FreeBSD.org> From: Benjamin Kaduk Date: Sat, 26 May 2018 09:58:32 -0500 Message-ID: Subject: Re: Deorbiting i386 To: Warner Losh Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 14:58:34 -0000 So, when do we get to reprise this thread on -arch instead of svn-src-head? -Ben From owner-svn-src-head@freebsd.org Sat May 26 16:35:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21210EEDE54 for ; Sat, 26 May 2018 16:35:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E75C76B29 for ; Sat, 26 May 2018 16:35:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22f.google.com with SMTP id e20-v6so10375152itc.1 for ; Sat, 26 May 2018 09:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=uNYVuMwUJF5hrOuXua4lc9T336rCI+ZDe6MmqX/mfWY=; b=RExXqxZ/SjP0YdQlqRwAAU27utclWuFD59SeCVwTymq3pphKfnaGJAHQaUkXE2MNgN m5SvUOqEpACrFinPhOKoB7BQFvZw3Yahm5erM7j3ztdkdapON6Ymk+GljNf+TFVIXl1V H66RqQ2GlhiSYIZBG/SS1Y2tRG5Js8S1jgmC9p50yDOzCkaYCIvk2kSbhUYGiJVn9K1m 2gch4vTtc/qw82D3Jt1xgHUnhkz1v8f2nXuLYrsxoqttiPRtMQtaUyD568R02IYcaTzn FbTr1ftV5gN5ogcSKNUK8dIbZ0hfi97rTvghnPqV/uJ7nmNtx4QxnPJUF+YKqYuIgqav fYnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=uNYVuMwUJF5hrOuXua4lc9T336rCI+ZDe6MmqX/mfWY=; b=Fyriz/jFgdUAMXicG1JBowl+RihF4CcJCUnosUzRojkZa6223hhpRlGZA+S59QTVdd 0hQVUVM/8pG6ECYQNpTqjjKwE0rofbdk3pp5XAIDAHZOAGRuA9jkGhU7PjZLX5YTv9YH 3BDGhi/mZZDglRntz+fsSK1BGb3Y2o4pPLofVd7HzGsL43dmlDJqZ1XwLSBPUtALfo5l lGDSKORawNbIE1qvf+tUd33QRFLUo+AMChGispX0jNcIL7g9tDnaTkeFZ6WbwQ8CBBrx guGb9xQobt794Q6WVqfjzx+IcvQoB7tFScxJ7UQtGXGXuvxbyniBMUHatrjUwNgLasEx vk0Q== X-Gm-Message-State: ALKqPweyb4veTrQXVgIPXxW3kvvxVZsbXU6facK7Bxnrio8cZ3pTIzvn uNZRVfiJkiIHxeTBxg4c0ftjIpQl3zxrdtTnjfjjSQ== X-Google-Smtp-Source: ADUXVKJJvL7S9HYOSEwF+FuDdHbI+/09Tf4dPnI3EaZ97QmpB3o7fE1EoTn13Dhdwaxcy764JRpwF2RU+KGLbXewf2o= X-Received: by 2002:a24:6ec1:: with SMTP id w184-v6mr5719746itc.57.1527352509823; Sat, 26 May 2018 09:35:09 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:d028:0:0:0:0:0 with HTTP; Sat, 26 May 2018 09:35:09 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201805232218.w4NMIxMA067892@slippy.cwsent.com> <18a87d6d-14af-ef9d-80ff-403039e36692@cs.duke.edu> <20180525003949.GA710@lonesome.com> <05C5BD86-70D0-4B02-AC29-36E68B3602AE@FreeBSD.org> <1A6567CD-5BE8-4E80-A262-00ADB75CF35A@FreeBSD.org> From: Warner Losh Date: Sat, 26 May 2018 10:35:09 -0600 X-Google-Sender-Auth: ioRMUGXYfX6YTslxgNK3tnww0Dg Message-ID: Subject: Re: Deorbiting i386 To: Benjamin Kaduk Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 16:35:11 -0000 On Sat, May 26, 2018 at 8:58 AM, Benjamin Kaduk wrote: > So, when do we get to reprise this thread on -arch instead of svn-src-head? > I'm thinking sometime in July or August when I plan on submitting a draft for a FCP for formalized deprecation for drivers (and another for arch) to the community for discussion, revision, etc. It's long overdue and we've let things slide too long. I'm planning two different docs because the evaluation process different enough for the two cases to warrant separate docs, I think. However, one of the primary criteria is missing for i386: it's still widely used and well supported. Any talk about i386 going away anytime soon is simply a non-starter. There's simply no consensus for it being gone in 12, and I doubt such consensus will form for 13 (though it will be easier if we write down the past traditional methods that have worked in part and failed in part). I doubt we'll rehash this thread there before we get closer to the 13 branch point, if we do it then. Honestly, there's a lot of other deadwood that needs to be cleaned up first, and talk of i386 is a distraction to that. And no, that's not an invitation to post examples. Let's get the criteria in place, then use that with examples people come up with then. Otherwise, it will be another 40 messages about how aha has outlived its usefulness that nobody does anything about (yes, I chose aha because I removed it earlier in the year: sometimes people give examples that are not well informed). Warner From owner-svn-src-head@freebsd.org Sat May 26 18:13:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E7FFEF17DF; Sat, 26 May 2018 18:13:41 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA8B47BBAF; Sat, 26 May 2018 18:13:40 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A589213659; Sat, 26 May 2018 18:13:40 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QIDeW6030805; Sat, 26 May 2018 18:13:40 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QICojg030529; Sat, 26 May 2018 18:12:50 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805261812.w4QICojg030529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sat, 26 May 2018 18:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334242 - in head: . lib/libpmc lib/libpmc/pmu-events lib/libpmc/pmu-events/arch lib/libpmc/pmu-events/arch/arm64 lib/libpmc/pmu-events/arch/arm64/arm lib/libpmc/pmu-events/arch/arm64/a... X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: . lib/libpmc lib/libpmc/pmu-events lib/libpmc/pmu-events/arch lib/libpmc/pmu-events/arch/arm64 lib/libpmc/pmu-events/arch/arm64/arm lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53 lib/libpmc/... X-SVN-Commit-Revision: 334242 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 18:13:42 -0000 Author: mmacy Date: Sat May 26 18:12:50 2018 New Revision: 334242 URL: https://svnweb.freebsd.org/changeset/base/334242 Log: pmc(3)/hwpmc(4): update supported Intel processors to rely fully on the vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type. Squashed commit of the following: commit 4459d43eff815bec08ccc5533dbe5de846f03128 Author: Matt Macy Date: Sat May 26 00:06:31 2018 -0700 libpmc: fix pmu function signatures for non amd64 commit a2cb8bbc586c65d41f9b291430a2261ec67b59fe Author: Matt Macy Date: Fri May 25 22:38:11 2018 -0700 pmcstat: fix indentation of usage commit f686954b15ff56a833ac80404898977cb80a265b Author: Matt Macy Date: Fri May 25 22:19:49 2018 -0700 pmclog(3): add callchain and pmcallocatedyn, remove pcsample commit 73e13a0d2e9498c81c150d14d022050cee7511bb Author: Matt Macy Date: Fri May 25 22:19:00 2018 -0700 pmclog.h: GC pcsample field commit 3e93ffd65da641fa657539dad3c48e281f8b5798 Author: Matt Macy Date: Fri May 25 22:05:57 2018 -0700 hwpmc: make Intel core CPUs use external event tables commit 634f5fae1e1644ac324003136c66cd9c619d1c93 Author: Matt Macy Date: Fri May 25 22:00:06 2018 -0700 pmclog: update log record types, bump PMC_MAJOR - explicitly make log record types a multiple of 8 bytes - hook in pmu event types for pmc_allocate records - remove references to no longer PCSAMPLE record commit 83d84fcd2d65bdf6ddcb2e155a22f0cfa2a9c225 Author: Matt Macy Date: Fri May 25 21:52:10 2018 -0700 libpmc: add support for having vendor table driven pmc_allocate commit 9e6ad63c40c2fce8404847ace5078ca6cb33a736 Author: Matt Macy Date: Fri May 25 19:11:33 2018 -0700 hwpmc_core: add accessors for EVSEL & UMASK, make IAP_UMASK useful to user commit 859dceb93daa6419a48c794db99b6758e5b041c9 Author: Matt Macy Date: Fri May 25 19:09:45 2018 -0700 pmcstat: update usage and man page as well as make -L consistent with pmccontrol commit 79c7d8597e28c2eb13f5f9113e65ec2792ca57b1 Author: Matt Macy Date: Fri May 25 18:07:03 2018 -0700 pmu_util: add support for all current intel event keywords commit d8089c7f6a6c8527f38324252b1ffb47004694c6 Author: Matt Macy Date: Fri May 25 17:45:00 2018 -0700 add description for new arguments commit 058336740bab53c62ec88a3a026ea848cf3878c6 Author: Matt Macy Date: Fri May 25 17:38:15 2018 -0700 libpmc: move pmu_events table and pmu_utils out of libpmcstat so that they can be used by pmc_allocate commit 049b66b382e2f833c3f47bc8df9e750cb265709f Author: Matt Macy Date: Fri May 25 16:12:41 2018 -0700 pmcstat: hook pmu_events counter description utility routines in commit f5e01e7b37a691dc045e1aa16b3ebdd162515de8 Author: Matt Macy Date: Fri May 25 16:11:59 2018 -0700 pmu_events: add utility routines for listing counters and their descriptions commit cba4d4f8907f772279f86f18f915e0d74d33ac56 Author: Matt Macy Date: Fri May 25 16:09:50 2018 -0700 pmu-events: expand out skylake regex to simplify string matches Added: head/lib/libpmc/libpmc_pmu_util.c (contents, props changed) head/lib/libpmc/pmu-events/ head/lib/libpmc/pmu-events/Makefile - copied, changed from r334240, head/lib/libpmcstat/pmu-events/Makefile head/lib/libpmc/pmu-events/README - copied, changed from r334240, head/lib/libpmcstat/pmu-events/README head/lib/libpmc/pmu-events/arch/ head/lib/libpmc/pmu-events/arch/arm64/ head/lib/libpmc/pmu-events/arch/arm64/arm/ head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/ head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json head/lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json head/lib/libpmc/pmu-events/arch/arm64/cavium/ head/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/ head/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json head/lib/libpmc/pmu-events/arch/arm64/hisilicon/ head/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/ head/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json head/lib/libpmc/pmu-events/arch/arm64/mapfile.csv - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv head/lib/libpmc/pmu-events/arch/powerpc/ head/lib/libpmc/pmu-events/arch/powerpc/mapfile.csv - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv head/lib/libpmc/pmu-events/arch/powerpc/power8/ head/lib/libpmc/pmu-events/arch/powerpc/power8/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json head/lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json head/lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json head/lib/libpmc/pmu-events/arch/powerpc/power8/marked.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json head/lib/libpmc/pmu-events/arch/powerpc/power8/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json head/lib/libpmc/pmu-events/arch/powerpc/power8/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json head/lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json head/lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json head/lib/libpmc/pmu-events/arch/powerpc/power8/translation.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json head/lib/libpmc/pmu-events/arch/powerpc/power9/ head/lib/libpmc/pmu-events/arch/powerpc/power9/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json head/lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json head/lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json head/lib/libpmc/pmu-events/arch/powerpc/power9/marked.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json head/lib/libpmc/pmu-events/arch/powerpc/power9/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json head/lib/libpmc/pmu-events/arch/powerpc/power9/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json head/lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json head/lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json head/lib/libpmc/pmu-events/arch/powerpc/power9/translation.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json head/lib/libpmc/pmu-events/arch/s390/ head/lib/libpmc/pmu-events/arch/s390/cf_z10/ head/lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_z13/ head/lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_z14/ head/lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_z196/ head/lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_zec12/ head/lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json head/lib/libpmc/pmu-events/arch/s390/mapfile.csv - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv head/lib/libpmc/pmu-events/arch/x86/ head/lib/libpmc/pmu-events/arch/x86/bonnell/ head/lib/libpmc/pmu-events/arch/x86/bonnell/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json head/lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json head/lib/libpmc/pmu-events/arch/x86/bonnell/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json head/lib/libpmc/pmu-events/arch/x86/bonnell/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwell/ head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwell/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json head/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json head/lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/ head/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/ head/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/goldmont/ head/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json head/lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json head/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json head/lib/libpmc/pmu-events/arch/x86/goldmont/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json head/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json head/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/ head/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/haswell/ head/lib/libpmc/pmu-events/arch/x86/haswell/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json head/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/haswell/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json head/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json head/lib/libpmc/pmu-events/arch/x86/haswell/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json head/lib/libpmc/pmu-events/arch/x86/haswell/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json head/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/haswell/uncore.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json head/lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/ head/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json head/lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json head/lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json head/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json head/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json head/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/ head/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/ivytown/ head/lib/libpmc/pmu-events/arch/x86/ivytown/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json head/lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json head/lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json head/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json head/lib/libpmc/pmu-events/arch/x86/ivytown/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json head/lib/libpmc/pmu-events/arch/x86/ivytown/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json head/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/jaketown/ head/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json head/lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json head/lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json head/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json head/lib/libpmc/pmu-events/arch/x86/jaketown/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json head/lib/libpmc/pmu-events/arch/x86/jaketown/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json head/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/ head/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/mapfile.csv - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv head/lib/libpmc/pmu-events/arch/x86/nehalemep/ head/lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/ head/lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/ head/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/silvermont/ head/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json head/lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json head/lib/libpmc/pmu-events/arch/x86/silvermont/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json head/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json head/lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/skylake/ head/lib/libpmc/pmu-events/arch/x86/skylake/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json head/lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json head/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json head/lib/libpmc/pmu-events/arch/x86/skylake/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json head/lib/libpmc/pmu-events/arch/x86/skylake/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json head/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json head/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json head/lib/libpmc/pmu-events/arch/x86/skylake/uncore.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json head/lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/ head/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json head/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json head/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json head/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json head/lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/ head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/ head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/westmereex/ head/lib/libpmc/pmu-events/arch/x86/westmereex/cache.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json head/lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json head/lib/libpmc/pmu-events/arch/x86/westmereex/memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json head/lib/libpmc/pmu-events/arch/x86/westmereex/other.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json head/lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json - copied, changed from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json head/lib/libpmc/pmu-events/jevents.c - copied, changed from r334240, head/lib/libpmcstat/pmu-events/jevents.c head/lib/libpmc/pmu-events/jevents.h - copied, changed from r334240, head/lib/libpmcstat/pmu-events/jevents.h head/lib/libpmc/pmu-events/jsmn.c - copied, changed from r334240, head/lib/libpmcstat/pmu-events/jsmn.c head/lib/libpmc/pmu-events/jsmn.h - copied, changed from r334240, head/lib/libpmcstat/pmu-events/jsmn.h head/lib/libpmc/pmu-events/json.c - copied, changed from r334240, head/lib/libpmcstat/pmu-events/json.c head/lib/libpmc/pmu-events/json.h - copied, changed from r334240, head/lib/libpmcstat/pmu-events/json.h head/lib/libpmc/pmu-events/list.h - copied, changed from r334240, head/lib/libpmcstat/pmu-events/list.h head/lib/libpmc/pmu-events/pmu-events.h - copied, changed from r334240, head/lib/libpmcstat/pmu-events/pmu-events.h Deleted: head/lib/libpmcstat/libpmcstat_pmu_util.c head/lib/libpmcstat/pmu-events/ Modified: head/Makefile.inc1 head/lib/libpmc/Makefile head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.h head/lib/libpmc/pmclog.3 head/lib/libpmc/pmclog.c head/lib/libpmc/pmclog.h head/lib/libpmcstat/Makefile head/lib/libpmcstat/libpmcstat.h head/lib/libpmcstat/libpmcstat_logging.c head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_core.h head/sys/dev/hwpmc/hwpmc_logging.c head/sys/sys/pmc.h head/sys/sys/pmclog.h head/usr.sbin/pmcstat/pmcstat.8 head/usr.sbin/pmcstat/pmcstat.c head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat May 26 14:31:54 2018 (r334241) +++ head/Makefile.inc1 Sat May 26 18:12:50 2018 (r334242) @@ -2031,7 +2031,7 @@ _libmagic=lib/libmagic .endif .if ${MACHINE_CPUARCH} == "amd64" -_jevents=lib/libpmcstat/pmu-events +_jevents=lib/libpmc/pmu-events .endif # kernel-toolchain skips _cleanobj, so handle cleaning up previous Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Sat May 26 14:31:54 2018 (r334241) +++ head/lib/libpmc/Makefile Sat May 26 18:12:50 2018 (r334242) @@ -3,8 +3,30 @@ PACKAGE=lib${LIB} LIB= pmc -SRCS= libpmc.c pmclog.c +SRCS= libpmc.c pmclog.c libpmc_pmu_util.c INCS= pmc.h pmclog.h + +CFLAGS+= -I${.CURDIR} + +.if ${MACHINE_CPUARCH} == "amd64" + +.if ${MACHINE_CPUARCH} == "aarch64" +EVENT_ARCH="arm64" +.elif ${MACHINE_CPUARCH} == "amd64" +EVENT_ARCH="x86" +.elif ${MACHINE_CPUARCH} == "powerpc" +EVENT_ARCH="powerpc" +.endif + +JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents +# This file is built in a subdirectory so never try to rebuild +# it here due to missing meta file. +${JEVENTS}: .NOMETA + +libpmc_events.c: ${JEVENTS} + ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmc_events.c +SRCS+= libpmc_events.c +.endif MAN= pmc.3 MAN+= pmc_allocate.3 Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Sat May 26 14:31:54 2018 (r334241) +++ head/lib/libpmc/libpmc.c Sat May 26 18:12:50 2018 (r334242) @@ -2781,9 +2781,28 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, if (mode != PMC_MODE_SS && mode != PMC_MODE_TS && mode != PMC_MODE_SC && mode != PMC_MODE_TC) { - errno = EINVAL; - goto out; + return (EINVAL); } + bzero(&pmc_config, sizeof(pmc_config)); + pmc_config.pm_cpu = cpu; + pmc_config.pm_mode = mode; + pmc_config.pm_flags = flags; + if (PMC_IS_SAMPLING_MODE(mode)) + pmc_config.pm_caps |= PMC_CAP_INTERRUPT; + /* + * Can we pull this straight from the pmu table? + */ + r = spec_copy = strdup(ctrspec); + ctrname = strsep(&r, ","); + if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) { + if (PMC_CALL(PMCALLOCATE, &pmc_config) < 0) + return (errno); + *pmcid = pmc_config.pm_pmcid; + return (0); + } else { + free(spec_copy); + spec_copy = NULL; + } /* replace an event alias with the canonical event specifier */ if (pmc_mdep_event_aliases) @@ -2833,15 +2852,8 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, goto out; } - bzero(&pmc_config, sizeof(pmc_config)); pmc_config.pm_ev = ev->pm_ev_code; pmc_config.pm_class = pcd->pm_evc_class; - pmc_config.pm_cpu = cpu; - pmc_config.pm_mode = mode; - pmc_config.pm_flags = flags; - - if (PMC_IS_SAMPLING_MODE(mode)) - pmc_config.pm_caps |= PMC_CAP_INTERRUPT; if (pcd->pm_evc_allocate_pmc(ev->pm_ev_code, r, &pmc_config) < 0) { errno = EINVAL; Added: head/lib/libpmc/libpmc_pmu_util.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmc/libpmc_pmu_util.c Sat May 26 18:12:50 2018 (r334242) @@ -0,0 +1,333 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018, Matthew Macy + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "pmu-events/pmu-events.h" + +#if defined(__amd64__) +struct pmu_alias { + const char *pa_alias; + const char *pa_name; +}; +static struct pmu_alias pmu_alias_table[] = { + { "UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, + { "UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, + { "LLC_MISSES", "LONGEST_LAT_CACHE.MISS"}, + { "LLC-MISSES", "LONGEST_LAT_CACHE.MISS"}, + { "LLC_REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, + { "LLC-REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, + { "LLC_MISS_RHITM", "mem_load_l3_miss_retired.remote_hitm"}, + { "LLC-MISS-RHITM", "mem_load_l3_miss_retired.remote_hitm"}, + { "RESOURCE_STALL", "RESOURCE_STALLS.ANY"}, + { "RESOURCE_STALLS_ANY", "RESOURCE_STALLS.ANY"}, + { "BRANCH_INSTRUCTION_RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, + { "BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, + { "BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, + { "BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, + { NULL, NULL }, +}; + +static const char * +pmu_alias_get(const char *name) +{ + struct pmu_alias *pa; + + for (pa = pmu_alias_table; pa->pa_alias != NULL; pa++) + if (strcasecmp(name, pa->pa_alias) == 0) + return (pa->pa_name); + return (name); +} + +struct pmu_event_desc { + uint64_t ped_period; + uint64_t ped_offcore_rsp; + uint32_t ped_event; + uint32_t ped_frontend; + uint32_t ped_ldlat; + uint32_t ped_config1; + uint8_t ped_umask; + uint8_t ped_cmask; + uint8_t ped_any; + uint8_t ped_inv; + uint8_t ped_edge; + uint8_t ped_fc_mask; + uint8_t ped_ch_mask; +}; + +static const struct pmu_events_map * +pmu_events_map_get(void) +{ + size_t s; + char buf[64]; + const struct pmu_events_map *pme; + + if (sysctlbyname("kern.hwpmc.cpuid", (void *)NULL, &s, + (void *)NULL, 0) == -1) + return (NULL); + if (sysctlbyname("kern.hwpmc.cpuid", buf, &s, + (void *)NULL, 0) == -1) + return (NULL); + for (pme = pmu_events_map; pme->cpuid != NULL; pme++) + if (strcmp(buf, pme->cpuid) == 0) + return (pme); + return (NULL); +} + +static const struct pmu_event * +pmu_event_get(const char *event_name, int *idx) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + int i; + + if ((pme = pmu_events_map_get()) == NULL) + return (NULL); + for (i = 0, pe = pme->table; pe->name || pe->desc || pe->event; pe++, i++) { + if (pe->name == NULL) + continue; + if (strcasecmp(pe->name, event_name) == 0) { + if (idx) + *idx = i; + return (pe); + } + } + return (NULL); +} + +const char * +pmu_event_get_by_idx(int idx) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + int i; + + if ((pme = pmu_events_map_get()) == NULL) + return (NULL); + for (i = 0, pe = pme->table; (pe->name || pe->desc || pe->event) && i < idx; pe++, i++) + ; + return (pe->name); +} + +static int +pmu_parse_event(struct pmu_event_desc *ped, const char *eventin) +{ + char *event; + char *kvp, *key, *value; + char *debug; + + if ((event = strdup(eventin)) == NULL) + return (ENOMEM); + bzero(ped, sizeof(*ped)); + while ((kvp = strsep(&event, ",")) != NULL) { + key = strsep(&kvp, "="); + if (key == NULL) + abort(); + value = kvp; + if (strcmp(key, "umask") == 0) + ped->ped_umask = strtol(value, NULL, 16); + else if (strcmp(key, "event") == 0) + ped->ped_event = strtol(value, NULL, 16); + else if (strcmp(key, "period") == 0) + ped->ped_period = strtol(value, NULL, 10); + else if (strcmp(key, "offcore_rsp") == 0) + ped->ped_offcore_rsp = strtol(value, NULL, 16); + else if (strcmp(key, "any") == 0) + ped->ped_any = strtol(value, NULL, 10); + else if (strcmp(key, "cmask") == 0) + ped->ped_cmask = strtol(value, NULL, 10); + else if (strcmp(key, "inv") == 0) + ped->ped_inv = strtol(value, NULL, 10); + else if (strcmp(key, "edge") == 0) + ped->ped_edge = strtol(value, NULL, 10); + else if (strcmp(key, "frontend") == 0) + ped->ped_frontend = strtol(value, NULL, 16); + else if (strcmp(key, "ldlat") == 0) + ped->ped_ldlat = strtol(value, NULL, 16); + else if (strcmp(key, "fc_mask") == 0) + ped->ped_fc_mask = strtol(value, NULL, 16); + else if (strcmp(key, "ch_mask") == 0) + ped->ped_ch_mask = strtol(value, NULL, 16); + else if (strcmp(key, "config1") == 0) + ped->ped_config1 = strtol(value, NULL, 16); + else { + debug = getenv("PMUDEBUG"); + if (debug != NULL && strcmp(debug, "true") == 0 && value != NULL) + printf("unrecognized kvpair: %s:%s\n", key, value); + } + } + free(event); + return (0); +} + +uint64_t +pmc_pmu_sample_rate_get(const char *event_name) +{ + const struct pmu_event *pe; + struct pmu_event_desc ped; + + event_name = pmu_alias_get(event_name); + if ((pe = pmu_event_get(event_name, NULL)) == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pe->alias && (pe = pmu_event_get(pe->alias, NULL)) == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pe->event == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pmu_parse_event(&ped, pe->event)) + return (DEFAULT_SAMPLE_COUNT); + return (ped.ped_period); +} + +int +pmc_pmu_enabled(void) +{ + + return (pmu_events_map_get() != NULL); +} + +void +pmc_pmu_print_counters(void) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + struct pmu_event_desc ped; + char *debug; + int do_debug; + + debug = getenv("PMUDEBUG"); + do_debug = 0; + + if (debug != NULL && strcmp(debug, "true") == 0) + do_debug = 1; + if ((pme = pmu_events_map_get()) == NULL) + return; + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { + if (pe->name == NULL) + continue; + printf("\t%s\n", pe->name); + if (do_debug) + pmu_parse_event(&ped, pe->event); + } +} + +void +pmc_pmu_print_counter_desc(const char *ev) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + + if ((pme = pmu_events_map_get()) == NULL) + return; + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { + if (pe->name == NULL) + continue; + if (strcasestr(pe->name, ev) != NULL && + pe->desc != NULL) + printf("%s:\t%s\n", pe->name, pe->desc); + } +} + +void +pmc_pmu_print_counter_desc_long(const char *ev) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + + if ((pme = pmu_events_map_get()) == NULL) + return; + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { + if (pe->name == NULL) + continue; + if (strcasestr(pe->name, ev) != NULL) { + if (pe->long_desc != NULL) + printf("%s:\n%s\n", pe->name, pe->long_desc); + else if (pe->desc != NULL) + printf("%s:\t%s\n", pe->name, pe->desc); + } + } +} + +int +pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) +{ + const struct pmu_event *pe; + struct pmu_event_desc ped; + struct pmc_md_iap_op_pmcallocate *iap; + int idx; + + iap = &pm->pm_md.pm_iap; + bzero(iap, sizeof(*iap)); + event_name = pmu_alias_get(event_name); + if ((pe = pmu_event_get(event_name, &idx)) == NULL) + return (ENOENT); + if (pe->alias && (pe = pmu_event_get(pe->alias, &idx)) == NULL) + return (ENOENT); + if (pe->event == NULL) + return (ENOENT); + if (pmu_parse_event(&ped, pe->event)) + return (ENOENT); + + pm->pm_class = PMC_CLASS_IAP; + pm->pm_ev = idx; + iap->pm_iap_config |= IAP_EVSEL(ped.ped_event); + iap->pm_iap_config |= IAP_UMASK(ped.ped_umask); + iap->pm_iap_config |= IAP_CMASK(ped.ped_cmask); + iap->pm_iap_rsp = ped.ped_offcore_rsp; + + iap->pm_iap_config |= (IAP_USR | IAP_OS); + if (ped.ped_edge) + iap->pm_iap_config |= IAP_EDGE; + if (ped.ped_any) + iap->pm_iap_config |= IAP_ANY; + if (ped.ped_inv) + iap->pm_iap_config |= IAP_EDGE; + if (pm->pm_caps & PMC_CAP_INTERRUPT) + iap->pm_iap_config |= IAP_INT; + return (0); +} + +#else +uint64_t pmc_pmu_sample_rate_get(const char *event_name __unused) { return (DEFAULT_SAMPLE_COUNT); } +void pmc_pmu_print_counters(void) {} +void pmc_pmu_print_counter_desc(const char *e __unused) {} +void pmc_pmu_print_counter_desc_long(const char *e __unused) {} +int pmc_pmu_enabled(void) { return (0); } +int pmc_pmu_pmcallocate(const char *e __unused, struct pmc_op_pmcallocate *p __unused) { return (EOPNOTSUPP); } +const char *pmu_event_get_by_idx(int idx __unused) { return (NULL); } + +#endif Modified: head/lib/libpmc/pmc.h ============================================================================== --- head/lib/libpmc/pmc.h Sat May 26 14:31:54 2018 (r334241) +++ head/lib/libpmc/pmc.h Sat May 26 18:12:50 2018 (r334242) @@ -112,6 +112,14 @@ const char *pmc_name_of_state(enum pmc_state _ps); int pmc_event_names_of_class(enum pmc_class _cl, const char ***_eventnames, int *_nevents); + +int pmc_pmu_enabled(void); +void pmc_pmu_print_counters(void); +void pmc_pmu_print_counter_desc(const char *); +void pmc_pmu_print_counter_desc_long(const char *); +uint64_t pmc_pmu_sample_rate_get(const char *); +int pmc_pmu_pmcallocate(const char *, struct pmc_op_pmcallocate *); +const char *pmu_event_get_by_idx(int idx); __END_DECLS #endif Modified: head/lib/libpmc/pmclog.3 ============================================================================== --- head/lib/libpmc/pmclog.3 Sat May 26 14:31:54 2018 (r334241) +++ head/lib/libpmc/pmclog.3 Sat May 26 18:12:50 2018 (r334242) @@ -82,13 +82,14 @@ struct pmclog_ev { struct timespec pl_ts; /* log entry timestamp */ enum pmclog_type pl_type; /* log entry kind */ union { /* log entry data */ + struct pmclog_ev_callchain pl_cc; struct pmclog_ev_closelog pl_cl; struct pmclog_ev_dropnotify pl_d; struct pmclog_ev_initialize pl_i; struct pmclog_ev_map_in pl_mi; struct pmclog_ev_map_out pl_mo; - struct pmclog_ev_pcsample pl_s; struct pmclog_ev_pmcallocate pl_a; + struct pmclog_ev_pmcallocatedyn pl_ad; struct pmclog_ev_pmcattach pl_t; struct pmclog_ev_pmcdetach pl_d; struct pmclog_ev_proccsw pl_c; @@ -270,8 +271,8 @@ while (pmclog_read(parser, &ev) == 0) { case PMCLOG_TYPE_PROCCSW: --process a thread context switch record-- break; - case PMCLOG_TYPE_PCSAMPLE: - --process a PC sample-- + case PMCLOG_TYPE_CALLCHAIN: + --process a callchain sample-- break; --and so on-- } Modified: head/lib/libpmc/pmclog.c ============================================================================== --- head/lib/libpmc/pmclog.c Sat May 26 14:31:54 2018 (r334241) +++ head/lib/libpmc/pmclog.c Sat May 26 18:12:50 2018 (r334242) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -278,7 +279,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l struct pmclog_ev *ev) { int evlen, pathlen; - uint32_t h, *le, npc; + uint32_t h, *le, npc, noop; enum pmclog_parser_state e; struct pmclog_parse_state *ps; @@ -288,6 +289,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l if ((e = pmclog_get_record(ps,data,len)) == PL_STATE_ERROR) { ev->pl_state = PMCLOG_ERROR; + printf("state error\n"); return -1; } @@ -301,6 +303,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l PMCLOG_READ32(le,h); if (!PMCLOG_HEADER_CHECK_MAGIC(h)) { + printf("bad magic\n"); ps->ps_state = PL_STATE_ERROR; ev->pl_state = PMCLOG_ERROR; return -1; @@ -360,21 +363,20 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l PMCLOG_READADDR(le,ev->pl_u.pl_mo.pl_start); PMCLOG_READADDR(le,ev->pl_u.pl_mo.pl_end); break; - case PMCLOG_TYPE_PCSAMPLE: - PMCLOG_READ32(le,ev->pl_u.pl_s.pl_pid); - PMCLOG_READADDR(le,ev->pl_u.pl_s.pl_pc); - PMCLOG_READ32(le,ev->pl_u.pl_s.pl_pmcid); - PMCLOG_READ32(le,ev->pl_u.pl_s.pl_usermode); - PMCLOG_READ32(le,ev->pl_u.pl_s.pl_tid); - break; case PMCLOG_TYPE_PMCALLOCATE: PMCLOG_READ32(le,ev->pl_u.pl_a.pl_pmcid); PMCLOG_READ32(le,ev->pl_u.pl_a.pl_event); PMCLOG_READ32(le,ev->pl_u.pl_a.pl_flags); - if ((ev->pl_u.pl_a.pl_evname = + PMCLOG_READ32(le,noop); + ev->pl_u.pl_a.pl_evname = pmu_event_get_by_idx(ev->pl_u.pl_a.pl_event); + if (ev->pl_u.pl_a.pl_evname != NULL) + break; + else if ((ev->pl_u.pl_a.pl_evname = _pmc_name_of_event(ev->pl_u.pl_a.pl_event, ps->ps_arch)) - == NULL) + == NULL) { + printf("unknown event\n"); goto error; + } break; case PMCLOG_TYPE_PMCALLOCATEDYN: PMCLOG_READ32(le,ev->pl_u.pl_ad.pl_pmcid); @@ -401,14 +403,16 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l case PMCLOG_TYPE_PROCEXEC: PMCLOG_GET_PATHLEN(pathlen,evlen,pmclog_procexec); PMCLOG_READ32(le,ev->pl_u.pl_x.pl_pid); - PMCLOG_READADDR(le,ev->pl_u.pl_x.pl_entryaddr); PMCLOG_READ32(le,ev->pl_u.pl_x.pl_pmcid); + PMCLOG_READ32(le,noop); + PMCLOG_READADDR(le,ev->pl_u.pl_x.pl_entryaddr); PMCLOG_READSTRING(le,ev->pl_u.pl_x.pl_pathname,pathlen); break; case PMCLOG_TYPE_PROCEXIT: PMCLOG_READ32(le,ev->pl_u.pl_e.pl_pmcid); - PMCLOG_READ64(le,ev->pl_u.pl_e.pl_value); PMCLOG_READ32(le,ev->pl_u.pl_e.pl_pid); + PMCLOG_READ32(le,noop); + PMCLOG_READ64(le,ev->pl_u.pl_e.pl_value); break; case PMCLOG_TYPE_PROCFORK: PMCLOG_READ32(le,ev->pl_u.pl_f.pl_oldpid); @@ -489,8 +493,9 @@ pmclog_read(void *cookie, struct pmclog_ev *ev) ps->ps_len = nread; ps->ps_data = ps->ps_buffer; - } else + } else { return -1; + } } assert(ps->ps_len > 0); @@ -498,7 +503,6 @@ pmclog_read(void *cookie, struct pmclog_ev *ev) /* Retrieve one event from the byte stream. */ retval = pmclog_get_event(ps, &ps->ps_data, &ps->ps_len, ev); - /* * If we need more data and we have a configured fd, try read * from it. Modified: head/lib/libpmc/pmclog.h ============================================================================== --- head/lib/libpmc/pmclog.h Sat May 26 14:31:54 2018 (r334241) +++ head/lib/libpmc/pmclog.h Sat May 26 18:12:50 2018 (r334242) @@ -158,7 +158,6 @@ struct pmclog_ev { struct pmclog_ev_initialize pl_i; struct pmclog_ev_map_in pl_mi; struct pmclog_ev_map_out pl_mo; - struct pmclog_ev_pcsample pl_s; struct pmclog_ev_pmcallocate pl_a; struct pmclog_ev_pmcallocatedyn pl_ad; struct pmclog_ev_pmcattach pl_t; Copied and modified: head/lib/libpmc/pmu-events/Makefile (from r334240, head/lib/libpmcstat/pmu-events/Makefile) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/README (from r334240, head/lib/libpmcstat/pmu-events/README) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/mapfile.csv (from r334240, head/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/mapfile.csv (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/marked.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/translation.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/marked.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/translation.json (from r334240, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/mapfile.csv (from r334240, head/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/uncore.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/mapfile.csv (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv) ============================================================================== --- head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv Sat May 26 14:23:11 2018 (r334240, copy source) +++ head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Sat May 26 18:12:50 2018 (r334242) @@ -23,7 +23,10 @@ GenuineIntel-6-1E,v2,nehalemep,core GenuineIntel-6-1F,v2,nehalemep,core GenuineIntel-6-1A,v2,nehalemep,core GenuineIntel-6-2E,v2,nehalemex,core -GenuineIntel-6-[4589]E,v24,skylake,core +GenuineIntel-6-4E,v24,skylake,core +GenuineIntel-6-5E,v24,skylake,core +GenuineIntel-6-8E,v24,skylake,core +GenuineIntel-6-9E,v24,skylake,core GenuineIntel-6-37,v13,silvermont,core GenuineIntel-6-4D,v13,silvermont,core GenuineIntel-6-4C,v13,silvermont,core Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/uncore.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/cache.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/other.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json (from r334240, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/jevents.c (from r334240, head/lib/libpmcstat/pmu-events/jevents.c) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/jevents.h (from r334240, head/lib/libpmcstat/pmu-events/jevents.h) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/jsmn.c (from r334240, head/lib/libpmcstat/pmu-events/jsmn.c) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/jsmn.h (from r334240, head/lib/libpmcstat/pmu-events/jsmn.h) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/json.c (from r334240, head/lib/libpmcstat/pmu-events/json.c) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/json.h (from r334240, head/lib/libpmcstat/pmu-events/json.h) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/list.h (from r334240, head/lib/libpmcstat/pmu-events/list.h) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/pmu-events.h (from r334240, head/lib/libpmcstat/pmu-events/pmu-events.h) ============================================================================== Modified: head/lib/libpmcstat/Makefile ============================================================================== --- head/lib/libpmcstat/Makefile Sat May 26 14:31:54 2018 (r334241) +++ head/lib/libpmcstat/Makefile Sat May 26 18:12:50 2018 (r334242) @@ -9,30 +9,7 @@ SRCS= \ libpmcstat_logging.c \ libpmcstat_process.c \ libpmcstat_string.c \ - libpmcstat_symbol.c \ - libpmcstat_pmu_util.c + libpmcstat_symbol.c INCS= libpmcstat.h - -CFLAGS+= -I${.CURDIR} - -.if ${MACHINE_CPUARCH} == "amd64" - -.if ${MACHINE_CPUARCH} == "aarch64" -EVENT_ARCH="arm64" -.elif ${MACHINE_CPUARCH} == "amd64" -EVENT_ARCH="x86" -.elif ${MACHINE_CPUARCH} == "powerpc" -EVENT_ARCH="powerpc" -.endif - -JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents -# This file is built in a subdirectory so never try to rebuild -# it here due to missing meta file. -${JEVENTS}: .NOMETA - -libpmcstat_events.c: ${JEVENTS} - ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c -SRCS+= libpmcstat_events.c -.endif .include Modified: head/lib/libpmcstat/libpmcstat.h ============================================================================== --- head/lib/libpmcstat/libpmcstat.h Sat May 26 14:31:54 2018 (r334241) +++ head/lib/libpmcstat/libpmcstat.h Sat May 26 18:12:50 2018 (r334242) @@ -382,8 +382,6 @@ int pmcstat_analyze_log(struct pmcstat_args *args, int pmcstat_open_log(const char *_p, int _mode); int pmcstat_close_log(struct pmcstat_args *args); -uint64_t pmcstat_pmu_sample_rate_get(const char *); - __END_DECLS #endif /* !_LIBPMCSTAT_H_ */ Modified: head/lib/libpmcstat/libpmcstat_logging.c ============================================================================== --- head/lib/libpmcstat/libpmcstat_logging.c Sat May 26 14:31:54 2018 (r334241) +++ head/lib/libpmcstat/libpmcstat_logging.c Sat May 26 18:12:50 2018 (r334242) @@ -195,7 +195,6 @@ pmcstat_analyze_log(struct pmcstat_args *args, int *ps_samples_period) { uint32_t cpu, cpuflags; - uintfptr_t pc; pid_t pid; struct pmcstat_image *image; struct pmcstat_process *pp, *ppnew; @@ -268,44 +267,6 @@ pmcstat_analyze_log(struct pmcstat_args *args, ev.pl_u.pl_mo.pl_end); break; - case PMCLOG_TYPE_PCSAMPLE: - /* - * Note: the `PCSAMPLE' log entry is not - * generated by hpwmc(4) after version 2. - */ - - /* - * We bring in the gmon file for the image - * currently associated with the PMC & pid - * pair and increment the appropriate entry - * bin inside this. - */ - pmcstat_stats->ps_samples_total++; - *ps_samples_period += 1; - - pc = ev.pl_u.pl_s.pl_pc; - pp = pmcstat_process_lookup(ev.pl_u.pl_s.pl_pid, - PMCSTAT_ALLOCATE); - - /* Get PMC record. */ - pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid, pmcstat_mergepmc); - assert(pmcr != NULL); - pmcr->pr_samples++; - - /* - * Call the plugins processing - * TODO: move pmcstat_process_find_map inside plugins - */ - - if (plugins[args->pa_pplugin].pl_process != NULL) - plugins[args->pa_pplugin].pl_process( - pp, pmcr, 1, &pc, - pmcstat_process_find_map(pp, pc) != NULL, 0); - plugins[args->pa_plugin].pl_process( - pp, pmcr, 1, &pc, - pmcstat_process_find_map(pp, pc) != NULL, 0); - break; - case PMCLOG_TYPE_CALLCHAIN: pmcstat_stats->ps_samples_total++; *ps_samples_period += 1; @@ -453,8 +414,8 @@ pmcstat_analyze_log(struct pmcstat_args *args, return (PMCSTAT_RUNNING); err(EX_DATAERR, - "ERROR: event parsing failed (record %jd, offset 0x%jx)", - (uintmax_t) ev.pl_count + 1, ev.pl_offset); + "ERROR: event parsing failed state: %d type: %d (record %jd, offset 0x%jx)", + ev.pl_state, ev.pl_type, (uintmax_t) ev.pl_count + 1, ev.pl_offset); } /* Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Sat May 26 14:31:54 2018 (r334241) +++ head/sys/dev/hwpmc/hwpmc_core.c Sat May 26 18:12:50 2018 (r334242) @@ -548,48 +548,6 @@ iaf_initialize(struct pmc_mdep *md, int maxcpu, int np * Intel programmable PMCs. */ -/* - * Event descriptor tables. - * - * For each event id, we track: - * - * 1. The CPUs that the event is valid for. - * - * 2. If the event uses a fixed UMASK, the value of the umask field. - * If the event doesn't use a fixed UMASK, a mask of legal bits - * to check against. - */ - -struct iap_event_descr { - enum pmc_event iap_ev; - unsigned char iap_evcode; - unsigned char iap_umask; - unsigned int iap_flags; -}; - -#define IAP_F_CC (1 << 0) /* CPU: Core */ -#define IAP_F_CC2 (1 << 1) /* CPU: Core2 family */ -#define IAP_F_CC2E (1 << 2) /* CPU: Core2 Extreme only */ -#define IAP_F_CA (1 << 3) /* CPU: Atom */ -#define IAP_F_I7 (1 << 4) /* CPU: Core i7 */ -#define IAP_F_I7O (1 << 4) /* CPU: Core i7 (old) */ -#define IAP_F_WM (1 << 5) /* CPU: Westmere */ -#define IAP_F_SB (1 << 6) /* CPU: Sandy Bridge */ -#define IAP_F_IB (1 << 7) /* CPU: Ivy Bridge */ -#define IAP_F_SBX (1 << 8) /* CPU: Sandy Bridge Xeon */ -#define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge Xeon */ -#define IAP_F_HW (1 << 10) /* CPU: Haswell */ -#define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ -#define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ -#define IAP_F_BW (1 << 13) /* CPU: Broadwell */ -#define IAP_F_BWX (1 << 14) /* CPU: Broadwell Xeon */ -#define IAP_F_SL (1 << 15) /* CPU: Skylake */ -#define IAP_F_SLX (1 << 16) /* CPU: Skylake Xeon AKA scalable */ -#define IAP_F_FM (1 << 18) /* Fixed mask */ - -#define IAP_F_ALLCPUSCORE2 \ - (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) - /* Sub fields of UMASK that this event supports. */ #define IAP_M_CORE (1 << 0) /* Core specificity */ #define IAP_M_AGENT (1 << 1) /* Agent specificity */ @@ -612,1403 +570,6 @@ struct iap_event_descr { #define IAP_CORE_ALL (0x3 << 14) #define IAP_F_CMASK 0xFF000000 -static struct iap_event_descr iap_events[] = { -#undef IAPDESCR -#define IAPDESCR(N,EV,UM,FLAGS) { \ - .iap_ev = PMC_EV_IAP_EVENT_##N, \ - .iap_evcode = (EV), \ - .iap_umask = (UM), \ - .iap_flags = (FLAGS) \ - } - - IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(02H_81H, 0x02, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS), - IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | - IAP_F_CAS), - IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS), - IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_FM | IAP_F_CAS), - IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_FM | IAP_F_CAS), - - IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CAS), - IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | - IAP_F_CAS), - IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_FM | IAP_F_CAS), - IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_FM | IAP_F_CAS), - IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_FM | IAP_F_CAS), - IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_FM | IAP_F_CAS), - IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_FM | IAP_F_CAS), - - IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | - IAP_F_BWX), - IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX), - IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O | IAP_F_CAS), - - IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | - IAP_F_CC2E | IAP_F_CA), - IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7O), - IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O), - - IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), - IAPDESCR(07H_08H, 0x07, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_SB | - IAP_F_SBX), - - IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SLX), - IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_SLX), - IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SLX), - IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_81H, 0x08, 0x81, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - IAPDESCR(08H_82H, 0x08, 0x82, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - IAPDESCR(08H_84H, 0x08, 0x84, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - - IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), - IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), - IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7O), - IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7O), - - IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | - IAP_F_WM | IAP_F_SL), - IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), - IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - - IAPDESCR(0DH_01H, 0x0D, 0x01, IAP_F_FM | IAP_F_SL | IAP_F_SLX), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | - IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(0DH_80H, 0x0D, 0x80, IAP_F_FM | IAP_F_SL | IAP_F_SLX), - - IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - - IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0FH_80H, 0x0F, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX ), - IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(11H_02H, 0x11, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_81H, 0x12, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), - IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(13H_81H, 0x13, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), - - IAPDESCR(18H_00H, 0x18, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(19H_00H, 0x19, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM), - IAPDESCR(19H_02H, 0x19, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - - IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7O), - IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7O), - - IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(20H_01H, 0x20, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUSCORE2), - IAPDESCR(22H, 0x22, IAP_M_CORE, IAP_F_CC2), - IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUSCORE2), - - IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), - IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX ), - IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX), - IAPDESCR(24H_38H, 0x24, 0x38, IAP_F_FM | IAP_F_SL | IAP_F_SLX), - IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat May 26 19:27:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4277EF3822; Sat, 26 May 2018 19:27:17 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B6F07DE29; Sat, 26 May 2018 19:27:17 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46534141D1; Sat, 26 May 2018 19:27:17 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QJRHAs066820; Sat, 26 May 2018 19:27:17 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QJQKgZ066542; Sat, 26 May 2018 19:26:20 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805261926.w4QJQKgZ066542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sat, 26 May 2018 19:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334243 - in head: . lib/libpmc lib/libpmc/pmu-events lib/libpmc/pmu-events/arch/arm64 lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53 lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2 ... X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: . lib/libpmc lib/libpmc/pmu-events lib/libpmc/pmu-events/arch/arm64 lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53 lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2 lib/libpmc/pmu-events/arc... X-SVN-Commit-Revision: 334243 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 19:27:18 -0000 Author: mmacy Date: Sat May 26 19:26:19 2018 New Revision: 334243 URL: https://svnweb.freebsd.org/changeset/base/334243 Log: Revert r334242 "pmc(3)/hwpmc(4): update supported Intel processors to rely fully on the" because of squash commit messages Added: head/lib/libpmcstat/libpmcstat_pmu_util.c (contents, props changed) head/lib/libpmcstat/pmu-events/ head/lib/libpmcstat/pmu-events/Makefile - copied, changed from r334242, head/lib/libpmc/pmu-events/Makefile head/lib/libpmcstat/pmu-events/README - copied, changed from r334242, head/lib/libpmc/pmu-events/README head/lib/libpmcstat/pmu-events/arch/ head/lib/libpmcstat/pmu-events/arch/arm64/ head/lib/libpmcstat/pmu-events/arch/arm64/arm/ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/ head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json head/lib/libpmcstat/pmu-events/arch/arm64/cavium/ head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/ head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/ head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/ head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json head/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/arm64/mapfile.csv head/lib/libpmcstat/pmu-events/arch/powerpc/ head/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/mapfile.csv head/lib/libpmcstat/pmu-events/arch/powerpc/power8/ head/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/cache.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/marked.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/memory.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/other.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/translation.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/ head/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/cache.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/marked.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/memory.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/other.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/translation.json head/lib/libpmcstat/pmu-events/arch/s390/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/ head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/ head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json head/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/s390/mapfile.csv head/lib/libpmcstat/pmu-events/arch/x86/ head/lib/libpmcstat/pmu-events/arch/x86/bonnell/ head/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/cache.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/memory.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/other.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/ head/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/other.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/ head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/other.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/ head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/other.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/ head/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/other.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/ head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/ head/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/cache.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/other.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/ head/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/other.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/other.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ head/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/cache.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/other.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/ head/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/memory.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/other.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/ head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/mapfile.csv head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/ head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/other.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/ head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/other.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/ head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/ head/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/memory.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/ head/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/cache.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/other.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/ head/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/other.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/ head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/ head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/ head/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/cache.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/other.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json - copied, changed from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json head/lib/libpmcstat/pmu-events/jevents.c - copied, changed from r334242, head/lib/libpmc/pmu-events/jevents.c head/lib/libpmcstat/pmu-events/jevents.h - copied, changed from r334242, head/lib/libpmc/pmu-events/jevents.h head/lib/libpmcstat/pmu-events/jsmn.c - copied, changed from r334242, head/lib/libpmc/pmu-events/jsmn.c head/lib/libpmcstat/pmu-events/jsmn.h - copied, changed from r334242, head/lib/libpmc/pmu-events/jsmn.h head/lib/libpmcstat/pmu-events/json.c - copied, changed from r334242, head/lib/libpmc/pmu-events/json.c head/lib/libpmcstat/pmu-events/json.h - copied, changed from r334242, head/lib/libpmc/pmu-events/json.h head/lib/libpmcstat/pmu-events/list.h - copied, changed from r334242, head/lib/libpmc/pmu-events/list.h head/lib/libpmcstat/pmu-events/pmu-events.h - copied, changed from r334242, head/lib/libpmc/pmu-events/pmu-events.h Deleted: head/lib/libpmc/libpmc_pmu_util.c head/lib/libpmc/pmu-events/Makefile head/lib/libpmc/pmu-events/README head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json head/lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json head/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json head/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json head/lib/libpmc/pmu-events/arch/arm64/mapfile.csv head/lib/libpmc/pmu-events/arch/powerpc/mapfile.csv head/lib/libpmc/pmu-events/arch/powerpc/power8/cache.json head/lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json head/lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json head/lib/libpmc/pmu-events/arch/powerpc/power8/marked.json head/lib/libpmc/pmu-events/arch/powerpc/power8/memory.json head/lib/libpmc/pmu-events/arch/powerpc/power8/other.json head/lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json head/lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json head/lib/libpmc/pmu-events/arch/powerpc/power8/translation.json head/lib/libpmc/pmu-events/arch/powerpc/power9/cache.json head/lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json head/lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json head/lib/libpmc/pmu-events/arch/powerpc/power9/marked.json head/lib/libpmc/pmu-events/arch/powerpc/power9/memory.json head/lib/libpmc/pmu-events/arch/powerpc/power9/other.json head/lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json head/lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json head/lib/libpmc/pmu-events/arch/powerpc/power9/translation.json head/lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json head/lib/libpmc/pmu-events/arch/s390/mapfile.csv head/lib/libpmc/pmu-events/arch/x86/bonnell/cache.json head/lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json head/lib/libpmc/pmu-events/arch/x86/bonnell/memory.json head/lib/libpmc/pmu-events/arch/x86/bonnell/other.json head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwell/other.json head/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json head/lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/other.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/other.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json head/lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json head/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json head/lib/libpmc/pmu-events/arch/x86/goldmont/other.json head/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json head/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/haswell/cache.json head/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/haswell/frontend.json head/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json head/lib/libpmc/pmu-events/arch/x86/haswell/memory.json head/lib/libpmc/pmu-events/arch/x86/haswell/other.json head/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/haswell/uncore.json head/lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json head/lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json head/lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json head/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json head/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/other.json head/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/other.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/ivytown/cache.json head/lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json head/lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json head/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json head/lib/libpmc/pmu-events/arch/x86/ivytown/memory.json head/lib/libpmc/pmu-events/arch/x86/ivytown/other.json head/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json head/lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json head/lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json head/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json head/lib/libpmc/pmu-events/arch/x86/jaketown/memory.json head/lib/libpmc/pmu-events/arch/x86/jaketown/other.json head/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/mapfile.csv head/lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/other.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/other.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json head/lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json head/lib/libpmc/pmu-events/arch/x86/silvermont/memory.json head/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json head/lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/skylake/cache.json head/lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json head/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json head/lib/libpmc/pmu-events/arch/x86/skylake/memory.json head/lib/libpmc/pmu-events/arch/x86/skylake/other.json head/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json head/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json head/lib/libpmc/pmu-events/arch/x86/skylake/uncore.json head/lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json head/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json head/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/other.json head/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json head/lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/westmereex/cache.json head/lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json head/lib/libpmc/pmu-events/arch/x86/westmereex/memory.json head/lib/libpmc/pmu-events/arch/x86/westmereex/other.json head/lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json head/lib/libpmc/pmu-events/jevents.c head/lib/libpmc/pmu-events/jevents.h head/lib/libpmc/pmu-events/jsmn.c head/lib/libpmc/pmu-events/jsmn.h head/lib/libpmc/pmu-events/json.c head/lib/libpmc/pmu-events/json.h head/lib/libpmc/pmu-events/list.h head/lib/libpmc/pmu-events/pmu-events.h Modified: head/Makefile.inc1 head/lib/libpmc/Makefile head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.h head/lib/libpmc/pmclog.3 head/lib/libpmc/pmclog.c head/lib/libpmc/pmclog.h head/lib/libpmcstat/Makefile head/lib/libpmcstat/libpmcstat.h head/lib/libpmcstat/libpmcstat_logging.c head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_core.h head/sys/dev/hwpmc/hwpmc_logging.c head/sys/sys/pmc.h head/sys/sys/pmclog.h head/usr.sbin/pmcstat/pmcstat.8 head/usr.sbin/pmcstat/pmcstat.c head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat May 26 18:12:50 2018 (r334242) +++ head/Makefile.inc1 Sat May 26 19:26:19 2018 (r334243) @@ -2031,7 +2031,7 @@ _libmagic=lib/libmagic .endif .if ${MACHINE_CPUARCH} == "amd64" -_jevents=lib/libpmc/pmu-events +_jevents=lib/libpmcstat/pmu-events .endif # kernel-toolchain skips _cleanobj, so handle cleaning up previous Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Sat May 26 18:12:50 2018 (r334242) +++ head/lib/libpmc/Makefile Sat May 26 19:26:19 2018 (r334243) @@ -3,30 +3,8 @@ PACKAGE=lib${LIB} LIB= pmc -SRCS= libpmc.c pmclog.c libpmc_pmu_util.c +SRCS= libpmc.c pmclog.c INCS= pmc.h pmclog.h - -CFLAGS+= -I${.CURDIR} - -.if ${MACHINE_CPUARCH} == "amd64" - -.if ${MACHINE_CPUARCH} == "aarch64" -EVENT_ARCH="arm64" -.elif ${MACHINE_CPUARCH} == "amd64" -EVENT_ARCH="x86" -.elif ${MACHINE_CPUARCH} == "powerpc" -EVENT_ARCH="powerpc" -.endif - -JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents -# This file is built in a subdirectory so never try to rebuild -# it here due to missing meta file. -${JEVENTS}: .NOMETA - -libpmc_events.c: ${JEVENTS} - ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmc_events.c -SRCS+= libpmc_events.c -.endif MAN= pmc.3 MAN+= pmc_allocate.3 Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Sat May 26 18:12:50 2018 (r334242) +++ head/lib/libpmc/libpmc.c Sat May 26 19:26:19 2018 (r334243) @@ -2781,28 +2781,9 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, if (mode != PMC_MODE_SS && mode != PMC_MODE_TS && mode != PMC_MODE_SC && mode != PMC_MODE_TC) { - return (EINVAL); + errno = EINVAL; + goto out; } - bzero(&pmc_config, sizeof(pmc_config)); - pmc_config.pm_cpu = cpu; - pmc_config.pm_mode = mode; - pmc_config.pm_flags = flags; - if (PMC_IS_SAMPLING_MODE(mode)) - pmc_config.pm_caps |= PMC_CAP_INTERRUPT; - /* - * Can we pull this straight from the pmu table? - */ - r = spec_copy = strdup(ctrspec); - ctrname = strsep(&r, ","); - if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) { - if (PMC_CALL(PMCALLOCATE, &pmc_config) < 0) - return (errno); - *pmcid = pmc_config.pm_pmcid; - return (0); - } else { - free(spec_copy); - spec_copy = NULL; - } /* replace an event alias with the canonical event specifier */ if (pmc_mdep_event_aliases) @@ -2852,8 +2833,15 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, goto out; } + bzero(&pmc_config, sizeof(pmc_config)); pmc_config.pm_ev = ev->pm_ev_code; pmc_config.pm_class = pcd->pm_evc_class; + pmc_config.pm_cpu = cpu; + pmc_config.pm_mode = mode; + pmc_config.pm_flags = flags; + + if (PMC_IS_SAMPLING_MODE(mode)) + pmc_config.pm_caps |= PMC_CAP_INTERRUPT; if (pcd->pm_evc_allocate_pmc(ev->pm_ev_code, r, &pmc_config) < 0) { errno = EINVAL; Modified: head/lib/libpmc/pmc.h ============================================================================== --- head/lib/libpmc/pmc.h Sat May 26 18:12:50 2018 (r334242) +++ head/lib/libpmc/pmc.h Sat May 26 19:26:19 2018 (r334243) @@ -112,14 +112,6 @@ const char *pmc_name_of_state(enum pmc_state _ps); int pmc_event_names_of_class(enum pmc_class _cl, const char ***_eventnames, int *_nevents); - -int pmc_pmu_enabled(void); -void pmc_pmu_print_counters(void); -void pmc_pmu_print_counter_desc(const char *); -void pmc_pmu_print_counter_desc_long(const char *); -uint64_t pmc_pmu_sample_rate_get(const char *); -int pmc_pmu_pmcallocate(const char *, struct pmc_op_pmcallocate *); -const char *pmu_event_get_by_idx(int idx); __END_DECLS #endif Modified: head/lib/libpmc/pmclog.3 ============================================================================== --- head/lib/libpmc/pmclog.3 Sat May 26 18:12:50 2018 (r334242) +++ head/lib/libpmc/pmclog.3 Sat May 26 19:26:19 2018 (r334243) @@ -82,14 +82,13 @@ struct pmclog_ev { struct timespec pl_ts; /* log entry timestamp */ enum pmclog_type pl_type; /* log entry kind */ union { /* log entry data */ - struct pmclog_ev_callchain pl_cc; struct pmclog_ev_closelog pl_cl; struct pmclog_ev_dropnotify pl_d; struct pmclog_ev_initialize pl_i; struct pmclog_ev_map_in pl_mi; struct pmclog_ev_map_out pl_mo; + struct pmclog_ev_pcsample pl_s; struct pmclog_ev_pmcallocate pl_a; - struct pmclog_ev_pmcallocatedyn pl_ad; struct pmclog_ev_pmcattach pl_t; struct pmclog_ev_pmcdetach pl_d; struct pmclog_ev_proccsw pl_c; @@ -271,8 +270,8 @@ while (pmclog_read(parser, &ev) == 0) { case PMCLOG_TYPE_PROCCSW: --process a thread context switch record-- break; - case PMCLOG_TYPE_CALLCHAIN: - --process a callchain sample-- + case PMCLOG_TYPE_PCSAMPLE: + --process a PC sample-- break; --and so on-- } Modified: head/lib/libpmc/pmclog.c ============================================================================== --- head/lib/libpmc/pmclog.c Sat May 26 18:12:50 2018 (r334242) +++ head/lib/libpmc/pmclog.c Sat May 26 19:26:19 2018 (r334243) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include @@ -279,7 +278,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l struct pmclog_ev *ev) { int evlen, pathlen; - uint32_t h, *le, npc, noop; + uint32_t h, *le, npc; enum pmclog_parser_state e; struct pmclog_parse_state *ps; @@ -289,7 +288,6 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l if ((e = pmclog_get_record(ps,data,len)) == PL_STATE_ERROR) { ev->pl_state = PMCLOG_ERROR; - printf("state error\n"); return -1; } @@ -303,7 +301,6 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l PMCLOG_READ32(le,h); if (!PMCLOG_HEADER_CHECK_MAGIC(h)) { - printf("bad magic\n"); ps->ps_state = PL_STATE_ERROR; ev->pl_state = PMCLOG_ERROR; return -1; @@ -363,20 +360,21 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l PMCLOG_READADDR(le,ev->pl_u.pl_mo.pl_start); PMCLOG_READADDR(le,ev->pl_u.pl_mo.pl_end); break; + case PMCLOG_TYPE_PCSAMPLE: + PMCLOG_READ32(le,ev->pl_u.pl_s.pl_pid); + PMCLOG_READADDR(le,ev->pl_u.pl_s.pl_pc); + PMCLOG_READ32(le,ev->pl_u.pl_s.pl_pmcid); + PMCLOG_READ32(le,ev->pl_u.pl_s.pl_usermode); + PMCLOG_READ32(le,ev->pl_u.pl_s.pl_tid); + break; case PMCLOG_TYPE_PMCALLOCATE: PMCLOG_READ32(le,ev->pl_u.pl_a.pl_pmcid); PMCLOG_READ32(le,ev->pl_u.pl_a.pl_event); PMCLOG_READ32(le,ev->pl_u.pl_a.pl_flags); - PMCLOG_READ32(le,noop); - ev->pl_u.pl_a.pl_evname = pmu_event_get_by_idx(ev->pl_u.pl_a.pl_event); - if (ev->pl_u.pl_a.pl_evname != NULL) - break; - else if ((ev->pl_u.pl_a.pl_evname = + if ((ev->pl_u.pl_a.pl_evname = _pmc_name_of_event(ev->pl_u.pl_a.pl_event, ps->ps_arch)) - == NULL) { - printf("unknown event\n"); + == NULL) goto error; - } break; case PMCLOG_TYPE_PMCALLOCATEDYN: PMCLOG_READ32(le,ev->pl_u.pl_ad.pl_pmcid); @@ -403,16 +401,14 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l case PMCLOG_TYPE_PROCEXEC: PMCLOG_GET_PATHLEN(pathlen,evlen,pmclog_procexec); PMCLOG_READ32(le,ev->pl_u.pl_x.pl_pid); - PMCLOG_READ32(le,ev->pl_u.pl_x.pl_pmcid); - PMCLOG_READ32(le,noop); PMCLOG_READADDR(le,ev->pl_u.pl_x.pl_entryaddr); + PMCLOG_READ32(le,ev->pl_u.pl_x.pl_pmcid); PMCLOG_READSTRING(le,ev->pl_u.pl_x.pl_pathname,pathlen); break; case PMCLOG_TYPE_PROCEXIT: PMCLOG_READ32(le,ev->pl_u.pl_e.pl_pmcid); - PMCLOG_READ32(le,ev->pl_u.pl_e.pl_pid); - PMCLOG_READ32(le,noop); PMCLOG_READ64(le,ev->pl_u.pl_e.pl_value); + PMCLOG_READ32(le,ev->pl_u.pl_e.pl_pid); break; case PMCLOG_TYPE_PROCFORK: PMCLOG_READ32(le,ev->pl_u.pl_f.pl_oldpid); @@ -493,9 +489,8 @@ pmclog_read(void *cookie, struct pmclog_ev *ev) ps->ps_len = nread; ps->ps_data = ps->ps_buffer; - } else { + } else return -1; - } } assert(ps->ps_len > 0); @@ -503,6 +498,7 @@ pmclog_read(void *cookie, struct pmclog_ev *ev) /* Retrieve one event from the byte stream. */ retval = pmclog_get_event(ps, &ps->ps_data, &ps->ps_len, ev); + /* * If we need more data and we have a configured fd, try read * from it. Modified: head/lib/libpmc/pmclog.h ============================================================================== --- head/lib/libpmc/pmclog.h Sat May 26 18:12:50 2018 (r334242) +++ head/lib/libpmc/pmclog.h Sat May 26 19:26:19 2018 (r334243) @@ -158,6 +158,7 @@ struct pmclog_ev { struct pmclog_ev_initialize pl_i; struct pmclog_ev_map_in pl_mi; struct pmclog_ev_map_out pl_mo; + struct pmclog_ev_pcsample pl_s; struct pmclog_ev_pmcallocate pl_a; struct pmclog_ev_pmcallocatedyn pl_ad; struct pmclog_ev_pmcattach pl_t; Modified: head/lib/libpmcstat/Makefile ============================================================================== --- head/lib/libpmcstat/Makefile Sat May 26 18:12:50 2018 (r334242) +++ head/lib/libpmcstat/Makefile Sat May 26 19:26:19 2018 (r334243) @@ -9,7 +9,30 @@ SRCS= \ libpmcstat_logging.c \ libpmcstat_process.c \ libpmcstat_string.c \ - libpmcstat_symbol.c + libpmcstat_symbol.c \ + libpmcstat_pmu_util.c INCS= libpmcstat.h + +CFLAGS+= -I${.CURDIR} + +.if ${MACHINE_CPUARCH} == "amd64" + +.if ${MACHINE_CPUARCH} == "aarch64" +EVENT_ARCH="arm64" +.elif ${MACHINE_CPUARCH} == "amd64" +EVENT_ARCH="x86" +.elif ${MACHINE_CPUARCH} == "powerpc" +EVENT_ARCH="powerpc" +.endif + +JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents +# This file is built in a subdirectory so never try to rebuild +# it here due to missing meta file. +${JEVENTS}: .NOMETA + +libpmcstat_events.c: ${JEVENTS} + ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c +SRCS+= libpmcstat_events.c +.endif .include Modified: head/lib/libpmcstat/libpmcstat.h ============================================================================== --- head/lib/libpmcstat/libpmcstat.h Sat May 26 18:12:50 2018 (r334242) +++ head/lib/libpmcstat/libpmcstat.h Sat May 26 19:26:19 2018 (r334243) @@ -382,6 +382,8 @@ int pmcstat_analyze_log(struct pmcstat_args *args, int pmcstat_open_log(const char *_p, int _mode); int pmcstat_close_log(struct pmcstat_args *args); +uint64_t pmcstat_pmu_sample_rate_get(const char *); + __END_DECLS #endif /* !_LIBPMCSTAT_H_ */ Modified: head/lib/libpmcstat/libpmcstat_logging.c ============================================================================== --- head/lib/libpmcstat/libpmcstat_logging.c Sat May 26 18:12:50 2018 (r334242) +++ head/lib/libpmcstat/libpmcstat_logging.c Sat May 26 19:26:19 2018 (r334243) @@ -195,6 +195,7 @@ pmcstat_analyze_log(struct pmcstat_args *args, int *ps_samples_period) { uint32_t cpu, cpuflags; + uintfptr_t pc; pid_t pid; struct pmcstat_image *image; struct pmcstat_process *pp, *ppnew; @@ -267,6 +268,44 @@ pmcstat_analyze_log(struct pmcstat_args *args, ev.pl_u.pl_mo.pl_end); break; + case PMCLOG_TYPE_PCSAMPLE: + /* + * Note: the `PCSAMPLE' log entry is not + * generated by hpwmc(4) after version 2. + */ + + /* + * We bring in the gmon file for the image + * currently associated with the PMC & pid + * pair and increment the appropriate entry + * bin inside this. + */ + pmcstat_stats->ps_samples_total++; + *ps_samples_period += 1; + + pc = ev.pl_u.pl_s.pl_pc; + pp = pmcstat_process_lookup(ev.pl_u.pl_s.pl_pid, + PMCSTAT_ALLOCATE); + + /* Get PMC record. */ + pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid, pmcstat_mergepmc); + assert(pmcr != NULL); + pmcr->pr_samples++; + + /* + * Call the plugins processing + * TODO: move pmcstat_process_find_map inside plugins + */ + + if (plugins[args->pa_pplugin].pl_process != NULL) + plugins[args->pa_pplugin].pl_process( + pp, pmcr, 1, &pc, + pmcstat_process_find_map(pp, pc) != NULL, 0); + plugins[args->pa_plugin].pl_process( + pp, pmcr, 1, &pc, + pmcstat_process_find_map(pp, pc) != NULL, 0); + break; + case PMCLOG_TYPE_CALLCHAIN: pmcstat_stats->ps_samples_total++; *ps_samples_period += 1; @@ -414,8 +453,8 @@ pmcstat_analyze_log(struct pmcstat_args *args, return (PMCSTAT_RUNNING); err(EX_DATAERR, - "ERROR: event parsing failed state: %d type: %d (record %jd, offset 0x%jx)", - ev.pl_state, ev.pl_type, (uintmax_t) ev.pl_count + 1, ev.pl_offset); + "ERROR: event parsing failed (record %jd, offset 0x%jx)", + (uintmax_t) ev.pl_count + 1, ev.pl_offset); } /* Added: head/lib/libpmcstat/libpmcstat_pmu_util.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmcstat/libpmcstat_pmu_util.c Sat May 26 19:26:19 2018 (r334243) @@ -0,0 +1,164 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018, Matthew Macy + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "pmu-events/pmu-events.h" + +#if defined(__amd64__) +struct pmu_alias { + const char *pa_alias; + const char *pa_name; +}; +static struct pmu_alias pmu_alias_table[] = { + { "UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, + { "UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, + { "LLC_MISSES", "LONGEST_LAT_CACHE.MISS"}, + { "LLC-MISSES", "LONGEST_LAT_CACHE.MISS"}, + { "LLC_REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, + { "LLC-REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, + { "LLC_MISS_RHITM", "mem_load_l3_miss_retired.remote_hitm"}, + { "LLC-MISS-RHITM", "mem_load_l3_miss_retired.remote_hitm"}, + { "RESOURCE_STALL", "RESOURCE_STALLS.ANY"}, + { "RESOURCE_STALLS_ANY", "RESOURCE_STALLS.ANY"}, + { "BRANCH_INSTRUCTION_RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, + { "BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, + { "BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, + { "BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, + { NULL, NULL }, +}; + +static const char * +pmu_alias_get(const char *name) +{ + struct pmu_alias *pa; + + for (pa = pmu_alias_table; pa->pa_alias != NULL; pa++) + if (strcasecmp(name, pa->pa_alias) == 0) + return (pa->pa_name); + return (name); +} + +struct pmu_event_desc { + uint32_t ped_umask; + uint32_t ped_event; + uint64_t ped_period; +}; + +static const struct pmu_events_map * +pmu_events_map_get(void) +{ + size_t s; + char buf[64]; + const struct pmu_events_map *pme; + + if (sysctlbyname("kern.hwpmc.cpuid", (void *)NULL, &s, + (void *)NULL, 0) == -1) + return (NULL); + if (sysctlbyname("kern.hwpmc.cpuid", buf, &s, + (void *)NULL, 0) == -1) + return (NULL); + for (pme = pmu_events_map; pme->cpuid != NULL; pme++) + if (strcmp(buf, pme->cpuid) == 0) + return (pme); + return (NULL); +} + +static const struct pmu_event * +pmu_event_get(const char *event_name) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + + if ((pme = pmu_events_map_get()) == NULL) + return (NULL); + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { + if (pe->name == NULL) + continue; + if (strcasecmp(pe->name, event_name) == 0) + return (pe); + } + return (NULL); +} + +static int +pmu_parse_event(struct pmu_event_desc *ped, const char *eventin) +{ + char *event; + char *kvp, *key, *value; + + if ((event = strdup(eventin)) == NULL) + return (ENOMEM); + bzero(ped, sizeof(*ped)); + while ((kvp = strsep(&event, ",")) != NULL) { + key = strsep(&kvp, "="); + if (key == NULL) + abort(); + value = kvp; + if (strcmp(key, "umask") == 0) + ped->ped_umask = strtol(value, NULL, 16); + if (strcmp(key, "event") == 0) + ped->ped_event = strtol(value, NULL, 16); + if (strcmp(key, "period") == 0) + ped->ped_period = strtol(value, NULL, 10); + } + free(event); + return (0); +} + +uint64_t +pmcstat_pmu_sample_rate_get(const char *event_name) +{ + const struct pmu_event *pe; + struct pmu_event_desc ped; + + event_name = pmu_alias_get(event_name); + if ((pe = pmu_event_get(event_name)) == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pe->alias && (pe = pmu_event_get(pe->alias)) == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pe->event == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pmu_parse_event(&ped, pe->event)) + return (DEFAULT_SAMPLE_COUNT); + return (ped.ped_period); +} + +#else +uint64_t pmcstat_pmu_sample_rate_get(const char *event_name __unused) { return (DEFAULT_SAMPLE_COUNT); } +#endif Copied and modified: head/lib/libpmcstat/pmu-events/Makefile (from r334242, head/lib/libpmc/pmu-events/Makefile) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/README (from r334242, head/lib/libpmc/pmu-events/README) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json (from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json (from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json (from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json (from r334242, head/lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json (from r334242, head/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json (from r334242, head/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv (from r334242, head/lib/libpmc/pmu-events/arch/arm64/mapfile.csv) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/mapfile.csv) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/marked.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power8/translation.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/marked.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json (from r334242, head/lib/libpmc/pmu-events/arch/powerpc/power9/translation.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json (from r334242, head/lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv (from r334242, head/lib/libpmc/pmu-events/arch/s390/mapfile.csv) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/uncore.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv (from r334242, head/lib/libpmc/pmu-events/arch/x86/mapfile.csv) ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Sat May 26 18:12:50 2018 (r334242, copy source) +++ head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv Sat May 26 19:26:19 2018 (r334243) @@ -23,10 +23,7 @@ GenuineIntel-6-1E,v2,nehalemep,core GenuineIntel-6-1F,v2,nehalemep,core GenuineIntel-6-1A,v2,nehalemep,core GenuineIntel-6-2E,v2,nehalemex,core -GenuineIntel-6-4E,v24,skylake,core -GenuineIntel-6-5E,v24,skylake,core -GenuineIntel-6-8E,v24,skylake,core -GenuineIntel-6-9E,v24,skylake,core +GenuineIntel-6-[4589]E,v24,skylake,core GenuineIntel-6-37,v13,silvermont,core GenuineIntel-6-4D,v13,silvermont,core GenuineIntel-6-4C,v13,silvermont,core Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/uncore.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/cache.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/other.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json (from r334242, head/lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/jevents.c (from r334242, head/lib/libpmc/pmu-events/jevents.c) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/jevents.h (from r334242, head/lib/libpmc/pmu-events/jevents.h) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/jsmn.c (from r334242, head/lib/libpmc/pmu-events/jsmn.c) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/jsmn.h (from r334242, head/lib/libpmc/pmu-events/jsmn.h) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/json.c (from r334242, head/lib/libpmc/pmu-events/json.c) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/json.h (from r334242, head/lib/libpmc/pmu-events/json.h) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/list.h (from r334242, head/lib/libpmc/pmu-events/list.h) ============================================================================== Copied and modified: head/lib/libpmcstat/pmu-events/pmu-events.h (from r334242, head/lib/libpmc/pmu-events/pmu-events.h) ============================================================================== Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Sat May 26 18:12:50 2018 (r334242) +++ head/sys/dev/hwpmc/hwpmc_core.c Sat May 26 19:26:19 2018 (r334243) @@ -548,6 +548,48 @@ iaf_initialize(struct pmc_mdep *md, int maxcpu, int np * Intel programmable PMCs. */ +/* + * Event descriptor tables. + * + * For each event id, we track: + * + * 1. The CPUs that the event is valid for. + * + * 2. If the event uses a fixed UMASK, the value of the umask field. + * If the event doesn't use a fixed UMASK, a mask of legal bits + * to check against. + */ + +struct iap_event_descr { + enum pmc_event iap_ev; + unsigned char iap_evcode; + unsigned char iap_umask; + unsigned int iap_flags; +}; + +#define IAP_F_CC (1 << 0) /* CPU: Core */ +#define IAP_F_CC2 (1 << 1) /* CPU: Core2 family */ +#define IAP_F_CC2E (1 << 2) /* CPU: Core2 Extreme only */ +#define IAP_F_CA (1 << 3) /* CPU: Atom */ +#define IAP_F_I7 (1 << 4) /* CPU: Core i7 */ +#define IAP_F_I7O (1 << 4) /* CPU: Core i7 (old) */ +#define IAP_F_WM (1 << 5) /* CPU: Westmere */ +#define IAP_F_SB (1 << 6) /* CPU: Sandy Bridge */ +#define IAP_F_IB (1 << 7) /* CPU: Ivy Bridge */ +#define IAP_F_SBX (1 << 8) /* CPU: Sandy Bridge Xeon */ +#define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge Xeon */ +#define IAP_F_HW (1 << 10) /* CPU: Haswell */ +#define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ +#define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ +#define IAP_F_BW (1 << 13) /* CPU: Broadwell */ +#define IAP_F_BWX (1 << 14) /* CPU: Broadwell Xeon */ +#define IAP_F_SL (1 << 15) /* CPU: Skylake */ +#define IAP_F_SLX (1 << 16) /* CPU: Skylake Xeon AKA scalable */ +#define IAP_F_FM (1 << 18) /* Fixed mask */ + +#define IAP_F_ALLCPUSCORE2 \ + (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) + /* Sub fields of UMASK that this event supports. */ #define IAP_M_CORE (1 << 0) /* Core specificity */ #define IAP_M_AGENT (1 << 1) /* Agent specificity */ @@ -570,6 +612,1403 @@ iaf_initialize(struct pmc_mdep *md, int maxcpu, int np #define IAP_CORE_ALL (0x3 << 14) #define IAP_F_CMASK 0xFF000000 +static struct iap_event_descr iap_events[] = { +#undef IAPDESCR +#define IAPDESCR(N,EV,UM,FLAGS) { \ + .iap_ev = PMC_EV_IAP_EVENT_##N, \ + .iap_evcode = (EV), \ + .iap_umask = (UM), \ + .iap_flags = (FLAGS) \ + } + + IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(02H_81H, 0x02, 0x81, IAP_F_FM | IAP_F_CA), + + IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | + IAP_F_SBX | IAP_F_CAS), + IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | + IAP_F_CAS), + IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | + IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | + IAP_F_SBX | IAP_F_CAS), + IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), + IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_FM | IAP_F_CAS), + IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_FM | IAP_F_CAS), + + IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CAS), + IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | + IAP_F_CAS), + IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), + IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), + IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_FM | IAP_F_CAS), + + IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX), + IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), + IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O | IAP_F_CAS), + + IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | + IAP_F_CC2E | IAP_F_CA), + IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), + IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), + IAPDESCR(07H_08H, 0x07, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_SB | + IAP_F_SBX), + + IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SLX), + IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_SLX), + IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), + IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), + IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), + IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SLX), + IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), + IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_81H, 0x08, 0x81, IAP_F_FM | IAP_F_IB | IAP_F_IBX), + IAPDESCR(08H_82H, 0x08, 0x82, IAP_F_FM | IAP_F_IB | IAP_F_IBX), + IAPDESCR(08H_84H, 0x08, 0x84, IAP_F_FM | IAP_F_IB | IAP_F_IBX), + IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_FM | IAP_F_IB | IAP_F_IBX), + + IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | + IAP_F_WM | IAP_F_SL), + IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), + IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), + + IAPDESCR(0DH_01H, 0x0D, 0x01, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | + IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(0DH_80H, 0x0D, 0x80, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + + IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + + IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_80H, 0x0F, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX ), + IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), + IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), + IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), + IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), + IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), + + IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), + IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_SB | + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), + IAPDESCR(11H_02H, 0x11, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX), + IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), + + IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_81H, 0x12, 0x81, IAP_F_FM | IAP_F_CA), + + IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_81H, 0x13, 0x81, IAP_F_FM | IAP_F_CA), + + IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), + IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX), + + IAPDESCR(18H_00H, 0x18, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(19H_00H, 0x19, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(19H_02H, 0x19, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + + IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(20H_01H, 0x20, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(22H, 0x22, IAP_M_CORE, IAP_F_CC2), + IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX ), + IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), + IAPDESCR(24H_38H, 0x24, 0x38, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), + IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_D8H, 0x24, 0xD8, IAP_F_FM | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(24H_EFH, 0x24, 0xEF, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | + IAP_F_HWX | IAP_F_SLX), + + IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(26H, 0x26, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(26H_01H, 0x26, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_02H, 0x26, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_04H, 0x26, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_08H, 0x26, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_0FH, 0x26, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_10H, 0x26, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_20H, 0x26, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_40H, 0x26, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_80H, 0x26, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_F0H, 0x26, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7O | IAP_F_SB | + IAP_F_SBX), + IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SBX), + IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_07H, 0x28, 0x07, IAP_F_FM | IAP_F_SLX), + IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_18H, 0x28, 0x18, IAP_F_SLX), + IAPDESCR(28H_20H, 0x28, 0x20, IAP_F_SLX), + IAPDESCR(28H_40H, 0x28, 0x40, IAP_F_SLX), + + IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI, IAP_F_CC), + IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, + IAP_F_CA | IAP_F_CC2), + IAPDESCR(2AH, 0x2A, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(2BH, 0x2B, IAP_M_CORE | IAP_M_MESI, IAP_F_CA | IAP_F_CC2), + + IAPDESCR(2EH, 0x2E, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, + IAP_F_ALLCPUSCORE2), + IAPDESCR(2EH_01H, 0x2E, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + + IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, + IAP_F_ALLCPUSCORE2), + IAPDESCR(30H_00H, 0x30, 0x00, IAP_F_FM | IAP_F_CAS), + IAPDESCR(31H_00H, 0x31, 0x00, IAP_F_FM | IAP_F_CAS), + IAPDESCR(32H, 0x32, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CC), + IAPDESCR(32H, 0x32, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), + + IAPDESCR(3AH, 0x3A, IAP_M_TRANSITION, IAP_F_CC), + IAPDESCR(3AH_00H, 0x3A, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + + IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | + IAP_F_SLX), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_SL | + IAP_F_SLX), + + IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(40H_01H, 0x40, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_02H, 0x40, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_04H, 0x40, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_08H, 0x40, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_0FH, 0x40, 0x0F, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_21H, 0x40, 0x21, IAP_F_FM | IAP_F_CA), + + IAPDESCR(41H, 0x41, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(41H_01H, 0x41, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(41H_02H, 0x41, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_04H, 0x41, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_08H, 0x41, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_0FH, 0x41, 0x0F, IAP_F_FM | IAP_F_I7O), + IAPDESCR(41H_22H, 0x41, 0x22, IAP_F_FM | IAP_F_CA), + + IAPDESCR(42H, 0x42, IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(42H_01H, 0x42, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_02H, 0x42, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_04H, 0x42, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_08H, 0x42, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_10H, 0x42, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + + IAPDESCR(43H_01H, 0x43, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7), + IAPDESCR(43H_02H, 0x43, 0x02, IAP_F_FM | IAP_F_CA | + IAP_F_CC2 | IAP_F_I7), + + IAPDESCR(44H_02H, 0x44, 0x02, IAP_F_FM | IAP_F_CC), + + IAPDESCR(45H_0FH, 0x45, 0x0F, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(46H_00H, 0x46, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(48H_01H, 0x48, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL | IAP_F_SLX), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_SL | IAP_F_SLX), + + IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), + IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat May 26 19:30:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BDF1EF39A8; Sat, 26 May 2018 19:30:17 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06D777E0BA; Sat, 26 May 2018 19:30:17 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C17B1141D9; Sat, 26 May 2018 19:30:16 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QJUGBY067338; Sat, 26 May 2018 19:30:16 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QJTKCO066933; Sat, 26 May 2018 19:29:20 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805261929.w4QJTKCO066933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sat, 26 May 2018 19:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334244 - in head: . lib/libpmc lib/libpmc/pmu-events lib/libpmc/pmu-events/arch/arm64 lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53 lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2 ... X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: . lib/libpmc lib/libpmc/pmu-events lib/libpmc/pmu-events/arch/arm64 lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53 lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2 lib/libpmc/pmu-events/arc... X-SVN-Commit-Revision: 334244 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 19:30:18 -0000 Author: mmacy Date: Sat May 26 19:29:19 2018 New Revision: 334244 URL: https://svnweb.freebsd.org/changeset/base/334244 Log: pmc(3)/hwpmc(4): update supported Intel processors to rely fully on the vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type. Added: head/lib/libpmc/libpmc_pmu_util.c (contents, props changed) head/lib/libpmc/pmu-events/Makefile - copied, changed from r334243, head/lib/libpmcstat/pmu-events/Makefile head/lib/libpmc/pmu-events/README - copied, changed from r334243, head/lib/libpmcstat/pmu-events/README head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json head/lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json head/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json head/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json head/lib/libpmc/pmu-events/arch/arm64/mapfile.csv - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv head/lib/libpmc/pmu-events/arch/powerpc/mapfile.csv - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv head/lib/libpmc/pmu-events/arch/powerpc/power8/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json head/lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json head/lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json head/lib/libpmc/pmu-events/arch/powerpc/power8/marked.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json head/lib/libpmc/pmu-events/arch/powerpc/power8/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json head/lib/libpmc/pmu-events/arch/powerpc/power8/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json head/lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json head/lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json head/lib/libpmc/pmu-events/arch/powerpc/power8/translation.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json head/lib/libpmc/pmu-events/arch/powerpc/power9/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json head/lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json head/lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json head/lib/libpmc/pmu-events/arch/powerpc/power9/marked.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json head/lib/libpmc/pmu-events/arch/powerpc/power9/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json head/lib/libpmc/pmu-events/arch/powerpc/power9/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json head/lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json head/lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json head/lib/libpmc/pmu-events/arch/powerpc/power9/translation.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json head/lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json head/lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json head/lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json head/lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json head/lib/libpmc/pmu-events/arch/s390/mapfile.csv - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv head/lib/libpmc/pmu-events/arch/x86/bonnell/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json head/lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json head/lib/libpmc/pmu-events/arch/x86/bonnell/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json head/lib/libpmc/pmu-events/arch/x86/bonnell/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwell/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json head/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json head/lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json head/lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json head/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json head/lib/libpmc/pmu-events/arch/x86/goldmont/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json head/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json head/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/haswell/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json head/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/haswell/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json head/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json head/lib/libpmc/pmu-events/arch/x86/haswell/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json head/lib/libpmc/pmu-events/arch/x86/haswell/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json head/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/haswell/uncore.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json head/lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json head/lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json head/lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json head/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json head/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json head/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/ivytown/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json head/lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json head/lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json head/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json head/lib/libpmc/pmu-events/arch/x86/ivytown/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json head/lib/libpmc/pmu-events/arch/x86/ivytown/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json head/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json head/lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json head/lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json head/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json head/lib/libpmc/pmu-events/arch/x86/jaketown/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json head/lib/libpmc/pmu-events/arch/x86/jaketown/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json head/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/mapfile.csv - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv head/lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json head/lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json head/lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json head/lib/libpmc/pmu-events/arch/x86/silvermont/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json head/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json head/lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/skylake/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json head/lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json head/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json head/lib/libpmc/pmu-events/arch/x86/skylake/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json head/lib/libpmc/pmu-events/arch/x86/skylake/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json head/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json head/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json head/lib/libpmc/pmu-events/arch/x86/skylake/uncore.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json head/lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json head/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json head/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json head/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json head/lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/westmereex/cache.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json head/lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json head/lib/libpmc/pmu-events/arch/x86/westmereex/memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json head/lib/libpmc/pmu-events/arch/x86/westmereex/other.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json head/lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json - copied, changed from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json head/lib/libpmc/pmu-events/jevents.c - copied, changed from r334243, head/lib/libpmcstat/pmu-events/jevents.c head/lib/libpmc/pmu-events/jevents.h - copied, changed from r334243, head/lib/libpmcstat/pmu-events/jevents.h head/lib/libpmc/pmu-events/jsmn.c - copied, changed from r334243, head/lib/libpmcstat/pmu-events/jsmn.c head/lib/libpmc/pmu-events/jsmn.h - copied, changed from r334243, head/lib/libpmcstat/pmu-events/jsmn.h head/lib/libpmc/pmu-events/json.c - copied, changed from r334243, head/lib/libpmcstat/pmu-events/json.c head/lib/libpmc/pmu-events/json.h - copied, changed from r334243, head/lib/libpmcstat/pmu-events/json.h head/lib/libpmc/pmu-events/list.h - copied, changed from r334243, head/lib/libpmcstat/pmu-events/list.h head/lib/libpmc/pmu-events/pmu-events.h - copied, changed from r334243, head/lib/libpmcstat/pmu-events/pmu-events.h Deleted: head/lib/libpmcstat/libpmcstat_pmu_util.c head/lib/libpmcstat/pmu-events/Makefile head/lib/libpmcstat/pmu-events/README head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json head/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv head/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv head/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json head/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json head/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json head/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv head/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json head/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json head/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json head/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json head/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json head/lib/libpmcstat/pmu-events/jevents.c head/lib/libpmcstat/pmu-events/jevents.h head/lib/libpmcstat/pmu-events/jsmn.c head/lib/libpmcstat/pmu-events/jsmn.h head/lib/libpmcstat/pmu-events/json.c head/lib/libpmcstat/pmu-events/json.h head/lib/libpmcstat/pmu-events/list.h head/lib/libpmcstat/pmu-events/pmu-events.h Modified: head/Makefile.inc1 head/lib/libpmc/Makefile head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.h head/lib/libpmc/pmclog.3 head/lib/libpmc/pmclog.c head/lib/libpmc/pmclog.h head/lib/libpmcstat/Makefile head/lib/libpmcstat/libpmcstat.h head/lib/libpmcstat/libpmcstat_logging.c head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_core.h head/sys/dev/hwpmc/hwpmc_logging.c head/sys/sys/pmc.h head/sys/sys/pmclog.h head/usr.sbin/pmcstat/pmcstat.8 head/usr.sbin/pmcstat/pmcstat.c head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat May 26 19:26:19 2018 (r334243) +++ head/Makefile.inc1 Sat May 26 19:29:19 2018 (r334244) @@ -2031,7 +2031,7 @@ _libmagic=lib/libmagic .endif .if ${MACHINE_CPUARCH} == "amd64" -_jevents=lib/libpmcstat/pmu-events +_jevents=lib/libpmc/pmu-events .endif # kernel-toolchain skips _cleanobj, so handle cleaning up previous Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Sat May 26 19:26:19 2018 (r334243) +++ head/lib/libpmc/Makefile Sat May 26 19:29:19 2018 (r334244) @@ -3,8 +3,30 @@ PACKAGE=lib${LIB} LIB= pmc -SRCS= libpmc.c pmclog.c +SRCS= libpmc.c pmclog.c libpmc_pmu_util.c INCS= pmc.h pmclog.h + +CFLAGS+= -I${.CURDIR} + +.if ${MACHINE_CPUARCH} == "amd64" + +.if ${MACHINE_CPUARCH} == "aarch64" +EVENT_ARCH="arm64" +.elif ${MACHINE_CPUARCH} == "amd64" +EVENT_ARCH="x86" +.elif ${MACHINE_CPUARCH} == "powerpc" +EVENT_ARCH="powerpc" +.endif + +JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents +# This file is built in a subdirectory so never try to rebuild +# it here due to missing meta file. +${JEVENTS}: .NOMETA + +libpmc_events.c: ${JEVENTS} + ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmc_events.c +SRCS+= libpmc_events.c +.endif MAN= pmc.3 MAN+= pmc_allocate.3 Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Sat May 26 19:26:19 2018 (r334243) +++ head/lib/libpmc/libpmc.c Sat May 26 19:29:19 2018 (r334244) @@ -2781,9 +2781,28 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, if (mode != PMC_MODE_SS && mode != PMC_MODE_TS && mode != PMC_MODE_SC && mode != PMC_MODE_TC) { - errno = EINVAL; - goto out; + return (EINVAL); } + bzero(&pmc_config, sizeof(pmc_config)); + pmc_config.pm_cpu = cpu; + pmc_config.pm_mode = mode; + pmc_config.pm_flags = flags; + if (PMC_IS_SAMPLING_MODE(mode)) + pmc_config.pm_caps |= PMC_CAP_INTERRUPT; + /* + * Can we pull this straight from the pmu table? + */ + r = spec_copy = strdup(ctrspec); + ctrname = strsep(&r, ","); + if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) { + if (PMC_CALL(PMCALLOCATE, &pmc_config) < 0) + return (errno); + *pmcid = pmc_config.pm_pmcid; + return (0); + } else { + free(spec_copy); + spec_copy = NULL; + } /* replace an event alias with the canonical event specifier */ if (pmc_mdep_event_aliases) @@ -2833,15 +2852,8 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, goto out; } - bzero(&pmc_config, sizeof(pmc_config)); pmc_config.pm_ev = ev->pm_ev_code; pmc_config.pm_class = pcd->pm_evc_class; - pmc_config.pm_cpu = cpu; - pmc_config.pm_mode = mode; - pmc_config.pm_flags = flags; - - if (PMC_IS_SAMPLING_MODE(mode)) - pmc_config.pm_caps |= PMC_CAP_INTERRUPT; if (pcd->pm_evc_allocate_pmc(ev->pm_ev_code, r, &pmc_config) < 0) { errno = EINVAL; Added: head/lib/libpmc/libpmc_pmu_util.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmc/libpmc_pmu_util.c Sat May 26 19:29:19 2018 (r334244) @@ -0,0 +1,333 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018, Matthew Macy + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "pmu-events/pmu-events.h" + +#if defined(__amd64__) +struct pmu_alias { + const char *pa_alias; + const char *pa_name; +}; +static struct pmu_alias pmu_alias_table[] = { + { "UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, + { "UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"}, + { "LLC_MISSES", "LONGEST_LAT_CACHE.MISS"}, + { "LLC-MISSES", "LONGEST_LAT_CACHE.MISS"}, + { "LLC_REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, + { "LLC-REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"}, + { "LLC_MISS_RHITM", "mem_load_l3_miss_retired.remote_hitm"}, + { "LLC-MISS-RHITM", "mem_load_l3_miss_retired.remote_hitm"}, + { "RESOURCE_STALL", "RESOURCE_STALLS.ANY"}, + { "RESOURCE_STALLS_ANY", "RESOURCE_STALLS.ANY"}, + { "BRANCH_INSTRUCTION_RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, + { "BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"}, + { "BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, + { "BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"}, + { NULL, NULL }, +}; + +static const char * +pmu_alias_get(const char *name) +{ + struct pmu_alias *pa; + + for (pa = pmu_alias_table; pa->pa_alias != NULL; pa++) + if (strcasecmp(name, pa->pa_alias) == 0) + return (pa->pa_name); + return (name); +} + +struct pmu_event_desc { + uint64_t ped_period; + uint64_t ped_offcore_rsp; + uint32_t ped_event; + uint32_t ped_frontend; + uint32_t ped_ldlat; + uint32_t ped_config1; + uint8_t ped_umask; + uint8_t ped_cmask; + uint8_t ped_any; + uint8_t ped_inv; + uint8_t ped_edge; + uint8_t ped_fc_mask; + uint8_t ped_ch_mask; +}; + +static const struct pmu_events_map * +pmu_events_map_get(void) +{ + size_t s; + char buf[64]; + const struct pmu_events_map *pme; + + if (sysctlbyname("kern.hwpmc.cpuid", (void *)NULL, &s, + (void *)NULL, 0) == -1) + return (NULL); + if (sysctlbyname("kern.hwpmc.cpuid", buf, &s, + (void *)NULL, 0) == -1) + return (NULL); + for (pme = pmu_events_map; pme->cpuid != NULL; pme++) + if (strcmp(buf, pme->cpuid) == 0) + return (pme); + return (NULL); +} + +static const struct pmu_event * +pmu_event_get(const char *event_name, int *idx) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + int i; + + if ((pme = pmu_events_map_get()) == NULL) + return (NULL); + for (i = 0, pe = pme->table; pe->name || pe->desc || pe->event; pe++, i++) { + if (pe->name == NULL) + continue; + if (strcasecmp(pe->name, event_name) == 0) { + if (idx) + *idx = i; + return (pe); + } + } + return (NULL); +} + +const char * +pmu_event_get_by_idx(int idx) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + int i; + + if ((pme = pmu_events_map_get()) == NULL) + return (NULL); + for (i = 0, pe = pme->table; (pe->name || pe->desc || pe->event) && i < idx; pe++, i++) + ; + return (pe->name); +} + +static int +pmu_parse_event(struct pmu_event_desc *ped, const char *eventin) +{ + char *event; + char *kvp, *key, *value; + char *debug; + + if ((event = strdup(eventin)) == NULL) + return (ENOMEM); + bzero(ped, sizeof(*ped)); + while ((kvp = strsep(&event, ",")) != NULL) { + key = strsep(&kvp, "="); + if (key == NULL) + abort(); + value = kvp; + if (strcmp(key, "umask") == 0) + ped->ped_umask = strtol(value, NULL, 16); + else if (strcmp(key, "event") == 0) + ped->ped_event = strtol(value, NULL, 16); + else if (strcmp(key, "period") == 0) + ped->ped_period = strtol(value, NULL, 10); + else if (strcmp(key, "offcore_rsp") == 0) + ped->ped_offcore_rsp = strtol(value, NULL, 16); + else if (strcmp(key, "any") == 0) + ped->ped_any = strtol(value, NULL, 10); + else if (strcmp(key, "cmask") == 0) + ped->ped_cmask = strtol(value, NULL, 10); + else if (strcmp(key, "inv") == 0) + ped->ped_inv = strtol(value, NULL, 10); + else if (strcmp(key, "edge") == 0) + ped->ped_edge = strtol(value, NULL, 10); + else if (strcmp(key, "frontend") == 0) + ped->ped_frontend = strtol(value, NULL, 16); + else if (strcmp(key, "ldlat") == 0) + ped->ped_ldlat = strtol(value, NULL, 16); + else if (strcmp(key, "fc_mask") == 0) + ped->ped_fc_mask = strtol(value, NULL, 16); + else if (strcmp(key, "ch_mask") == 0) + ped->ped_ch_mask = strtol(value, NULL, 16); + else if (strcmp(key, "config1") == 0) + ped->ped_config1 = strtol(value, NULL, 16); + else { + debug = getenv("PMUDEBUG"); + if (debug != NULL && strcmp(debug, "true") == 0 && value != NULL) + printf("unrecognized kvpair: %s:%s\n", key, value); + } + } + free(event); + return (0); +} + +uint64_t +pmc_pmu_sample_rate_get(const char *event_name) +{ + const struct pmu_event *pe; + struct pmu_event_desc ped; + + event_name = pmu_alias_get(event_name); + if ((pe = pmu_event_get(event_name, NULL)) == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pe->alias && (pe = pmu_event_get(pe->alias, NULL)) == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pe->event == NULL) + return (DEFAULT_SAMPLE_COUNT); + if (pmu_parse_event(&ped, pe->event)) + return (DEFAULT_SAMPLE_COUNT); + return (ped.ped_period); +} + +int +pmc_pmu_enabled(void) +{ + + return (pmu_events_map_get() != NULL); +} + +void +pmc_pmu_print_counters(void) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + struct pmu_event_desc ped; + char *debug; + int do_debug; + + debug = getenv("PMUDEBUG"); + do_debug = 0; + + if (debug != NULL && strcmp(debug, "true") == 0) + do_debug = 1; + if ((pme = pmu_events_map_get()) == NULL) + return; + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { + if (pe->name == NULL) + continue; + printf("\t%s\n", pe->name); + if (do_debug) + pmu_parse_event(&ped, pe->event); + } +} + +void +pmc_pmu_print_counter_desc(const char *ev) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + + if ((pme = pmu_events_map_get()) == NULL) + return; + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { + if (pe->name == NULL) + continue; + if (strcasestr(pe->name, ev) != NULL && + pe->desc != NULL) + printf("%s:\t%s\n", pe->name, pe->desc); + } +} + +void +pmc_pmu_print_counter_desc_long(const char *ev) +{ + const struct pmu_events_map *pme; + const struct pmu_event *pe; + + if ((pme = pmu_events_map_get()) == NULL) + return; + for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) { + if (pe->name == NULL) + continue; + if (strcasestr(pe->name, ev) != NULL) { + if (pe->long_desc != NULL) + printf("%s:\n%s\n", pe->name, pe->long_desc); + else if (pe->desc != NULL) + printf("%s:\t%s\n", pe->name, pe->desc); + } + } +} + +int +pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) +{ + const struct pmu_event *pe; + struct pmu_event_desc ped; + struct pmc_md_iap_op_pmcallocate *iap; + int idx; + + iap = &pm->pm_md.pm_iap; + bzero(iap, sizeof(*iap)); + event_name = pmu_alias_get(event_name); + if ((pe = pmu_event_get(event_name, &idx)) == NULL) + return (ENOENT); + if (pe->alias && (pe = pmu_event_get(pe->alias, &idx)) == NULL) + return (ENOENT); + if (pe->event == NULL) + return (ENOENT); + if (pmu_parse_event(&ped, pe->event)) + return (ENOENT); + + pm->pm_class = PMC_CLASS_IAP; + pm->pm_ev = idx; + iap->pm_iap_config |= IAP_EVSEL(ped.ped_event); + iap->pm_iap_config |= IAP_UMASK(ped.ped_umask); + iap->pm_iap_config |= IAP_CMASK(ped.ped_cmask); + iap->pm_iap_rsp = ped.ped_offcore_rsp; + + iap->pm_iap_config |= (IAP_USR | IAP_OS); + if (ped.ped_edge) + iap->pm_iap_config |= IAP_EDGE; + if (ped.ped_any) + iap->pm_iap_config |= IAP_ANY; + if (ped.ped_inv) + iap->pm_iap_config |= IAP_EDGE; + if (pm->pm_caps & PMC_CAP_INTERRUPT) + iap->pm_iap_config |= IAP_INT; + return (0); +} + +#else +uint64_t pmc_pmu_sample_rate_get(const char *event_name __unused) { return (DEFAULT_SAMPLE_COUNT); } +void pmc_pmu_print_counters(void) {} +void pmc_pmu_print_counter_desc(const char *e __unused) {} +void pmc_pmu_print_counter_desc_long(const char *e __unused) {} +int pmc_pmu_enabled(void) { return (0); } +int pmc_pmu_pmcallocate(const char *e __unused, struct pmc_op_pmcallocate *p __unused) { return (EOPNOTSUPP); } +const char *pmu_event_get_by_idx(int idx __unused) { return (NULL); } + +#endif Modified: head/lib/libpmc/pmc.h ============================================================================== --- head/lib/libpmc/pmc.h Sat May 26 19:26:19 2018 (r334243) +++ head/lib/libpmc/pmc.h Sat May 26 19:29:19 2018 (r334244) @@ -112,6 +112,14 @@ const char *pmc_name_of_state(enum pmc_state _ps); int pmc_event_names_of_class(enum pmc_class _cl, const char ***_eventnames, int *_nevents); + +int pmc_pmu_enabled(void); +void pmc_pmu_print_counters(void); +void pmc_pmu_print_counter_desc(const char *); +void pmc_pmu_print_counter_desc_long(const char *); +uint64_t pmc_pmu_sample_rate_get(const char *); +int pmc_pmu_pmcallocate(const char *, struct pmc_op_pmcallocate *); +const char *pmu_event_get_by_idx(int idx); __END_DECLS #endif Modified: head/lib/libpmc/pmclog.3 ============================================================================== --- head/lib/libpmc/pmclog.3 Sat May 26 19:26:19 2018 (r334243) +++ head/lib/libpmc/pmclog.3 Sat May 26 19:29:19 2018 (r334244) @@ -82,13 +82,14 @@ struct pmclog_ev { struct timespec pl_ts; /* log entry timestamp */ enum pmclog_type pl_type; /* log entry kind */ union { /* log entry data */ + struct pmclog_ev_callchain pl_cc; struct pmclog_ev_closelog pl_cl; struct pmclog_ev_dropnotify pl_d; struct pmclog_ev_initialize pl_i; struct pmclog_ev_map_in pl_mi; struct pmclog_ev_map_out pl_mo; - struct pmclog_ev_pcsample pl_s; struct pmclog_ev_pmcallocate pl_a; + struct pmclog_ev_pmcallocatedyn pl_ad; struct pmclog_ev_pmcattach pl_t; struct pmclog_ev_pmcdetach pl_d; struct pmclog_ev_proccsw pl_c; @@ -270,8 +271,8 @@ while (pmclog_read(parser, &ev) == 0) { case PMCLOG_TYPE_PROCCSW: --process a thread context switch record-- break; - case PMCLOG_TYPE_PCSAMPLE: - --process a PC sample-- + case PMCLOG_TYPE_CALLCHAIN: + --process a callchain sample-- break; --and so on-- } Modified: head/lib/libpmc/pmclog.c ============================================================================== --- head/lib/libpmc/pmclog.c Sat May 26 19:26:19 2018 (r334243) +++ head/lib/libpmc/pmclog.c Sat May 26 19:29:19 2018 (r334244) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -278,7 +279,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l struct pmclog_ev *ev) { int evlen, pathlen; - uint32_t h, *le, npc; + uint32_t h, *le, npc, noop; enum pmclog_parser_state e; struct pmclog_parse_state *ps; @@ -288,6 +289,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l if ((e = pmclog_get_record(ps,data,len)) == PL_STATE_ERROR) { ev->pl_state = PMCLOG_ERROR; + printf("state error\n"); return -1; } @@ -301,6 +303,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l PMCLOG_READ32(le,h); if (!PMCLOG_HEADER_CHECK_MAGIC(h)) { + printf("bad magic\n"); ps->ps_state = PL_STATE_ERROR; ev->pl_state = PMCLOG_ERROR; return -1; @@ -360,21 +363,20 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l PMCLOG_READADDR(le,ev->pl_u.pl_mo.pl_start); PMCLOG_READADDR(le,ev->pl_u.pl_mo.pl_end); break; - case PMCLOG_TYPE_PCSAMPLE: - PMCLOG_READ32(le,ev->pl_u.pl_s.pl_pid); - PMCLOG_READADDR(le,ev->pl_u.pl_s.pl_pc); - PMCLOG_READ32(le,ev->pl_u.pl_s.pl_pmcid); - PMCLOG_READ32(le,ev->pl_u.pl_s.pl_usermode); - PMCLOG_READ32(le,ev->pl_u.pl_s.pl_tid); - break; case PMCLOG_TYPE_PMCALLOCATE: PMCLOG_READ32(le,ev->pl_u.pl_a.pl_pmcid); PMCLOG_READ32(le,ev->pl_u.pl_a.pl_event); PMCLOG_READ32(le,ev->pl_u.pl_a.pl_flags); - if ((ev->pl_u.pl_a.pl_evname = + PMCLOG_READ32(le,noop); + ev->pl_u.pl_a.pl_evname = pmu_event_get_by_idx(ev->pl_u.pl_a.pl_event); + if (ev->pl_u.pl_a.pl_evname != NULL) + break; + else if ((ev->pl_u.pl_a.pl_evname = _pmc_name_of_event(ev->pl_u.pl_a.pl_event, ps->ps_arch)) - == NULL) + == NULL) { + printf("unknown event\n"); goto error; + } break; case PMCLOG_TYPE_PMCALLOCATEDYN: PMCLOG_READ32(le,ev->pl_u.pl_ad.pl_pmcid); @@ -401,14 +403,16 @@ pmclog_get_event(void *cookie, char **data, ssize_t *l case PMCLOG_TYPE_PROCEXEC: PMCLOG_GET_PATHLEN(pathlen,evlen,pmclog_procexec); PMCLOG_READ32(le,ev->pl_u.pl_x.pl_pid); - PMCLOG_READADDR(le,ev->pl_u.pl_x.pl_entryaddr); PMCLOG_READ32(le,ev->pl_u.pl_x.pl_pmcid); + PMCLOG_READ32(le,noop); + PMCLOG_READADDR(le,ev->pl_u.pl_x.pl_entryaddr); PMCLOG_READSTRING(le,ev->pl_u.pl_x.pl_pathname,pathlen); break; case PMCLOG_TYPE_PROCEXIT: PMCLOG_READ32(le,ev->pl_u.pl_e.pl_pmcid); - PMCLOG_READ64(le,ev->pl_u.pl_e.pl_value); PMCLOG_READ32(le,ev->pl_u.pl_e.pl_pid); + PMCLOG_READ32(le,noop); + PMCLOG_READ64(le,ev->pl_u.pl_e.pl_value); break; case PMCLOG_TYPE_PROCFORK: PMCLOG_READ32(le,ev->pl_u.pl_f.pl_oldpid); @@ -489,8 +493,9 @@ pmclog_read(void *cookie, struct pmclog_ev *ev) ps->ps_len = nread; ps->ps_data = ps->ps_buffer; - } else + } else { return -1; + } } assert(ps->ps_len > 0); @@ -498,7 +503,6 @@ pmclog_read(void *cookie, struct pmclog_ev *ev) /* Retrieve one event from the byte stream. */ retval = pmclog_get_event(ps, &ps->ps_data, &ps->ps_len, ev); - /* * If we need more data and we have a configured fd, try read * from it. Modified: head/lib/libpmc/pmclog.h ============================================================================== --- head/lib/libpmc/pmclog.h Sat May 26 19:26:19 2018 (r334243) +++ head/lib/libpmc/pmclog.h Sat May 26 19:29:19 2018 (r334244) @@ -158,7 +158,6 @@ struct pmclog_ev { struct pmclog_ev_initialize pl_i; struct pmclog_ev_map_in pl_mi; struct pmclog_ev_map_out pl_mo; - struct pmclog_ev_pcsample pl_s; struct pmclog_ev_pmcallocate pl_a; struct pmclog_ev_pmcallocatedyn pl_ad; struct pmclog_ev_pmcattach pl_t; Copied and modified: head/lib/libpmc/pmu-events/Makefile (from r334243, head/lib/libpmcstat/pmu-events/Makefile) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/README (from r334243, head/lib/libpmcstat/pmu-events/README) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/arm64/mapfile.csv (from r334243, head/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/mapfile.csv (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/marked.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power8/translation.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/marked.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/powerpc/power9/translation.json (from r334243, head/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/s390/mapfile.csv (from r334243, head/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/uncore.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/mapfile.csv (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv) ============================================================================== --- head/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv Sat May 26 19:26:19 2018 (r334243, copy source) +++ head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Sat May 26 19:29:19 2018 (r334244) @@ -23,7 +23,10 @@ GenuineIntel-6-1E,v2,nehalemep,core GenuineIntel-6-1F,v2,nehalemep,core GenuineIntel-6-1A,v2,nehalemep,core GenuineIntel-6-2E,v2,nehalemex,core -GenuineIntel-6-[4589]E,v24,skylake,core +GenuineIntel-6-4E,v24,skylake,core +GenuineIntel-6-5E,v24,skylake,core +GenuineIntel-6-8E,v24,skylake,core +GenuineIntel-6-9E,v24,skylake,core GenuineIntel-6-37,v13,silvermont,core GenuineIntel-6-4D,v13,silvermont,core GenuineIntel-6-4C,v13,silvermont,core Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/uncore.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/cache.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/other.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json (from r334243, head/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/jevents.c (from r334243, head/lib/libpmcstat/pmu-events/jevents.c) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/jevents.h (from r334243, head/lib/libpmcstat/pmu-events/jevents.h) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/jsmn.c (from r334243, head/lib/libpmcstat/pmu-events/jsmn.c) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/jsmn.h (from r334243, head/lib/libpmcstat/pmu-events/jsmn.h) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/json.c (from r334243, head/lib/libpmcstat/pmu-events/json.c) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/json.h (from r334243, head/lib/libpmcstat/pmu-events/json.h) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/list.h (from r334243, head/lib/libpmcstat/pmu-events/list.h) ============================================================================== Copied and modified: head/lib/libpmc/pmu-events/pmu-events.h (from r334243, head/lib/libpmcstat/pmu-events/pmu-events.h) ============================================================================== Modified: head/lib/libpmcstat/Makefile ============================================================================== --- head/lib/libpmcstat/Makefile Sat May 26 19:26:19 2018 (r334243) +++ head/lib/libpmcstat/Makefile Sat May 26 19:29:19 2018 (r334244) @@ -9,30 +9,7 @@ SRCS= \ libpmcstat_logging.c \ libpmcstat_process.c \ libpmcstat_string.c \ - libpmcstat_symbol.c \ - libpmcstat_pmu_util.c + libpmcstat_symbol.c INCS= libpmcstat.h - -CFLAGS+= -I${.CURDIR} - -.if ${MACHINE_CPUARCH} == "amd64" - -.if ${MACHINE_CPUARCH} == "aarch64" -EVENT_ARCH="arm64" -.elif ${MACHINE_CPUARCH} == "amd64" -EVENT_ARCH="x86" -.elif ${MACHINE_CPUARCH} == "powerpc" -EVENT_ARCH="powerpc" -.endif - -JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents -# This file is built in a subdirectory so never try to rebuild -# it here due to missing meta file. -${JEVENTS}: .NOMETA - -libpmcstat_events.c: ${JEVENTS} - ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c -SRCS+= libpmcstat_events.c -.endif .include Modified: head/lib/libpmcstat/libpmcstat.h ============================================================================== --- head/lib/libpmcstat/libpmcstat.h Sat May 26 19:26:19 2018 (r334243) +++ head/lib/libpmcstat/libpmcstat.h Sat May 26 19:29:19 2018 (r334244) @@ -382,8 +382,6 @@ int pmcstat_analyze_log(struct pmcstat_args *args, int pmcstat_open_log(const char *_p, int _mode); int pmcstat_close_log(struct pmcstat_args *args); -uint64_t pmcstat_pmu_sample_rate_get(const char *); - __END_DECLS #endif /* !_LIBPMCSTAT_H_ */ Modified: head/lib/libpmcstat/libpmcstat_logging.c ============================================================================== --- head/lib/libpmcstat/libpmcstat_logging.c Sat May 26 19:26:19 2018 (r334243) +++ head/lib/libpmcstat/libpmcstat_logging.c Sat May 26 19:29:19 2018 (r334244) @@ -195,7 +195,6 @@ pmcstat_analyze_log(struct pmcstat_args *args, int *ps_samples_period) { uint32_t cpu, cpuflags; - uintfptr_t pc; pid_t pid; struct pmcstat_image *image; struct pmcstat_process *pp, *ppnew; @@ -268,44 +267,6 @@ pmcstat_analyze_log(struct pmcstat_args *args, ev.pl_u.pl_mo.pl_end); break; - case PMCLOG_TYPE_PCSAMPLE: - /* - * Note: the `PCSAMPLE' log entry is not - * generated by hpwmc(4) after version 2. - */ - - /* - * We bring in the gmon file for the image - * currently associated with the PMC & pid - * pair and increment the appropriate entry - * bin inside this. - */ - pmcstat_stats->ps_samples_total++; - *ps_samples_period += 1; - - pc = ev.pl_u.pl_s.pl_pc; - pp = pmcstat_process_lookup(ev.pl_u.pl_s.pl_pid, - PMCSTAT_ALLOCATE); - - /* Get PMC record. */ - pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid, pmcstat_mergepmc); - assert(pmcr != NULL); - pmcr->pr_samples++; - - /* - * Call the plugins processing - * TODO: move pmcstat_process_find_map inside plugins - */ - - if (plugins[args->pa_pplugin].pl_process != NULL) - plugins[args->pa_pplugin].pl_process( - pp, pmcr, 1, &pc, - pmcstat_process_find_map(pp, pc) != NULL, 0); - plugins[args->pa_plugin].pl_process( - pp, pmcr, 1, &pc, - pmcstat_process_find_map(pp, pc) != NULL, 0); - break; - case PMCLOG_TYPE_CALLCHAIN: pmcstat_stats->ps_samples_total++; *ps_samples_period += 1; @@ -453,8 +414,8 @@ pmcstat_analyze_log(struct pmcstat_args *args, return (PMCSTAT_RUNNING); err(EX_DATAERR, - "ERROR: event parsing failed (record %jd, offset 0x%jx)", - (uintmax_t) ev.pl_count + 1, ev.pl_offset); + "ERROR: event parsing failed state: %d type: %d (record %jd, offset 0x%jx)", + ev.pl_state, ev.pl_type, (uintmax_t) ev.pl_count + 1, ev.pl_offset); } /* Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Sat May 26 19:26:19 2018 (r334243) +++ head/sys/dev/hwpmc/hwpmc_core.c Sat May 26 19:29:19 2018 (r334244) @@ -548,48 +548,6 @@ iaf_initialize(struct pmc_mdep *md, int maxcpu, int np * Intel programmable PMCs. */ -/* - * Event descriptor tables. - * - * For each event id, we track: - * - * 1. The CPUs that the event is valid for. - * - * 2. If the event uses a fixed UMASK, the value of the umask field. - * If the event doesn't use a fixed UMASK, a mask of legal bits - * to check against. - */ - -struct iap_event_descr { - enum pmc_event iap_ev; - unsigned char iap_evcode; - unsigned char iap_umask; - unsigned int iap_flags; -}; - -#define IAP_F_CC (1 << 0) /* CPU: Core */ -#define IAP_F_CC2 (1 << 1) /* CPU: Core2 family */ -#define IAP_F_CC2E (1 << 2) /* CPU: Core2 Extreme only */ -#define IAP_F_CA (1 << 3) /* CPU: Atom */ -#define IAP_F_I7 (1 << 4) /* CPU: Core i7 */ -#define IAP_F_I7O (1 << 4) /* CPU: Core i7 (old) */ -#define IAP_F_WM (1 << 5) /* CPU: Westmere */ -#define IAP_F_SB (1 << 6) /* CPU: Sandy Bridge */ -#define IAP_F_IB (1 << 7) /* CPU: Ivy Bridge */ -#define IAP_F_SBX (1 << 8) /* CPU: Sandy Bridge Xeon */ -#define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge Xeon */ -#define IAP_F_HW (1 << 10) /* CPU: Haswell */ -#define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ -#define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ -#define IAP_F_BW (1 << 13) /* CPU: Broadwell */ -#define IAP_F_BWX (1 << 14) /* CPU: Broadwell Xeon */ -#define IAP_F_SL (1 << 15) /* CPU: Skylake */ -#define IAP_F_SLX (1 << 16) /* CPU: Skylake Xeon AKA scalable */ -#define IAP_F_FM (1 << 18) /* Fixed mask */ - -#define IAP_F_ALLCPUSCORE2 \ - (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) - /* Sub fields of UMASK that this event supports. */ #define IAP_M_CORE (1 << 0) /* Core specificity */ #define IAP_M_AGENT (1 << 1) /* Agent specificity */ @@ -612,1403 +570,6 @@ struct iap_event_descr { #define IAP_CORE_ALL (0x3 << 14) #define IAP_F_CMASK 0xFF000000 -static struct iap_event_descr iap_events[] = { -#undef IAPDESCR -#define IAPDESCR(N,EV,UM,FLAGS) { \ - .iap_ev = PMC_EV_IAP_EVENT_##N, \ - .iap_evcode = (EV), \ - .iap_umask = (UM), \ - .iap_flags = (FLAGS) \ - } - - IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(02H_81H, 0x02, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS), - IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | - IAP_F_CAS), - IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS), - IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_FM | IAP_F_CAS), - IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_FM | IAP_F_CAS), - - IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CAS), - IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | - IAP_F_CAS), - IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_FM | IAP_F_CAS), - IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_FM | IAP_F_CAS), - IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_FM | IAP_F_CAS), - IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_FM | IAP_F_CAS), - IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_FM | IAP_F_CAS), - - IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | - IAP_F_BWX), - IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX), - IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O | IAP_F_CAS), - - IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | - IAP_F_CC2E | IAP_F_CA), - IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7O), - IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O), - - IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), - IAPDESCR(07H_08H, 0x07, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_SB | - IAP_F_SBX), - - IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SLX), - IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_SLX), - IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SLX), - IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_81H, 0x08, 0x81, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - IAPDESCR(08H_82H, 0x08, 0x82, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - IAPDESCR(08H_84H, 0x08, 0x84, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - - IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), - IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), - IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7O), - IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7O), - - IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | - IAP_F_WM | IAP_F_SL), - IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), - IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - - IAPDESCR(0DH_01H, 0x0D, 0x01, IAP_F_FM | IAP_F_SL | IAP_F_SLX), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | - IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(0DH_80H, 0x0D, 0x80, IAP_F_FM | IAP_F_SL | IAP_F_SLX), - - IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - - IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0FH_80H, 0x0F, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX ), - IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_SB | - IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(11H_02H, 0x11, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX), - IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(12H_81H, 0x12, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), - IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(13H_81H, 0x13, 0x81, IAP_F_FM | IAP_F_CA), - - IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), - - IAPDESCR(18H_00H, 0x18, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(19H_00H, 0x19, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM), - IAPDESCR(19H_02H, 0x19, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - - IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7O), - IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7O), - - IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - - IAPDESCR(20H_01H, 0x20, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUSCORE2), - IAPDESCR(22H, 0x22, IAP_M_CORE, IAP_F_CC2), - IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUSCORE2), - - IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), - IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX ), - IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX | IAP_F_SL | IAP_F_SLX), - IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | - IAP_F_SLX), - IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | - IAP_F_BW | IAP_F_BWX), - IAPDESCR(24H_38H, 0x24, 0x38, IAP_F_FM | IAP_F_SL | IAP_F_SLX), - IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat May 26 19:38:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6C1AEF3DB2; Sat, 26 May 2018 19:38:32 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51CFF7E59A; Sat, 26 May 2018 19:38:32 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1279114386; Sat, 26 May 2018 19:38:32 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QJcVqo072041; Sat, 26 May 2018 19:38:31 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QJcVxi072040; Sat, 26 May 2018 19:38:31 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201805261938.w4QJcVxi072040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sat, 26 May 2018 19:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334245 - head/lib/libpmcstat/pmu-events X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/lib/libpmcstat/pmu-events X-SVN-Commit-Revision: 334245 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 19:38:32 -0000 Author: mmacy Date: Sat May 26 19:38:31 2018 New Revision: 334245 URL: https://svnweb.freebsd.org/changeset/base/334245 Log: pmu-events: re-delete after re-addition by revert Deleted: head/lib/libpmcstat/pmu-events/ From owner-svn-src-head@freebsd.org Sat May 26 19:44:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37934EF40F9; Sat, 26 May 2018 19:44:46 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id C235E7E9C9; Sat, 26 May 2018 19:44:45 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from hammy.vangyzen.net (173-28-118-115.client.mchsi.com [173.28.118.115]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 46A455646B; Sat, 26 May 2018 14:44:38 -0500 (CDT) Subject: Re: svn commit: r334104 - in head/sys: netinet sys To: Gleb Smirnoff , Mateusz Guzik Cc: "Jonathan T. Looney" , Matthew Macy , John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805231700.w4NH05hs047395@repo.freebsd.org> <2281830.zrSQodBeDb@ralph.baldwin.cx> <20180524044746.GX71675@FreeBSD.org> From: Eric van Gyzen Message-ID: <954ca6de-43dd-af9a-2ab1-2786473de611@vangyzen.net> Date: Sat, 26 May 2018 14:44:31 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180524044746.GX71675@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 19:44:46 -0000 On 05/23/2018 23:47, Gleb Smirnoff wrote: > On Thu, May 24, 2018 at 06:44:20AM +0200, Mateusz Guzik wrote: > M> I fundamentally disagree with this part. > M> > M> If a known value of a given field is needed for assertion purposes, you > M> can add (possibly conditional) code setting this specific value. It > M> probably should not be zero if it can be helped. > M> > M> Conditional zeroing of the *whole* struct depending on invariants will > M> *hide* uninitialized memory read bugs - production kernel will have > M> whatever it happens to find, while *debug* kernel will guarantee to > M> have all the values zeroed. In fact the flag actively combats redzoning. > M> if the resulting allocation is zeroed, poisoning is actively neutered. > M> But only if debug is enabled. > M> > M> That said, I find the change harmful. > > +1 on fundamentally disagree with M_ZERO_INVARIANTS. It makes the > INVARIANTS-enabled kernels to crash _later_ than production kernels, > since instead of uma_junk it places clean zeroes. Matt, Mateusz and Gleb raise very good points. This operates contrary to the whole idea of INVARIANTS. Please revisit this. Eric From owner-svn-src-head@freebsd.org Sat May 26 19:47:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FCBAEF41FB; Sat, 26 May 2018 19:47:09 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8AA47EC0D; Sat, 26 May 2018 19:47:08 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 7AE10256D6; Sat, 26 May 2018 19:47:08 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f44.google.com with SMTP id y189-v6so10650451itb.2; Sat, 26 May 2018 12:47:08 -0700 (PDT) X-Gm-Message-State: ALKqPwfg7niAVPd+jnLTcaL75kkHtjq+JlfgDTYiCu8XBxjku7MVA/cj Wrcekrstrpt2p0F4AJU2UpNNvQLNWt+U8K7QWpI= X-Google-Smtp-Source: ADUXVKJ4rOpXW3tY4cCCPd08lAkQ9qpjH1gUICHv1j9PRfbvF/N72kZe01NN1jdxxziiydvBWLIxWGJcCLqNDZFUgyM= X-Received: by 2002:a24:4455:: with SMTP id o82-v6mr6248942ita.4.1527364027787; Sat, 26 May 2018 12:47:07 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:85ca:0:0:0:0:0 with HTTP; Sat, 26 May 2018 12:47:07 -0700 (PDT) In-Reply-To: <954ca6de-43dd-af9a-2ab1-2786473de611@vangyzen.net> References: <201805231700.w4NH05hs047395@repo.freebsd.org> <2281830.zrSQodBeDb@ralph.baldwin.cx> <20180524044746.GX71675@FreeBSD.org> <954ca6de-43dd-af9a-2ab1-2786473de611@vangyzen.net> From: Matthew Macy Date: Sat, 26 May 2018 12:47:07 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334104 - in head/sys: netinet sys To: Eric van Gyzen Cc: Gleb Smirnoff , Mateusz Guzik , "Jonathan T. Looney" , John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 19:47:09 -0000 I've re-edited that code twice by request by others. I will amend it again at some point to reflect this viewpoint. On Sat, May 26, 2018 at 12:44 PM, Eric van Gyzen wrote: > On 05/23/2018 23:47, Gleb Smirnoff wrote: >> >> On Thu, May 24, 2018 at 06:44:20AM +0200, Mateusz Guzik wrote: >> M> I fundamentally disagree with this part. >> M> >> M> If a known value of a given field is needed for assertion purposes, you >> M> can add (possibly conditional) code setting this specific value. It >> M> probably should not be zero if it can be helped. >> M> >> M> Conditional zeroing of the *whole* struct depending on invariants will >> M> *hide* uninitialized memory read bugs - production kernel will have >> M> whatever it happens to find, while *debug* kernel will guarantee to >> M> have all the values zeroed. In fact the flag actively combats >> redzoning. >> M> if the resulting allocation is zeroed, poisoning is actively neutered. >> M> But only if debug is enabled. >> M> >> M> That said, I find the change harmful. >> >> +1 on fundamentally disagree with M_ZERO_INVARIANTS. It makes the >> INVARIANTS-enabled kernels to crash _later_ than production kernels, >> since instead of uma_junk it places clean zeroes. > > > Matt, > > Mateusz and Gleb raise very good points. This operates contrary to the > whole idea of INVARIANTS. Please revisit this. > > Eric From owner-svn-src-head@freebsd.org Sat May 26 21:07:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10566EF64DE; Sat, 26 May 2018 21:07:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BC908119C; Sat, 26 May 2018 21:07:50 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id MgPdfcC8DSzNNMgPef70CY; Sat, 26 May 2018 15:07:44 -0600 X-Authority-Analysis: v=2.3 cv=KuxjJ1eN c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=VUJBJC2UJ8kA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=hA4b-PTsxkxz0TBfH-0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 0F6CB1C2C; Sat, 26 May 2018 14:07:41 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w4QL7dkk041582; Sat, 26 May 2018 14:07:39 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w4QL7d4F041579; Sat, 26 May 2018 14:07:39 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201805262107.w4QL7d4F041579@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Gleb Smirnoff cc: Mateusz Guzik , "Jonathan T. Looney" , Matthew Macy , John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334104 - in head/sys: netinet sys In-Reply-To: Message from Gleb Smirnoff of "Wed, 23 May 2018 21:47:46 -0700." <20180524044746.GX71675@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 26 May 2018 14:07:38 -0700 X-CMAE-Envelope: MS4wfN1Up08bPyp4FPcfwNW1vDO8qEo1eKtO4uZsaHV1gaHcVDhxDoivCDFYL3pq8GXNgD6SMVeyR0xtabciRphAUThVtYH3l6E98kyM6hUzHlphD/hNeAe/ XEq9YgnOgFOkLVQgo/kemNIzquATTkvXlBEpgEFwPRFlavv5pHiitq81kFV47amqhWwszDt7EdTJL4ceGxwiNUixy5qxaupL8bPCv6fU7riz1QQUOIT8Y2N9 O6V8NxKyQfFrfeB7a18M+u3L14YNSLDDEOACQSBb0PSlkIRGfwP/U+MAwMUL0DUQCjFRh/N5M8P8rSVDPfaZRplVwxGsjsVPGw10Hfe0pKIBs5QjcPBX+pki rS60c7sI2Phk6Fl68aTUGBo4M3iqbw== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 21:07:52 -0000 In message <20180524044746.GX71675@FreeBSD.org>, Gleb Smirnoff writes: > On Thu, May 24, 2018 at 06:44:20AM +0200, Mateusz Guzik wrote: > M> I fundamentally disagree with this part. > M> > M> If a known value of a given field is needed for assertion purposes, you > M> can add (possibly conditional) code setting this specific value. It > M> probably should not be zero if it can be helped. > M> > M> Conditional zeroing of the *whole* struct depending on invariants will > M> *hide* uninitialized memory read bugs - production kernel will have > M> whatever it happens to find, while *debug* kernel will guarantee to > M> have all the values zeroed. In fact the flag actively combats redzoning. > M> if the resulting allocation is zeroed, poisoning is actively neutered. > M> But only if debug is enabled. > M> > M> That said, I find the change harmful. > > +1 on fundamentally disagree with M_ZERO_INVARIANTS. It makes the > INVARIANTS-enabled kernels to crash _later_ than production kernels, > since instead of uma_junk it places clean zeroes. > > May be changes like that deserve more than a 30 minute time frame for review? +1. I think phab might help. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sat May 26 21:14:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CC50EF68F1; Sat, 26 May 2018 21:14:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B04A1817AD; Sat, 26 May 2018 21:14:50 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C0D4153B5; Sat, 26 May 2018 21:14:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QLEoJ1022209; Sat, 26 May 2018 21:14:50 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QLEoBb022207; Sat, 26 May 2018 21:14:50 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805262114.w4QLEoBb022207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 26 May 2018 21:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334247 - in head: share/man/man5 tools/build/options X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: share/man/man5 tools/build/options X-SVN-Commit-Revision: 334247 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 21:14:51 -0000 Author: eadler Date: Sat May 26 21:14:49 2018 New Revision: 334247 URL: https://svnweb.freebsd.org/changeset/base/334247 Log: src.conf: use more natural language for @generated Requested by: emaste Modified: head/share/man/man5/src.conf.5 head/tools/build/options/makeman Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat May 26 20:02:39 2018 (r334246) +++ head/share/man/man5/src.conf.5 Sat May 26 21:14:49 2018 (r334247) @@ -1,7 +1,6 @@ -.\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. +.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.\" @generated -.Dd May 24, 2018 +.Dd May 26, 2018 .Dt SRC.CONF 5 .Os .Sh NAME Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Sat May 26 20:02:39 2018 (r334246) +++ head/tools/build/options/makeman Sat May 26 21:14:49 2018 (r334247) @@ -143,9 +143,8 @@ main() fbsdid='$'FreeBSD'$' generated='@'generated cat < Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2489EFB544; Sat, 26 May 2018 23:02:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 85D2A84D90; Sat, 26 May 2018 23:02:16 +0000 (UTC) (envelope-from rmacklem@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 670CE1655C; Sat, 26 May 2018 23:02:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QN2GOF074604; Sat, 26 May 2018 23:02:16 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QN2G72074603; Sat, 26 May 2018 23:02:16 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201805262302.w4QN2G72074603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 26 May 2018 23:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334252 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 334252 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 23:02:17 -0000 Author: rmacklem Date: Sat May 26 23:02:15 2018 New Revision: 334252 URL: https://svnweb.freebsd.org/changeset/base/334252 Log: Fix the sleep event for layout recall. The sleep for I/O completion during an NFSv4.1 pNFS layout recall used the wrong event value and could result in the "[nfscl]" thread hung for the mount. This patch fixes the event to be the correct. This bug will only affect NFSv4.1 pnfs mounts and only when the server does a layout recall callback, so it won't affect many. Without the patch, a mount without the "pnfs" option will avoid the problem. Found during testing of the pNFS server. MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Sat May 26 21:58:43 2018 (r334251) +++ head/sys/fs/nfsclient/nfs_clstate.c Sat May 26 23:02:15 2018 (r334252) @@ -2721,7 +2721,7 @@ tryagain2: NFSV4LOCK_LOCK) != 0) { lyp->nfsly_lock.nfslock_lock |= NFSV4LOCK_WANTED; - (void)nfsmsleep(&lyp->nfsly_lock, + nfsmsleep(&lyp->nfsly_lock.nfslock_lock, NFSCLSTATEMUTEXPTR, PZERO, "nfslyp", NULL); goto tryagain2;