From owner-svn-src-stable@freebsd.org Sun Nov 12 01:26:45 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B75CE52ED7; Sun, 12 Nov 2017 01:26:45 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53EB2768C6; Sun, 12 Nov 2017 01:26:45 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAC1Qi90028024; Sun, 12 Nov 2017 01:26:44 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC1Qhcw028014; Sun, 12 Nov 2017 01:26:43 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201711120126.vAC1Qhcw028014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Sun, 12 Nov 2017 01:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325730 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: truckman X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 325730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 01:26:45 -0000 Author: truckman Date: Sun Nov 12 01:26:43 2017 New Revision: 325730 URL: https://svnweb.freebsd.org/changeset/base/325730 Log: MFC r325008 Fix Dummynet AQM packet marking function ecn_mark() and fq_codel / fq_pie schedulers packet classification functions in layer2 (bridge mode). Dummynet AQM packet marking function ecn_mark() and fq_codel/fq_pie schedulers packet classification functions (fq_codel_classify_flow() and fq_pie_classify_flow()) assume mbuf is pointing at L3 (IP) packet. However, this assumption is incorrect if ipfw/dummynet is used to manage layer2 traffic (bridge mode) since mbuf will point at L2 frame. This patch solves this problem by identifying the source of the frame/packet (L2 or L3) and adding ETHER_HDR_LEN offset when converting an mbuf pointer to ip pointer if the traffic is from layer2. More specifically, in dummynet packet tagging function, tag_mbuf(), iphdr_off is set to ETHER_HDR_LEN if the traffic is from layer2 and set to zero otherwise. Whenever an access to IP header is required, mtodo(m, dn_tag_get(m)->iphdr_off) is used instead of mtod(m, struct ip *) to correctly convert mbuf pointer to ip pointer in both L2 and L3 traffic. Submitted by: lstewart Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12506 Modified: stable/11/sys/netpfil/ipfw/dn_sched_fifo.c stable/11/sys/netpfil/ipfw/dn_sched_fq_codel.c stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c stable/11/sys/netpfil/ipfw/dn_sched_prio.c stable/11/sys/netpfil/ipfw/dn_sched_qfq.c stable/11/sys/netpfil/ipfw/dn_sched_rr.c stable/11/sys/netpfil/ipfw/dn_sched_wf2q.c stable/11/sys/netpfil/ipfw/ip_dn_io.c stable/11/sys/netpfil/ipfw/ip_dn_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/dn_sched_fifo.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_fifo.c Sun Nov 12 00:00:38 2017 (r325729) +++ stable/11/sys/netpfil/ipfw/dn_sched_fifo.c Sun Nov 12 01:26:43 2017 (r325730) @@ -33,13 +33,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/11/sys/netpfil/ipfw/dn_sched_fq_codel.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_fq_codel.c Sun Nov 12 00:00:38 2017 (r325729) +++ stable/11/sys/netpfil/ipfw/dn_sched_fq_codel.c Sun Nov 12 01:26:43 2017 (r325730) @@ -218,13 +218,14 @@ fq_codel_classify_flow(struct mbuf *m, uint16_t fcount uint8_t tuple[41]; uint16_t hash=0; + ip = (struct ip *)mtodo(m, dn_tag_get(m)->iphdr_off); //#ifdef INET6 struct ip6_hdr *ip6; int isip6; - isip6 = (mtod(m, struct ip *)->ip_v == 6) ? 1 : 0; + isip6 = (ip->ip_v == 6); if(isip6) { - ip6 = mtod(m, struct ip6_hdr *); + ip6 = (struct ip6_hdr *)ip; *((uint8_t *) &tuple[0]) = ip6->ip6_nxt; *((uint32_t *) &tuple[1]) = si->perturbation; memcpy(&tuple[5], ip6->ip6_src.s6_addr, 16); @@ -253,7 +254,6 @@ fq_codel_classify_flow(struct mbuf *m, uint16_t fcount //#endif /* IPv4 */ - ip = mtod(m, struct ip *); *((uint8_t *) &tuple[0]) = ip->ip_p; *((uint32_t *) &tuple[1]) = si->perturbation; *((uint32_t *) &tuple[5]) = ip->ip_src.s_addr; Modified: stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Sun Nov 12 00:00:38 2017 (r325729) +++ stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c Sun Nov 12 01:26:43 2017 (r325730) @@ -792,13 +792,14 @@ fq_pie_classify_flow(struct mbuf *m, uint16_t fcount, uint8_t tuple[41]; uint16_t hash=0; + ip = (struct ip *)mtodo(m, dn_tag_get(m)->iphdr_off); //#ifdef INET6 struct ip6_hdr *ip6; int isip6; - isip6 = (mtod(m, struct ip *)->ip_v == 6) ? 1 : 0; + isip6 = (ip->ip_v == 6); if(isip6) { - ip6 = mtod(m, struct ip6_hdr *); + ip6 = (struct ip6_hdr *)ip; *((uint8_t *) &tuple[0]) = ip6->ip6_nxt; *((uint32_t *) &tuple[1]) = si->perturbation; memcpy(&tuple[5], ip6->ip6_src.s6_addr, 16); @@ -826,7 +827,6 @@ fq_pie_classify_flow(struct mbuf *m, uint16_t fcount, //#endif /* IPv4 */ - ip = mtod(m, struct ip *); *((uint8_t *) &tuple[0]) = ip->ip_p; *((uint32_t *) &tuple[1]) = si->perturbation; *((uint32_t *) &tuple[5]) = ip->ip_src.s_addr; Modified: stable/11/sys/netpfil/ipfw/dn_sched_prio.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_prio.c Sun Nov 12 00:00:38 2017 (r325729) +++ stable/11/sys/netpfil/ipfw/dn_sched_prio.c Sun Nov 12 01:26:43 2017 (r325730) @@ -32,13 +32,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/11/sys/netpfil/ipfw/dn_sched_qfq.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_qfq.c Sun Nov 12 00:00:38 2017 (r325729) +++ stable/11/sys/netpfil/ipfw/dn_sched_qfq.c Sun Nov 12 01:26:43 2017 (r325730) @@ -33,13 +33,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/11/sys/netpfil/ipfw/dn_sched_rr.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_rr.c Sun Nov 12 00:00:38 2017 (r325729) +++ stable/11/sys/netpfil/ipfw/dn_sched_rr.c Sun Nov 12 01:26:43 2017 (r325730) @@ -33,13 +33,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/11/sys/netpfil/ipfw/dn_sched_wf2q.c ============================================================================== --- stable/11/sys/netpfil/ipfw/dn_sched_wf2q.c Sun Nov 12 00:00:38 2017 (r325729) +++ stable/11/sys/netpfil/ipfw/dn_sched_wf2q.c Sun Nov 12 01:26:43 2017 (r325730) @@ -34,13 +34,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/11/sys/netpfil/ipfw/ip_dn_io.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_dn_io.c Sun Nov 12 00:00:38 2017 (r325729) +++ stable/11/sys/netpfil/ipfw/ip_dn_io.c Sun Nov 12 01:26:43 2017 (r325730) @@ -237,27 +237,10 @@ SYSEND static void dummynet_send(struct mbuf *); /* - * Packets processed by dummynet have an mbuf tag associated with - * them that carries their dummynet state. - * Outside dummynet, only the 'rule' field is relevant, and it must - * be at the beginning of the structure. - */ -struct dn_pkt_tag { - struct ipfw_rule_ref rule; /* matching rule */ - - /* second part, dummynet specific */ - int dn_dir; /* action when packet comes out.*/ - /* see ip_fw_private.h */ - uint64_t output_time; /* when the pkt is due for delivery*/ - struct ifnet *ifp; /* interface, for ip_output */ - struct _ip6dn_args ip6opt; /* XXX ipv6 options */ -}; - -/* * Return the mbuf tag holding the dummynet state (it should * be the first one on the list). */ -static struct dn_pkt_tag * +struct dn_pkt_tag * dn_tag_get(struct mbuf *m) { struct m_tag *mtag = m_tag_first(m); @@ -448,7 +431,7 @@ int ecn_mark(struct mbuf* m) { struct ip *ip; - ip = mtod(m, struct ip *); + ip = (struct ip *)mtodo(m, dn_tag_get(m)->iphdr_off); switch (ip->ip_v) { case IPVERSION: @@ -472,7 +455,7 @@ ecn_mark(struct mbuf* m) #ifdef INET6 case (IPV6_VERSION >> 4): { - struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); + struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; u_int32_t flowlabel; flowlabel = ntohl(ip6->ip6_flow); @@ -859,6 +842,7 @@ tag_mbuf(struct mbuf *m, int dir, struct ip_fw_args *f dt->ifp = fwa->oif; /* dt->output tame is updated as we move through */ dt->output_time = dn_cfg.curr_time; + dt->iphdr_off = (dir & PROTO_LAYER2) ? ETHER_HDR_LEN : 0; return 0; } Modified: stable/11/sys/netpfil/ipfw/ip_dn_private.h ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_dn_private.h Sun Nov 12 00:00:38 2017 (r325729) +++ stable/11/sys/netpfil/ipfw/ip_dn_private.h Sun Nov 12 01:26:43 2017 (r325730) @@ -367,6 +367,24 @@ enum { DN_QHT_IS_Q = 0x0100, /* in flowset, qht is a single queue */ }; +/* + * Packets processed by dummynet have an mbuf tag associated with + * them that carries their dummynet state. + * Outside dummynet, only the 'rule' field is relevant, and it must + * be at the beginning of the structure. + */ +struct dn_pkt_tag { + struct ipfw_rule_ref rule; /* matching rule */ + + /* second part, dummynet specific */ + int dn_dir; /* action when packet comes out.*/ + /* see ip_fw_private.h */ + uint64_t output_time; /* when the pkt is due for delivery*/ + struct ifnet *ifp; /* interface, for ip_output */ + struct _ip6dn_args ip6opt; /* XXX ipv6 options */ + uint16_t iphdr_off; /* IP header offset for mtodo() */ +}; + extern struct dn_parms dn_cfg; //VNET_DECLARE(struct dn_parms, _base_dn_cfg); //#define dn_cfg VNET(_base_dn_cfg) @@ -374,6 +392,7 @@ extern struct dn_parms dn_cfg; int dummynet_io(struct mbuf **, int , struct ip_fw_args *); void dummynet_task(void *context, int pending); void dn_reschedule(void); +struct dn_pkt_tag * dn_tag_get(struct mbuf *m); struct dn_queue *ipdn_q_find(struct dn_fsk *, struct dn_sch_inst *, struct ipfw_flow_id *); From owner-svn-src-stable@freebsd.org Sun Nov 12 01:28:22 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D374EE53036; Sun, 12 Nov 2017 01:28:22 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70EB476A33; Sun, 12 Nov 2017 01:28:22 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAC1SLwe028135; Sun, 12 Nov 2017 01:28:21 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAC1SK0w028126; Sun, 12 Nov 2017 01:28:20 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201711120128.vAC1SK0w028126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Sun, 12 Nov 2017 01:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325731 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 X-SVN-Commit-Author: truckman X-SVN-Commit-Paths: stable/10/sys/netpfil/ipfw X-SVN-Commit-Revision: 325731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 01:28:23 -0000 Author: truckman Date: Sun Nov 12 01:28:20 2017 New Revision: 325731 URL: https://svnweb.freebsd.org/changeset/base/325731 Log: MFC r325008 Fix Dummynet AQM packet marking function ecn_mark() and fq_codel / fq_pie schedulers packet classification functions in layer2 (bridge mode). Dummynet AQM packet marking function ecn_mark() and fq_codel/fq_pie schedulers packet classification functions (fq_codel_classify_flow() and fq_pie_classify_flow()) assume mbuf is pointing at L3 (IP) packet. However, this assumption is incorrect if ipfw/dummynet is used to manage layer2 traffic (bridge mode) since mbuf will point at L2 frame. This patch solves this problem by identifying the source of the frame/packet (L2 or L3) and adding ETHER_HDR_LEN offset when converting an mbuf pointer to ip pointer if the traffic is from layer2. More specifically, in dummynet packet tagging function, tag_mbuf(), iphdr_off is set to ETHER_HDR_LEN if the traffic is from layer2 and set to zero otherwise. Whenever an access to IP header is required, mtodo(m, dn_tag_get(m)->iphdr_off) is used instead of mtod(m, struct ip *) to correctly convert mbuf pointer to ip pointer in both L2 and L3 traffic. Submitted by: lstewart Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12506 Modified: stable/10/sys/netpfil/ipfw/dn_sched_fifo.c stable/10/sys/netpfil/ipfw/dn_sched_fq_codel.c stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c stable/10/sys/netpfil/ipfw/dn_sched_prio.c stable/10/sys/netpfil/ipfw/dn_sched_qfq.c stable/10/sys/netpfil/ipfw/dn_sched_rr.c stable/10/sys/netpfil/ipfw/dn_sched_wf2q.c stable/10/sys/netpfil/ipfw/ip_dn_io.c stable/10/sys/netpfil/ipfw/ip_dn_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/dn_sched_fifo.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_fifo.c Sun Nov 12 01:26:43 2017 (r325730) +++ stable/10/sys/netpfil/ipfw/dn_sched_fifo.c Sun Nov 12 01:28:20 2017 (r325731) @@ -33,13 +33,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/10/sys/netpfil/ipfw/dn_sched_fq_codel.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_fq_codel.c Sun Nov 12 01:26:43 2017 (r325730) +++ stable/10/sys/netpfil/ipfw/dn_sched_fq_codel.c Sun Nov 12 01:28:20 2017 (r325731) @@ -218,13 +218,14 @@ fq_codel_classify_flow(struct mbuf *m, uint16_t fcount uint8_t tuple[41]; uint16_t hash=0; + ip = (struct ip *)mtodo(m, dn_tag_get(m)->iphdr_off); //#ifdef INET6 struct ip6_hdr *ip6; int isip6; - isip6 = (mtod(m, struct ip *)->ip_v == 6) ? 1 : 0; + isip6 = (ip->ip_v == 6); if(isip6) { - ip6 = mtod(m, struct ip6_hdr *); + ip6 = (struct ip6_hdr *)ip; *((uint8_t *) &tuple[0]) = ip6->ip6_nxt; *((uint32_t *) &tuple[1]) = si->perturbation; memcpy(&tuple[5], ip6->ip6_src.s6_addr, 16); @@ -253,7 +254,6 @@ fq_codel_classify_flow(struct mbuf *m, uint16_t fcount //#endif /* IPv4 */ - ip = mtod(m, struct ip *); *((uint8_t *) &tuple[0]) = ip->ip_p; *((uint32_t *) &tuple[1]) = si->perturbation; *((uint32_t *) &tuple[5]) = ip->ip_src.s_addr; Modified: stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Sun Nov 12 01:26:43 2017 (r325730) +++ stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Sun Nov 12 01:28:20 2017 (r325731) @@ -792,13 +792,14 @@ fq_pie_classify_flow(struct mbuf *m, uint16_t fcount, uint8_t tuple[41]; uint16_t hash=0; + ip = (struct ip *)mtodo(m, dn_tag_get(m)->iphdr_off); //#ifdef INET6 struct ip6_hdr *ip6; int isip6; - isip6 = (mtod(m, struct ip *)->ip_v == 6) ? 1 : 0; + isip6 = (ip->ip_v == 6); if(isip6) { - ip6 = mtod(m, struct ip6_hdr *); + ip6 = (struct ip6_hdr *)ip; *((uint8_t *) &tuple[0]) = ip6->ip6_nxt; *((uint32_t *) &tuple[1]) = si->perturbation; memcpy(&tuple[5], ip6->ip6_src.s6_addr, 16); @@ -826,7 +827,6 @@ fq_pie_classify_flow(struct mbuf *m, uint16_t fcount, //#endif /* IPv4 */ - ip = mtod(m, struct ip *); *((uint8_t *) &tuple[0]) = ip->ip_p; *((uint32_t *) &tuple[1]) = si->perturbation; *((uint32_t *) &tuple[5]) = ip->ip_src.s_addr; Modified: stable/10/sys/netpfil/ipfw/dn_sched_prio.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_prio.c Sun Nov 12 01:26:43 2017 (r325730) +++ stable/10/sys/netpfil/ipfw/dn_sched_prio.c Sun Nov 12 01:28:20 2017 (r325731) @@ -32,13 +32,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/10/sys/netpfil/ipfw/dn_sched_qfq.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_qfq.c Sun Nov 12 01:26:43 2017 (r325730) +++ stable/10/sys/netpfil/ipfw/dn_sched_qfq.c Sun Nov 12 01:28:20 2017 (r325731) @@ -33,13 +33,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/10/sys/netpfil/ipfw/dn_sched_rr.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_rr.c Sun Nov 12 01:26:43 2017 (r325730) +++ stable/10/sys/netpfil/ipfw/dn_sched_rr.c Sun Nov 12 01:28:20 2017 (r325731) @@ -33,13 +33,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/10/sys/netpfil/ipfw/dn_sched_wf2q.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_wf2q.c Sun Nov 12 01:26:43 2017 (r325730) +++ stable/10/sys/netpfil/ipfw/dn_sched_wf2q.c Sun Nov 12 01:28:20 2017 (r325731) @@ -34,13 +34,16 @@ #include #include #include +#include #include #include +#include #include /* IFNAMSIZ */ #include #include /* ipfw_rule_ref */ #include /* flow_id */ #include +#include #include #include #ifdef NEW_AQM Modified: stable/10/sys/netpfil/ipfw/ip_dn_io.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_dn_io.c Sun Nov 12 01:26:43 2017 (r325730) +++ stable/10/sys/netpfil/ipfw/ip_dn_io.c Sun Nov 12 01:28:20 2017 (r325731) @@ -236,27 +236,10 @@ SYSEND static void dummynet_send(struct mbuf *); /* - * Packets processed by dummynet have an mbuf tag associated with - * them that carries their dummynet state. - * Outside dummynet, only the 'rule' field is relevant, and it must - * be at the beginning of the structure. - */ -struct dn_pkt_tag { - struct ipfw_rule_ref rule; /* matching rule */ - - /* second part, dummynet specific */ - int dn_dir; /* action when packet comes out.*/ - /* see ip_fw_private.h */ - uint64_t output_time; /* when the pkt is due for delivery*/ - struct ifnet *ifp; /* interface, for ip_output */ - struct _ip6dn_args ip6opt; /* XXX ipv6 options */ -}; - -/* * Return the mbuf tag holding the dummynet state (it should * be the first one on the list). */ -static struct dn_pkt_tag * +struct dn_pkt_tag * dn_tag_get(struct mbuf *m) { struct m_tag *mtag = m_tag_first(m); @@ -418,7 +401,7 @@ int ecn_mark(struct mbuf* m) { struct ip *ip; - ip = mtod(m, struct ip *); + ip = (struct ip *)mtodo(m, dn_tag_get(m)->iphdr_off); switch (ip->ip_v) { case IPVERSION: @@ -451,7 +434,7 @@ ecn_mark(struct mbuf* m) #ifdef INET6 case (IPV6_VERSION >> 4): { - struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); + struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; u_int32_t flowlabel; flowlabel = ntohl(ip6->ip6_flow); @@ -832,6 +815,7 @@ tag_mbuf(struct mbuf *m, int dir, struct ip_fw_args *f dt->ifp = fwa->oif; /* dt->output tame is updated as we move through */ dt->output_time = dn_cfg.curr_time; + dt->iphdr_off = (dir & PROTO_LAYER2) ? ETHER_HDR_LEN : 0; return 0; } Modified: stable/10/sys/netpfil/ipfw/ip_dn_private.h ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_dn_private.h Sun Nov 12 01:26:43 2017 (r325730) +++ stable/10/sys/netpfil/ipfw/ip_dn_private.h Sun Nov 12 01:28:20 2017 (r325731) @@ -366,6 +366,24 @@ enum { DN_QHT_IS_Q = 0x0100, /* in flowset, qht is a single queue */ }; +/* + * Packets processed by dummynet have an mbuf tag associated with + * them that carries their dummynet state. + * Outside dummynet, only the 'rule' field is relevant, and it must + * be at the beginning of the structure. + */ +struct dn_pkt_tag { + struct ipfw_rule_ref rule; /* matching rule */ + + /* second part, dummynet specific */ + int dn_dir; /* action when packet comes out.*/ + /* see ip_fw_private.h */ + uint64_t output_time; /* when the pkt is due for delivery*/ + struct ifnet *ifp; /* interface, for ip_output */ + struct _ip6dn_args ip6opt; /* XXX ipv6 options */ + uint16_t iphdr_off; /* IP header offset for mtodo() */ +}; + extern struct dn_parms dn_cfg; //VNET_DECLARE(struct dn_parms, _base_dn_cfg); //#define dn_cfg VNET(_base_dn_cfg) @@ -373,6 +391,7 @@ extern struct dn_parms dn_cfg; int dummynet_io(struct mbuf **, int , struct ip_fw_args *); void dummynet_task(void *context, int pending); void dn_reschedule(void); +struct dn_pkt_tag * dn_tag_get(struct mbuf *m); struct dn_queue *ipdn_q_find(struct dn_fsk *, struct dn_sch_inst *, struct ipfw_flow_id *); From owner-svn-src-stable@freebsd.org Sun Nov 12 18:06:44 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8687C31FDC; Sun, 12 Nov 2017 18:06:44 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A28AA6F6BB; Sun, 12 Nov 2017 18:06:44 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vACI6hk1049964; Sun, 12 Nov 2017 18:06:43 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vACI6hNL049963; Sun, 12 Nov 2017 18:06:43 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201711121806.vACI6hNL049963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Sun, 12 Nov 2017 18:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325745 - stable/11/sys/fs/ext2fs X-SVN-Group: stable-11 X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: stable/11/sys/fs/ext2fs X-SVN-Commit-Revision: 325745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 18:06:45 -0000 Author: fsu Date: Sun Nov 12 18:06:43 2017 New Revision: 325745 URL: https://svnweb.freebsd.org/changeset/base/325745 Log: MFC r324962: Set doreallocblks sysctl value to zero by default because of possibility of filesystem corruption. Approved by: pfg (mentor) Modified: stable/11/sys/fs/ext2fs/ext2_alloc.c Modified: stable/11/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- stable/11/sys/fs/ext2fs/ext2_alloc.c Sun Nov 12 17:15:54 2017 (r325744) +++ stable/11/sys/fs/ext2fs/ext2_alloc.c Sun Nov 12 18:06:43 2017 (r325745) @@ -172,7 +172,7 @@ static int doasyncfree = 1; SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "Use asychronous writes to update block pointers when freeing blocks"); -static int doreallocblks = 1; +static int doreallocblks = 0; SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); From owner-svn-src-stable@freebsd.org Mon Nov 13 02:31:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40F93CFCCA6; Mon, 13 Nov 2017 02:31:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B2797DDA1; Mon, 13 Nov 2017 02:31:26 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAD2VQpp064983; Mon, 13 Nov 2017 02:31:26 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAD2VQJM064982; Mon, 13 Nov 2017 02:31:26 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201711130231.vAD2VQJM064982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 13 Nov 2017 02:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325750 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/10/sys/fs/ext2fs X-SVN-Commit-Revision: 325750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 02:31:27 -0000 Author: pfg Date: Mon Nov 13 02:31:25 2017 New Revision: 325750 URL: https://svnweb.freebsd.org/changeset/base/325750 Log: MFC r324962 (by fsu@): Set doreallocblks sysctl value to zero by default because of possibility of filesystem corruption. Fedor has found some weird behavior in his tests. Modified: stable/10/sys/fs/ext2fs/ext2_alloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_alloc.c Mon Nov 13 00:32:44 2017 (r325749) +++ stable/10/sys/fs/ext2fs/ext2_alloc.c Mon Nov 13 02:31:25 2017 (r325750) @@ -153,7 +153,7 @@ static int doasyncfree = 1; SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "Use asychronous writes to update block pointers when freeing blocks"); -static int doreallocblks = 1; +static int doreallocblks = 0; SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); From owner-svn-src-stable@freebsd.org Mon Nov 13 09:07:31 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0CF7D7E320; Mon, 13 Nov 2017 09:07: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 mx1.freebsd.org (Postfix) with ESMTPS id 7F64C66AA4; Mon, 13 Nov 2017 09:07:31 +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 vAD97UPR032556; Mon, 13 Nov 2017 09:07:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAD97UfS032555; Mon, 13 Nov 2017 09:07:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711130907.vAD97UfS032555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 13 Nov 2017 09:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325756 - stable/11/sys/dev/hwpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/hwpmc X-SVN-Commit-Revision: 325756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 09:07:32 -0000 Author: kib Date: Mon Nov 13 09:07:30 2017 New Revision: 325756 URL: https://svnweb.freebsd.org/changeset/base/325756 Log: MFC r325671: Check that the pmc index is less than the number of hardware PMCs, instead of asserting the condition. Modified: stable/11/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_mod.c Mon Nov 13 07:47:43 2017 (r325755) +++ stable/11/sys/dev/hwpmc/hwpmc_mod.c Mon Nov 13 09:07:30 2017 (r325756) @@ -2578,10 +2578,9 @@ pmc_find_pmc(pmc_id_t pmcid, struct pmc **pmc) struct pmc_owner *po; struct pmc_process *pp; - KASSERT(PMC_ID_TO_ROWINDEX(pmcid) < md->pmd_npmc, - ("[pmc,%d] Illegal pmc index %d (max %d)", __LINE__, - PMC_ID_TO_ROWINDEX(pmcid), md->pmd_npmc)); PMCDBG1(PMC,FND,1, "find-pmc id=%d", pmcid); + if (PMC_ID_TO_ROWINDEX(pmcid) >= md->pmd_npmc) + return (EINVAL); if ((po = pmc_find_owner_descriptor(curthread->td_proc)) == NULL) { /* From owner-svn-src-stable@freebsd.org Mon Nov 13 09:10:18 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EDFCD7E414; Mon, 13 Nov 2017 09:10:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B7F166C2D; Mon, 13 Nov 2017 09:10:18 +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 vAD9AH1O032732; Mon, 13 Nov 2017 09:10:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAD9AHna032731; Mon, 13 Nov 2017 09:10:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711130910.vAD9AHna032731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 13 Nov 2017 09:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325757 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/dev/hwpmc X-SVN-Commit-Revision: 325757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 09:10:18 -0000 Author: kib Date: Mon Nov 13 09:10:17 2017 New Revision: 325757 URL: https://svnweb.freebsd.org/changeset/base/325757 Log: MFC r325671: Check that the pmc index is less than the number of hardware PMCs, instead of asserting the condition. Modified: stable/10/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Nov 13 09:07:30 2017 (r325756) +++ stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Nov 13 09:10:17 2017 (r325757) @@ -2583,6 +2583,8 @@ pmc_find_pmc(pmc_id_t pmcid, struct pmc **pmc) struct pmc_owner *po; PMCDBG1(PMC,FND,1, "find-pmc id=%d", pmcid); + if (PMC_ID_TO_ROWINDEX(pmcid) >= md->pmd_npmc) + return (EINVAL); if ((po = pmc_find_owner_descriptor(curthread->td_proc)) == NULL) return ESRCH; From owner-svn-src-stable@freebsd.org Mon Nov 13 23:21:19 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 539DFDD9C0A; Mon, 13 Nov 2017 23:21:19 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D6B42F00; Mon, 13 Nov 2017 23:21:18 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vADNLIVG096106; Mon, 13 Nov 2017 23:21:18 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vADNLHDJ096102; Mon, 13 Nov 2017 23:21:17 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201711132321.vADNLHDJ096102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Mon, 13 Nov 2017 23:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325783 - stable/10/sys/kern X-SVN-Group: stable-10 X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: stable/10/sys/kern X-SVN-Commit-Revision: 325783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 23:21:19 -0000 Author: jamie Date: Mon Nov 13 23:21:17 2017 New Revision: 325783 URL: https://svnweb.freebsd.org/changeset/base/325783 Log: MFC r297935: Separate POSIX sem/shm objects in jails, by prepending the jail's path name to the object's "path". While the objects don't have real path names, it's a filesystem-like namespace, which allows jails to be kept to their own space, but still allows the system / jail parent to access a jail's IPC. MFC r297936: Separate POSIX mqueue objects in jails; actually, separate them by the jail's root, so jails that don't have their own filesystem directory also won't have their own mqueue namespace. MFC r297976: Clean up some style(9) violations. MFC r298567: Use the new PR_METHOD_REMOVE to clean up jail handling in POSIX message queues. PR: 208082 Submitted by: delphij Modified: stable/10/sys/kern/uipc_mqueue.c stable/10/sys/kern/uipc_sem.c stable/10/sys/kern/uipc_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_mqueue.c ============================================================================== --- stable/10/sys/kern/uipc_mqueue.c Mon Nov 13 22:16:47 2017 (r325782) +++ stable/10/sys/kern/uipc_mqueue.c Mon Nov 13 23:21:17 2017 (r325783) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -60,8 +61,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include #include #include #include @@ -131,6 +132,7 @@ struct mqfs_node { LIST_HEAD(,mqfs_node) mn_children; LIST_ENTRY(mqfs_node) mn_sibling; LIST_HEAD(,mqfs_vdata) mn_vnodes; + const void *mn_pr_root; int mn_refcount; mqfs_type_t mn_type; int mn_deleted; @@ -218,6 +220,7 @@ static uma_zone_t mvdata_zone; static uma_zone_t mqnoti_zone; static struct vop_vector mqfs_vnodeops; static struct fileops mqueueops; +static unsigned mqfs_osd_jail_slot; /* * Directory structure construction and manipulation @@ -235,6 +238,7 @@ static int mqfs_destroy(struct mqfs_node *mn); static void mqfs_fileno_alloc(struct mqfs_info *mi, struct mqfs_node *mn); static void mqfs_fileno_free(struct mqfs_info *mi, struct mqfs_node *mn); static int mqfs_allocv(struct mount *mp, struct vnode **vpp, struct mqfs_node *pn); +static int mqfs_prison_remove(void *obj, void *data); /* * Message queue construction and maniplation @@ -435,6 +439,7 @@ mqfs_create_node(const char *name, int namelen, struct node = mqnode_alloc(); strncpy(node->mn_name, name, namelen); + node->mn_pr_root = cred->cr_prison->pr_root; node->mn_type = nodetype; node->mn_refcount = 1; vfs_timestamp(&node->mn_birth); @@ -643,6 +648,9 @@ mqfs_init(struct vfsconf *vfc) { struct mqfs_node *root; struct mqfs_info *mi; + osd_method_t methods[PR_MAXMETHOD] = { + [PR_METHOD_REMOVE] = mqfs_prison_remove, + }; mqnode_zone = uma_zcreate("mqnode", sizeof(struct mqfs_node), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); @@ -669,6 +677,7 @@ mqfs_init(struct vfsconf *vfc) EVENTHANDLER_PRI_ANY); mq_fdclose = mqueue_fdclose; p31b_setcfg(CTL_P1003_1B_MESSAGE_PASSING, _POSIX_MESSAGE_PASSING); + mqfs_osd_jail_slot = osd_jail_register(NULL, methods); return (0); } @@ -682,6 +691,7 @@ mqfs_uninit(struct vfsconf *vfc) if (!unloadable) return (EOPNOTSUPP); + osd_jail_deregister(mqfs_osd_jail_slot); EVENTHANDLER_DEREGISTER(process_exit, exit_tag); mi = &mqfs_data; mqfs_destroy(mi->mi_root); @@ -801,13 +811,17 @@ found: * Search a directory entry */ static struct mqfs_node * -mqfs_search(struct mqfs_node *pd, const char *name, int len) +mqfs_search(struct mqfs_node *pd, const char *name, int len, struct ucred *cred) { struct mqfs_node *pn; + const void *pr_root; sx_assert(&pd->mn_info->mi_lock, SX_LOCKED); + pr_root = cred->cr_prison->pr_root; LIST_FOREACH(pn, &pd->mn_children, mn_sibling) { - if (strncmp(pn->mn_name, name, len) == 0 && + /* Only match names within the same prison root directory */ + if ((pn->mn_pr_root == NULL || pn->mn_pr_root == pr_root) && + strncmp(pn->mn_name, name, len) == 0 && pn->mn_name[len] == '\0') return (pn); } @@ -879,7 +893,7 @@ mqfs_lookupx(struct vop_cachedlookup_args *ap) /* named node */ sx_xlock(&mqfs->mi_lock); - pn = mqfs_search(pd, pname, namelen); + pn = mqfs_search(pd, pname, namelen, cnp->cn_cred); if (pn != NULL) mqnode_addref(pn); sx_xunlock(&mqfs->mi_lock); @@ -1364,6 +1378,7 @@ mqfs_readdir(struct vop_readdir_args *ap) struct mqfs_node *pn; struct dirent entry; struct uio *uio; + const void *pr_root; int *tmp_ncookies = NULL; off_t offset; int error, i; @@ -1388,10 +1403,18 @@ mqfs_readdir(struct vop_readdir_args *ap) error = 0; offset = 0; + pr_root = ap->a_cred->cr_prison->pr_root; sx_xlock(&mi->mi_lock); LIST_FOREACH(pn, &pd->mn_children, mn_sibling) { entry.d_reclen = sizeof(entry); + + /* + * Only show names within the same prison root directory + * (or not associated with a prison, e.g. "." and ".."). + */ + if (pn->mn_pr_root != NULL && pn->mn_pr_root != pr_root) + continue; if (!pn->mn_fileno) mqfs_fileno_alloc(mi, pn); entry.d_fileno = pn->mn_fileno; @@ -1525,6 +1548,38 @@ mqfs_rmdir(struct vop_rmdir_args *ap) #endif /* notyet */ /* + * See if this prison root is obsolete, and clean up associated queues if it is. + */ +static int +mqfs_prison_remove(void *obj, void *data __unused) +{ + const struct prison *pr = obj; + const struct prison *tpr; + struct mqfs_node *pn, *tpn; + int found; + + found = 0; + TAILQ_FOREACH(tpr, &allprison, pr_list) { + if (tpr->pr_root == pr->pr_root && tpr != pr && tpr->pr_ref > 0) + found = 1; + } + if (!found) { + /* + * No jails are rooted in this directory anymore, + * so no queues should be either. + */ + sx_xlock(&mqfs_data.mi_lock); + LIST_FOREACH_SAFE(pn, &mqfs_data.mi_root->mn_children, + mn_sibling, tpn) { + if (pn->mn_pr_root == pr->pr_root) + (void)do_unlink(pn, curthread->td_ucred); + } + sx_xunlock(&mqfs_data.mi_lock); + } + return (0); +} + +/* * Allocate a message queue */ static struct mqueue * @@ -1984,7 +2039,7 @@ kern_kmq_open(struct thread *td, const char *upath, in return (error); sx_xlock(&mqfs_data.mi_lock); - pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1); + pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1, td->td_ucred); if (pn == NULL) { if (!(flags & O_CREAT)) { error = ENOENT; @@ -2079,7 +2134,7 @@ sys_kmq_unlink(struct thread *td, struct kmq_unlink_ar return (EINVAL); sx_xlock(&mqfs_data.mi_lock); - pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1); + pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1, td->td_ucred); if (pn != NULL) error = do_unlink(pn, td->td_ucred); else Modified: stable/10/sys/kern/uipc_sem.c ============================================================================== --- stable/10/sys/kern/uipc_sem.c Mon Nov 13 22:16:47 2017 (r325782) +++ stable/10/sys/kern/uipc_sem.c Mon Nov 13 23:21:17 2017 (r325783) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -444,12 +445,24 @@ ksem_remove(char *path, Fnv32_t fnv, struct ucred *ucr static void ksem_info_impl(struct ksem *ks, char *path, size_t size, uint32_t *value) { + const char *ks_path, *pr_path; + size_t pr_pathlen; if (ks->ks_path == NULL) return; sx_slock(&ksem_dict_lock); - if (ks->ks_path != NULL) - strlcpy(path, ks->ks_path, size); + ks_path = ks->ks_path; + if (ks_path != NULL) { + pr_path = curthread->td_ucred->cr_prison->pr_path; + if (strcmp(pr_path, "/") != 0) { + /* Return the jail-rooted pathname. */ + pr_pathlen = strlen(pr_path); + if (strncmp(ks_path, pr_path, pr_pathlen) == 0 && + ks_path[pr_pathlen] == '/') + ks_path += pr_pathlen; + } + strlcpy(path, ks_path, size); + } if (value != NULL) *value = ks->ks_value; sx_sunlock(&ksem_dict_lock); @@ -493,6 +506,8 @@ ksem_create(struct thread *td, const char *name, semid struct ksem *ks; struct file *fp; char *path; + const char *pr_path; + size_t pr_pathlen; Fnv32_t fnv; int error, fd; @@ -529,10 +544,16 @@ ksem_create(struct thread *td, const char *name, semid ks->ks_flags |= KS_ANONYMOUS; } else { path = malloc(MAXPATHLEN, M_KSEM, M_WAITOK); - error = copyinstr(name, path, MAXPATHLEN, NULL); + pr_path = td->td_ucred->cr_prison->pr_path; + /* Construct a full pathname for jailed callers. */ + pr_pathlen = strcmp(pr_path, "/") == 0 ? 0 + : strlcpy(path, pr_path, MAXPATHLEN); + error = copyinstr(name, path + pr_pathlen, + MAXPATHLEN - pr_pathlen, NULL); + /* Require paths to start with a '/' character. */ - if (error == 0 && path[0] != '/') + if (error == 0 && path[pr_pathlen] != '/') error = EINVAL; if (error) { fdclose(td, fp, fd); @@ -668,11 +689,17 @@ int sys_ksem_unlink(struct thread *td, struct ksem_unlink_args *uap) { char *path; + const char *pr_path; + size_t pr_pathlen; Fnv32_t fnv; int error; path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); - error = copyinstr(uap->name, path, MAXPATHLEN, NULL); + pr_path = td->td_ucred->cr_prison->pr_path; + pr_pathlen = strcmp(pr_path, "/") == 0 ? 0 + : strlcpy(path, pr_path, MAXPATHLEN); + error = copyinstr(uap->name, path + pr_pathlen, MAXPATHLEN - pr_pathlen, + NULL); if (error) { free(path, M_TEMP); return (error); Modified: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Mon Nov 13 22:16:47 2017 (r325782) +++ stable/10/sys/kern/uipc_shm.c Mon Nov 13 23:21:17 2017 (r325783) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -712,6 +713,8 @@ sys_shm_open(struct thread *td, struct shm_open_args * struct shmfd *shmfd; struct file *fp; char *path; + const char *pr_path; + size_t pr_pathlen; Fnv32_t fnv; mode_t cmode; int fd, error; @@ -749,13 +752,19 @@ sys_shm_open(struct thread *td, struct shm_open_args * shmfd = shm_alloc(td->td_ucred, cmode); } else { path = malloc(MAXPATHLEN, M_SHMFD, M_WAITOK); - error = copyinstr(uap->path, path, MAXPATHLEN, NULL); + pr_path = td->td_ucred->cr_prison->pr_path; + + /* Construct a full pathname for jailed callers. */ + pr_pathlen = strcmp(pr_path, "/") == 0 ? 0 + : strlcpy(path, pr_path, MAXPATHLEN); + error = copyinstr(uap->path, path + pr_pathlen, + MAXPATHLEN - pr_pathlen, NULL); #ifdef KTRACE if (error == 0 && KTRPOINT(curthread, KTR_NAMEI)) ktrnamei(path); #endif /* Require paths to start with a '/' character. */ - if (error == 0 && path[0] != '/') + if (error == 0 && path[pr_pathlen] != '/') error = EINVAL; if (error) { fdclose(td, fp, fd); @@ -842,11 +851,17 @@ int sys_shm_unlink(struct thread *td, struct shm_unlink_args *uap) { char *path; + const char *pr_path; + size_t pr_pathlen; Fnv32_t fnv; int error; path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); - error = copyinstr(uap->path, path, MAXPATHLEN, NULL); + pr_path = td->td_ucred->cr_prison->pr_path; + pr_pathlen = strcmp(pr_path, "/") == 0 ? 0 + : strlcpy(path, pr_path, MAXPATHLEN); + error = copyinstr(uap->path, path + pr_pathlen, MAXPATHLEN - pr_pathlen, + NULL); if (error) { free(path, M_TEMP); return (error); @@ -1053,11 +1068,23 @@ shm_unmap(struct file *fp, void *mem, size_t size) void shm_path(struct shmfd *shmfd, char *path, size_t size) { + const char *shm_path, *pr_path; + size_t pr_pathlen; if (shmfd->shm_path == NULL) return; sx_slock(&shm_dict_lock); - if (shmfd->shm_path != NULL) - strlcpy(path, shmfd->shm_path, size); + shm_path = shmfd->shm_path; + if (shm_path != NULL) { + pr_path = curthread->td_ucred->cr_prison->pr_path; + if (strcmp(pr_path, "/") != 0) { + /* Return the jail-rooted pathname. */ + pr_pathlen = strlen(pr_path); + if (strncmp(shm_path, pr_path, pr_pathlen) == 0 && + shm_path[pr_pathlen] == '/') + shm_path += pr_pathlen; + } + strlcpy(path, shm_path, size); + } sx_sunlock(&shm_dict_lock); } From owner-svn-src-stable@freebsd.org Tue Nov 14 09:29:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91BA2DB912E; Tue, 14 Nov 2017 09:29:03 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44B7576BD1; Tue, 14 Nov 2017 09:29:03 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAE9T267051244; Tue, 14 Nov 2017 09:29:02 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE9T200051242; Tue, 14 Nov 2017 09:29:02 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201711140929.vAE9T200051242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Tue, 14 Nov 2017 09:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325798 - in stable/11: etc share/man/man5 X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/11: etc share/man/man5 X-SVN-Commit-Revision: 325798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 09:29:03 -0000 Author: eugen Date: Tue Nov 14 09:29:02 2017 New Revision: 325798 URL: https://svnweb.freebsd.org/changeset/base/325798 Log: MFC r325559: ifconfig__descr Add suitable knob ifconfig__descr for static interface description. Document availability of interface descriptions within rc.conf(5). Approved by: avg (mentor) Modified: stable/11/etc/network.subr stable/11/share/man/man5/rc.conf.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/network.subr ============================================================================== --- stable/11/etc/network.subr Tue Nov 14 07:04:06 2017 (r325797) +++ stable/11/etc/network.subr Tue Nov 14 09:29:02 2017 (r325798) @@ -122,7 +122,7 @@ ifn_vnet0() # ifconfig_up() { - local _cfg _ipv6_opts ifconfig_args + local _cfg _ifconfig_descr _ipv6_opts ifconfig_args _cfg=1 # Make sure lo0 always comes up. @@ -213,6 +213,11 @@ ifconfig_up() ifalias $1 link alias ifalias $1 ether alias + + _ifconfig_descr=`get_if_var $1 ifconfig_IF_descr` + if [ -n "${_ifconfig_descr}" ]; then + ${IFCONFIG_CMD} $1 description "${_ifconfig_descr}" + fi if wpaif $1; then /etc/rc.d/wpa_supplicant start $1 Modified: stable/11/share/man/man5/rc.conf.5 ============================================================================== --- stable/11/share/man/man5/rc.conf.5 Tue Nov 14 07:04:06 2017 (r325797) +++ stable/11/share/man/man5/rc.conf.5 Tue Nov 14 09:29:02 2017 (r325798) @@ -1578,6 +1578,23 @@ is set to 1. .Pp Default is .Dq Li NO . +.It Va ifconfig_ Ns Ao Ar interface Ac Ns _descr +.Pq Vt str +This assigns arbitrary description to an interface. +The +.Xr sysctl 8 +variable +.Va net.ifdescr_maxlen +limits its length. +This static setting may be overridden by commands +started with dynamic interface configuration utilities +like +.Xr dhclient 8 +hooks. The description can be seen with +.Xr ifconfig 8 +command and it may be exported with +.Xr bsnmpd 1 +daemon using its MIB-2 module. .It Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 .Pq Vt str IPv6 functionality on an interface should be configured by From owner-svn-src-stable@freebsd.org Tue Nov 14 09:31:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F1A1DB942C; Tue, 14 Nov 2017 09:31:58 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B60AD7707F; Tue, 14 Nov 2017 09:31:57 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAE9VuEQ054463; Tue, 14 Nov 2017 09:31:56 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAE9VuWE054461; Tue, 14 Nov 2017 09:31:56 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201711140931.vAE9VuWE054461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Tue, 14 Nov 2017 09:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325799 - in stable/10: etc share/man/man5 X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/10: etc share/man/man5 X-SVN-Commit-Revision: 325799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 09:31:58 -0000 Author: eugen Date: Tue Nov 14 09:31:56 2017 New Revision: 325799 URL: https://svnweb.freebsd.org/changeset/base/325799 Log: MFC r325559: ifconfig__descr Add suitable knob ifconfig__descr for static interface description. Document availability of interface descriptions within rc.conf(5). Approved by: avg (mentor) Modified: stable/10/etc/network.subr stable/10/share/man/man5/rc.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/network.subr ============================================================================== --- stable/10/etc/network.subr Tue Nov 14 09:29:02 2017 (r325798) +++ stable/10/etc/network.subr Tue Nov 14 09:31:56 2017 (r325799) @@ -124,7 +124,7 @@ ifn_vnet0() # ifconfig_up() { - local _cfg _ipv6_opts ifconfig_args + local _cfg _ifconfig_descr _ipv6_opts ifconfig_args _cfg=1 # Make sure lo0 always comes up. @@ -216,8 +216,9 @@ ifconfig_up() ifalias $1 link alias ifalias $1 ether alias - if [ ${_cfg} -eq 0 ]; then - ${IFCONFIG_CMD} $1 up + _ifconfig_descr=`get_if_var $1 ifconfig_IF_descr` + if [ -n "${_ifconfig_descr}" ]; then + ${IFCONFIG_CMD} $1 description "${_ifconfig_descr}" fi if wpaif $1; then Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Tue Nov 14 09:29:02 2017 (r325798) +++ stable/10/share/man/man5/rc.conf.5 Tue Nov 14 09:31:56 2017 (r325799) @@ -1575,6 +1575,23 @@ is set to 1. .Pp Default is .Dq Li NO . +.It Va ifconfig_ Ns Ao Ar interface Ac Ns _descr +.Pq Vt str +This assigns arbitrary description to an interface. +The +.Xr sysctl 8 +variable +.Va net.ifdescr_maxlen +limits its length. +This static setting may be overridden by commands +started with dynamic interface configuration utilities +like +.Xr dhclient 8 +hooks. The description can be seen with +.Xr ifconfig 8 +command and it may be exported with +.Xr bsnmpd 1 +daemon using its MIB-2 module. .It Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 .Pq Vt str IPv6 functionality on an interface should be configured by From owner-svn-src-stable@freebsd.org Tue Nov 14 10:48:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2378DDBAB22; Tue, 14 Nov 2017 10:48:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E126D797A7; Tue, 14 Nov 2017 10:48:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEAmUIN084614; Tue, 14 Nov 2017 10:48:30 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEAmUwt084613; Tue, 14 Nov 2017 10:48:30 GMT (envelope-from des@FreeBSD.org) Message-Id: <201711141048.vAEAmUwt084613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 14 Nov 2017 10:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325801 - stable/11/lib/libpam/modules/pam_unix X-SVN-Group: stable-11 X-SVN-Commit-Author: des X-SVN-Commit-Paths: stable/11/lib/libpam/modules/pam_unix X-SVN-Commit-Revision: 325801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 10:48:32 -0000 Author: des Date: Tue Nov 14 10:48:30 2017 New Revision: 325801 URL: https://svnweb.freebsd.org/changeset/base/325801 Log: MFH (r325010): don't bother verifying a password that we know is too long. Reported by: jkim@ Security: CVE-2016-6210 Modified: stable/11/lib/libpam/modules/pam_unix/pam_unix.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libpam/modules/pam_unix/pam_unix.c ============================================================================== --- stable/11/lib/libpam/modules/pam_unix/pam_unix.c Tue Nov 14 10:15:17 2017 (r325800) +++ stable/11/lib/libpam/modules/pam_unix/pam_unix.c Tue Nov 14 10:48:30 2017 (r325801) @@ -111,6 +111,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __un if (!(flags & PAM_DISALLOW_NULL_AUTHTOK) && openpam_get_option(pamh, PAM_OPT_NULLOK)) return (PAM_SUCCESS); + PAM_LOG("Password is empty, using fake password"); realpw = "*"; } lc = login_getpwclass(pwd); @@ -125,6 +126,10 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __un if (retval != PAM_SUCCESS) return (retval); PAM_LOG("Got password"); + if (strnlen(pass, _PASSWORD_LEN + 1) > _PASSWORD_LEN) { + PAM_LOG("Password is too long, using fake password"); + realpw = "*"; + } if (strcmp(crypt(pass, realpw), realpw) == 0) return (PAM_SUCCESS); From owner-svn-src-stable@freebsd.org Tue Nov 14 10:49:08 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62D87DBAB86; Tue, 14 Nov 2017 10:49:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C8E4798DB; Tue, 14 Nov 2017 10:49:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEAn7rw084687; Tue, 14 Nov 2017 10:49:07 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEAn7TW084686; Tue, 14 Nov 2017 10:49:07 GMT (envelope-from des@FreeBSD.org) Message-Id: <201711141049.vAEAn7TW084686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 14 Nov 2017 10:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325802 - stable/10/lib/libpam/modules/pam_unix X-SVN-Group: stable-10 X-SVN-Commit-Author: des X-SVN-Commit-Paths: stable/10/lib/libpam/modules/pam_unix X-SVN-Commit-Revision: 325802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 10:49:08 -0000 Author: des Date: Tue Nov 14 10:49:07 2017 New Revision: 325802 URL: https://svnweb.freebsd.org/changeset/base/325802 Log: MFH (r325010): don't bother verifying a password that we know is too long. Reported by: jkim@ Security: CVE-2016-6210 Modified: stable/10/lib/libpam/modules/pam_unix/pam_unix.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/pam_unix/pam_unix.c ============================================================================== --- stable/10/lib/libpam/modules/pam_unix/pam_unix.c Tue Nov 14 10:48:30 2017 (r325801) +++ stable/10/lib/libpam/modules/pam_unix/pam_unix.c Tue Nov 14 10:49:07 2017 (r325802) @@ -111,6 +111,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __un if (!(flags & PAM_DISALLOW_NULL_AUTHTOK) && openpam_get_option(pamh, PAM_OPT_NULLOK)) return (PAM_SUCCESS); + PAM_LOG("Password is empty, using fake password"); realpw = "*"; } lc = login_getpwclass(pwd); @@ -125,6 +126,10 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __un if (retval != PAM_SUCCESS) return (retval); PAM_LOG("Got password"); + if (strnlen(pass, _PASSWORD_LEN + 1) > _PASSWORD_LEN) { + PAM_LOG("Password is too long, using fake password"); + realpw = "*"; + } if (strcmp(crypt(pass, realpw), realpw) == 0) return (PAM_SUCCESS); From owner-svn-src-stable@freebsd.org Tue Nov 14 11:02:47 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90423DBAF71; Tue, 14 Nov 2017 11:02:47 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AC937A084; Tue, 14 Nov 2017 11:02:47 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEB2k5C092847; Tue, 14 Nov 2017 11:02:46 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEB2k86092846; Tue, 14 Nov 2017 11:02:46 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201711141102.vAEB2k86092846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Tue, 14 Nov 2017 11:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325803 - stable/10/etc X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/etc X-SVN-Commit-Revision: 325803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 11:02:47 -0000 Author: eugen Date: Tue Nov 14 11:02:46 2017 New Revision: 325803 URL: https://svnweb.freebsd.org/changeset/base/325803 Log: Fix breakage in r325799 that removed a bit of code by my mistake. Approved by: avg (mentor) Modified: stable/10/etc/network.subr Modified: stable/10/etc/network.subr ============================================================================== --- stable/10/etc/network.subr Tue Nov 14 10:49:07 2017 (r325802) +++ stable/10/etc/network.subr Tue Nov 14 11:02:46 2017 (r325803) @@ -216,6 +216,10 @@ ifconfig_up() ifalias $1 link alias ifalias $1 ether alias + if [ ${_cfg} -eq 0 ]; then + ${IFCONFIG_CMD} $1 up + fi + _ifconfig_descr=`get_if_var $1 ifconfig_IF_descr` if [ -n "${_ifconfig_descr}" ]; then ${IFCONFIG_CMD} $1 description "${_ifconfig_descr}" From owner-svn-src-stable@freebsd.org Tue Nov 14 15:07:35 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5D80DC151B; Tue, 14 Nov 2017 15:07:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFFF52510; Tue, 14 Nov 2017 15:07:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEF7Y2a095534; Tue, 14 Nov 2017 15:07:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEF7YIR095533; Tue, 14 Nov 2017 15:07:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711141507.vAEF7YIR095533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 14 Nov 2017 15:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325808 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 325808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 15:07:35 -0000 Author: gjb Date: Tue Nov 14 15:07:34 2017 New Revision: 325808 URL: https://svnweb.freebsd.org/changeset/base/325808 Log: MFC r322401: Avoid creating kernel-dbg.txz distribution sets and kernel-debug packages when MK_DEBUG_FILES is 'no'. Differential Revision: https://reviews.freebsd.org/D12544 (related) Sponsored by: The FreeBSD Foundation Modified: stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Tue Nov 14 14:51:37 2017 (r325807) +++ stable/11/Makefile.inc1 Tue Nov 14 15:07:34 2017 (r325808) @@ -1350,20 +1350,24 @@ packagekernel: .PHONY @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .endif +.if ${MK_DEBUG_FILES} != "no" cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - --include '*/*/*.debug' \ @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz +.endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - --exclude '*.debug' \ @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz +.if ${MK_DEBUG_FILES} != "no" cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - --include '*/*/*.debug' \ @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}-dbg.txz +.endif .endfor .endif .else @@ -1372,17 +1376,21 @@ packagekernel: .PHONY tar cvf - --exclude '*.debug' . | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .endif +.if ${MK_DEBUG_FILES} != "no" cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - --include '*/*/*.debug' $$(eval find .) | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz +.endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - --exclude '*.debug' . | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz +.if ${MK_DEBUG_FILES} != "no" cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - --include '*/*/*.debug' $$(eval find .) | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}-dbg.txz +.endif .endfor .endif .endif @@ -1460,7 +1468,10 @@ create-world-packages: _pkgbootstrap .PHONY create-kernel-packages: _pkgbootstrap .PHONY .if exists(${KSTAGEDIR}/kernel.meta) -.for flavor in "" -debug +.if ${MK_DEBUG_FILES} != "no" +_debug=-debug +.endif +.for flavor in "" ${_debug} @cd ${KSTAGEDIR}/${DISTDIR} ; \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${INSTALLKERNEL} \ @@ -1489,7 +1500,10 @@ create-kernel-packages: _pkgbootstrap .PHONY .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} .if exists(${KSTAGEDIR}/kernel.${_kernel}.meta) -.for flavor in "" -debug +.if ${MK_DEBUG_FILES} != "no" +_debug=-debug +.endif +.for flavor in "" ${_debug} @cd ${KSTAGEDIR}/kernel.${_kernel} ; \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${_kernel} \ From owner-svn-src-stable@freebsd.org Tue Nov 14 16:00:22 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80E49DD4B7A; Tue, 14 Nov 2017 16:00: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 mx1.freebsd.org (Postfix) with ESMTPS id 4CD756396F; Tue, 14 Nov 2017 16:00: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 vAEG0L8Q018572; Tue, 14 Nov 2017 16:00:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEG0LLc018571; Tue, 14 Nov 2017 16:00:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141600.vAEG0LLc018571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 16:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325809 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/cam/ctl X-SVN-Commit-Revision: 325809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 16:00:22 -0000 Author: trasz Date: Tue Nov 14 16:00:21 2017 New Revision: 325809 URL: https://svnweb.freebsd.org/changeset/base/325809 Log: MFC r324261: Fix iSCSI target panics on concurrent session teardown and display (eg removing a target and doing "ctladm islist -v" at the same time). Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Tue Nov 14 15:07:34 2017 (r325808) +++ stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Tue Nov 14 16:00:21 2017 (r325809) @@ -1308,18 +1308,17 @@ cfiscsi_session_delete(struct cfiscsi_session *cs) KASSERT(TAILQ_EMPTY(&cs->cs_waiting_for_data_out), ("destroying session with non-empty queue")); + mtx_lock(&softc->lock); + TAILQ_REMOVE(&softc->sessions, cs, cs_next); + mtx_unlock(&softc->lock); + cfiscsi_session_unregister_initiator(cs); if (cs->cs_target != NULL) cfiscsi_target_release(cs->cs_target); icl_conn_close(cs->cs_conn); icl_conn_free(cs->cs_conn); - - mtx_lock(&softc->lock); - TAILQ_REMOVE(&softc->sessions, cs, cs_next); - cv_signal(&softc->sessions_cv); - mtx_unlock(&softc->lock); - free(cs, M_CFISCSI); + cv_signal(&softc->sessions_cv); } static int From owner-svn-src-stable@freebsd.org Tue Nov 14 16:03:10 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D6C3DD4DF2; Tue, 14 Nov 2017 16:03:10 +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 mx1.freebsd.org (Postfix) with ESMTPS id 24E0163D8D; Tue, 14 Nov 2017 16:03:10 +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 vAEG39WL022350; Tue, 14 Nov 2017 16:03:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEG38qt022336; Tue, 14 Nov 2017 16:03:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711141603.vAEG38qt022336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 14 Nov 2017 16:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325810 - in stable/11/sys: arm/arm arm/include arm64/include kern mips/include powerpc/include riscv/include sparc64/include sys x86/include X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/11/sys: arm/arm arm/include arm64/include kern mips/include powerpc/include riscv/include sparc64/include sys x86/include X-SVN-Commit-Revision: 325810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 16:03:10 -0000 Author: jhb Date: Tue Nov 14 16:03:07 2017 New Revision: 325810 URL: https://svnweb.freebsd.org/changeset/base/325810 Log: MFC 323580,323933,323934,324814,324817: Enable AT_HWCAP on arm. I reused the SV_HWCAP stub to cover the sv_hwcap2 field as well. 323580: Add AT_HWCAP flags for VFP settings for FreeBSD/arm. These flags match the meaning and value of flags in Linux, though Linux has many more flags. 323933: Correct HWCAP_VFP3* values to match Linux. 323934: Detect NEON and set HWCAP_NEON if present. 324814: Add AT_HWCAP2 ELF auxiliary vector. - allocate value for new AT_HWCAP2 auxiliary vector on all platforms. - expand 'struct sysentvec' by new 'u_long *sv_hwcap2', in exactly same way as for AT_HWCAP. 324817: Fullify implementation of AT_HWCAP and AT_HWCAP2 for ARMv6,7. This makes elf_aux_info(3) useable for ARM ports. Tested by: mmel Modified: stable/11/sys/arm/arm/cpuinfo.c stable/11/sys/arm/arm/elf_machdep.c stable/11/sys/arm/arm/vfp.c stable/11/sys/arm/include/elf.h stable/11/sys/arm/include/md_var.h stable/11/sys/arm/include/vfp.h stable/11/sys/arm64/include/elf.h stable/11/sys/kern/imgact_elf.c stable/11/sys/mips/include/elf.h stable/11/sys/powerpc/include/elf.h stable/11/sys/riscv/include/elf.h stable/11/sys/sparc64/include/elf.h stable/11/sys/sys/sysent.h stable/11/sys/x86/include/elf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/cpuinfo.c ============================================================================== --- stable/11/sys/arm/arm/cpuinfo.c Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/arm/arm/cpuinfo.c Tue Nov 14 16:03:07 2017 (r325810) @@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include struct cpuinfo cpuinfo = { @@ -47,6 +49,9 @@ struct cpuinfo cpuinfo = void cpuinfo_init(void) { +#if __ARM_ARCH >= 6 + uint32_t tmp; +#endif cpuinfo.midr = cp15_midr_get(); /* Test old version id schemes first */ @@ -150,6 +155,47 @@ cpuinfo_init(void) } cpuinfo.dcache_line_mask = cpuinfo.dcache_line_size - 1; cpuinfo.icache_line_mask = cpuinfo.icache_line_size - 1; + + /* Fill AT_HWCAP bits. */ + elf_hwcap |= HWCAP_HALF | HWCAP_FAST_MULT; /* Requierd for all CPUs */ + elf_hwcap |= HWCAP_TLS | HWCAP_EDSP; /* Requierd for v6+ CPUs */ + + tmp = (cpuinfo.id_isar0 >> 24) & 0xF; /* Divide_instrs */ + if (tmp >= 1) + elf_hwcap |= HWCAP_IDIVT; + if (tmp >= 2) + elf_hwcap |= HWCAP_IDIVA; + + tmp = (cpuinfo.id_pfr0 >> 4) & 0xF; /* State1 */ + if (tmp >= 1) + elf_hwcap |= HWCAP_THUMB; + + tmp = (cpuinfo.id_pfr0 >> 12) & 0xF; /* State3 */ + if (tmp >= 1) + elf_hwcap |= HWCAP_THUMBEE; + + tmp = (cpuinfo.id_mmfr0 >> 0) & 0xF; /* VMSA */ + if (tmp >= 5) + elf_hwcap |= HWCAP_LPAE; + + /* Fill AT_HWCAP2 bits. */ + tmp = (cpuinfo.id_isar5 >> 4) & 0xF; /* AES */ + if (tmp >= 1) + elf_hwcap2 |= HWCAP2_AES; + if (tmp >= 2) + elf_hwcap2 |= HWCAP2_PMULL; + + tmp = (cpuinfo.id_isar5 >> 8) & 0xF; /* SHA1 */ + if (tmp >= 1) + elf_hwcap2 |= HWCAP2_SHA1; + + tmp = (cpuinfo.id_isar5 >> 12) & 0xF; /* SHA2 */ + if (tmp >= 1) + elf_hwcap2 |= HWCAP2_SHA2; + + tmp = (cpuinfo.id_isar5 >> 16) & 0xF; /* CRC32 */ + if (tmp >= 1) + elf_hwcap2 |= HWCAP2_CRC32; #endif } Modified: stable/11/sys/arm/arm/elf_machdep.c ============================================================================== --- stable/11/sys/arm/arm/elf_machdep.c Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/arm/arm/elf_machdep.c Tue Nov 14 16:03:07 2017 (r325810) @@ -48,6 +48,9 @@ __FBSDID("$FreeBSD$"); static boolean_t elf32_arm_abi_supported(struct image_params *); +u_long elf_hwcap; +u_long elf_hwcap2; + struct sysentvec elf32_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, @@ -77,7 +80,7 @@ struct sysentvec elf32_freebsd_sysvec = { #if __ARM_ARCH >= 6 SV_SHP | SV_TIMEKEEP | #endif - SV_ABI_FREEBSD | SV_ILP32, + SV_ABI_FREEBSD | SV_ILP32 | SV_HWCAP, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, @@ -86,6 +89,8 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_schedtail = NULL, .sv_thread_detach = NULL, .sv_trap = NULL, + .sv_hwcap = &elf_hwcap, + .sv_hwcap2 = &elf_hwcap2, }; INIT_SYSENTVEC(elf32_sysvec, &elf32_freebsd_sysvec); Modified: stable/11/sys/arm/arm/vfp.c ============================================================================== --- stable/11/sys/arm/arm/vfp.c Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/arm/arm/vfp.c Tue Nov 14 16:03:07 2017 (r325810) @@ -33,9 +33,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -115,6 +117,7 @@ vfp_init(void) vfp_exists = 1; is_d32 = 0; PCPU_SET(vfpsid, fpsid); /* save the fpsid */ + elf_hwcap |= HWCAP_VFP; vfp_arch = (fpsid & VFPSID_SUBVERSION2_MASK) >> VFPSID_SUBVERSION_OFF; @@ -122,9 +125,13 @@ vfp_init(void) if (vfp_arch >= VFP_ARCH3) { tmp = fmrx(mvfr0); PCPU_SET(vfpmvfr0, tmp); + elf_hwcap |= HWCAP_VFPv3; - if ((tmp & VMVFR0_RB_MASK) == 2) + if ((tmp & VMVFR0_RB_MASK) == 2) { + elf_hwcap |= HWCAP_VFPD32; is_d32 = 1; + } else + elf_hwcap |= HWCAP_VFPv3D16; tmp = fmrx(mvfr1); PCPU_SET(vfpmvfr1, tmp); @@ -137,6 +144,13 @@ vfp_init(void) initial_fpscr; } } + + if ((tmp & VMVFR1_LS_MASK) >> VMVFR1_LS_OFF == 1 && + (tmp & VMVFR1_I_MASK) >> VMVFR1_I_OFF == 1 && + (tmp & VMVFR1_SP_MASK) >> VMVFR1_SP_OFF == 1) + elf_hwcap |= HWCAP_NEON; + if ((tmp & VMVFR1_FMAC_MASK) >> VMVFR1_FMAC_OFF == 1) + elf_hwcap |= HWCAP_VFPv4; } /* initialize the coprocess 10 and 11 calls Modified: stable/11/sys/arm/include/elf.h ============================================================================== --- stable/11/sys/arm/include/elf.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/arm/include/elf.h Tue Nov 14 16:03:07 2017 (r325810) @@ -86,8 +86,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ #define R_ARM_COUNT 33 /* Count of defined relocation types. */ @@ -114,5 +115,38 @@ __ElfType(Auxinfo); #define MAGIC_TRAMP_NUMBER 0x5c000003 #define ET_DYN_LOAD_ADDR 0x12000 + +/* Flags passed in AT_HWCAP. */ +#define HWCAP_SWP 0x00000001 /* Unsupported, never set. */ +#define HWCAP_HALF 0x00000002 /* Always set. */ +#define HWCAP_THUMB 0x00000004 +#define HWCAP_26BIT 0x00000008 /* Unsupported, never set. */ +#define HWCAP_FAST_MULT 0x00000010 /* Always set. */ +#define HWCAP_FPA 0x00000020 /* Unsupported, never set. */ +#define HWCAP_VFP 0x00000040 +#define HWCAP_EDSP 0x00000080 /* Always set for ARMv6+. */ +#define HWCAP_JAVA 0x00000100 /* Unsupported, never set. */ +#define HWCAP_IWMMXT 0x00000200 /* Unsupported, never set. */ +#define HWCAP_CRUNCH 0x00000400 /* Unsupported, never set. */ +#define HWCAP_THUMBEE 0x00000800 +#define HWCAP_NEON 0x00001000 +#define HWCAP_VFPv3 0x00002000 +#define HWCAP_VFPv3D16 0x00004000 +#define HWCAP_TLS 0x00008000 /* Always set for ARMv6+. */ +#define HWCAP_VFPv4 0x00010000 +#define HWCAP_IDIVA 0x00020000 +#define HWCAP_IDIVT 0x00040000 +#define HWCAP_VFPD32 0x00080000 +#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) +#define HWCAP_LPAE 0x00100000 +#define HWCAP_EVTSTRM 0x00200000 /* Not implemented yet. */ + + +/* Flags passed in AT_HWCAP2. */ +#define HWCAP2_AES 0x00000001 +#define HWCAP2_PMULL 0x00000002 +#define HWCAP2_SHA1 0x00000004 +#define HWCAP2_SHA2 0x00000008 +#define HWCAP2_CRC32 0x00000010 #endif /* !_MACHINE_ELF_H_ */ Modified: stable/11/sys/arm/include/md_var.h ============================================================================== --- stable/11/sys/arm/include/md_var.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/arm/include/md_var.h Tue Nov 14 16:03:07 2017 (r325810) @@ -38,6 +38,8 @@ extern char sigcode[]; extern int szsigcode; extern uint32_t *vm_page_dump; extern int vm_page_dump_size; +extern u_long elf_hwcap; +extern u_long elf_hwcap2; extern int (*_arm_memcpy)(void *, void *, int, int); extern int (*_arm_bzero)(void *, int, int); Modified: stable/11/sys/arm/include/vfp.h ============================================================================== --- stable/11/sys/arm/include/vfp.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/arm/include/vfp.h Tue Nov 14 16:03:07 2017 (r325810) @@ -119,6 +119,12 @@ #define VMVFR0_RB_MASK (0x0000000f) /* VFP 64 bit media support */ /* VMVFR1 */ +#define VMVFR1_FMAC_OFF 28 +#define VMVFR1_FMAC_MASK (0xf0000000) /* Neon FMAC support */ +#define VMVFR1_VFP_HP_OFF 24 +#define VMVFR1_VFP_HP_MASK (0x0f000000) /* VFP half prec support */ +#define VMVFR1_HP_OFF 20 +#define VMVFR1_HP_MASK (0x00f00000) /* Neon half prec support */ #define VMVFR1_SP_OFF 16 #define VMVFR1_SP_MASK (0x000f0000) /* Neon single prec support */ #define VMVFR1_I_OFF 12 Modified: stable/11/sys/arm64/include/elf.h ============================================================================== --- stable/11/sys/arm64/include/elf.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/arm64/include/elf.h Tue Nov 14 16:03:07 2017 (r325810) @@ -92,8 +92,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #define ELF_TARG_CLASS ELFCLASS64 Modified: stable/11/sys/kern/imgact_elf.c ============================================================================== --- stable/11/sys/kern/imgact_elf.c Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/kern/imgact_elf.c Tue Nov 14 16:03:07 2017 (r325810) @@ -1133,9 +1133,12 @@ __elfN(freebsd_fixup)(register_t **stack_base, struct AUXARGS_ENTRY(pos, AT_STACKPROT, imgp->sysent->sv_shared_page_obj != NULL && imgp->stack_prot != 0 ? imgp->stack_prot : imgp->sysent->sv_stackprot); - if ((imgp->sysent->sv_flags & SV_HWCAP) != 0 && - imgp->sysent->sv_hwcap != NULL) - AUXARGS_ENTRY(pos, AT_HWCAP, *imgp->sysent->sv_hwcap); + if ((imgp->sysent->sv_flags & SV_HWCAP) != 0) { + if (imgp->sysent->sv_hwcap != NULL) + AUXARGS_ENTRY(pos, AT_HWCAP, *imgp->sysent->sv_hwcap); + if (imgp->sysent->sv_hwcap2 != NULL) + AUXARGS_ENTRY(pos, AT_HWCAP2, *imgp->sysent->sv_hwcap2); + } AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); Modified: stable/11/sys/mips/include/elf.h ============================================================================== --- stable/11/sys/mips/include/elf.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/mips/include/elf.h Tue Nov 14 16:03:07 2017 (r325810) @@ -146,8 +146,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ #define ET_DYN_LOAD_ADDR 0x0120000 Modified: stable/11/sys/powerpc/include/elf.h ============================================================================== --- stable/11/sys/powerpc/include/elf.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/powerpc/include/elf.h Tue Nov 14 16:03:07 2017 (r325810) @@ -109,8 +109,9 @@ __ElfType(Auxinfo); #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* * Relocation types. Modified: stable/11/sys/riscv/include/elf.h ============================================================================== --- stable/11/sys/riscv/include/elf.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/riscv/include/elf.h Tue Nov 14 16:03:07 2017 (r325810) @@ -92,8 +92,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #define ELF_TARG_CLASS ELFCLASS64 Modified: stable/11/sys/sparc64/include/elf.h ============================================================================== --- stable/11/sys/sparc64/include/elf.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/sparc64/include/elf.h Tue Nov 14 16:03:07 2017 (r325810) @@ -94,8 +94,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #if __ELF_WORD_SIZE == 32 Modified: stable/11/sys/sys/sysent.h ============================================================================== --- stable/11/sys/sys/sysent.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/sys/sysent.h Tue Nov 14 16:03:07 2017 (r325810) @@ -130,6 +130,7 @@ struct sysentvec { void (*sv_thread_detach)(struct thread *); int (*sv_trap)(struct thread *); u_long *sv_hwcap; /* Value passed in AT_HWCAP. */ + u_long *sv_hwcap2; /* Value passed in AT_HWCAP2. */ }; #define SV_ILP32 0x000100 /* 32-bit executable. */ Modified: stable/11/sys/x86/include/elf.h ============================================================================== --- stable/11/sys/x86/include/elf.h Tue Nov 14 16:00:21 2017 (r325809) +++ stable/11/sys/x86/include/elf.h Tue Nov 14 16:03:07 2017 (r325810) @@ -102,8 +102,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* * Relocation types. @@ -189,8 +190,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* * Relocation types. From owner-svn-src-stable@freebsd.org Tue Nov 14 17:03:57 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0E06DD7803; Tue, 14 Nov 2017 17:03:57 +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 mx1.freebsd.org (Postfix) with ESMTPS id A7303660DF; Tue, 14 Nov 2017 17:03:57 +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 vAEH3uq2047975; Tue, 14 Nov 2017 17:03:56 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEH3umV047971; Tue, 14 Nov 2017 17:03:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141703.vAEH3umV047971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 17:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325814 - in stable/11: etc/root share/skel X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/11: etc/root share/skel X-SVN-Commit-Revision: 325814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 17:03:57 -0000 Author: trasz Date: Tue Nov 14 17:03:56 2017 New Revision: 325814 URL: https://svnweb.freebsd.org/changeset/base/325814 Log: MFC r320672: Run "resizewin -z" from the default shell profile files. This makes the terminal work properly out of the box when logging over a serial line, which is quite important for the user experience on boards like Raspberry Pi. It doesn't affect cases where the terminal size is already non-zero, such as SSH or vt(4) sessions. Note that this doesn't handle a scenario pointed out by rgrimes@: when the terminal is resized after login, the terminal size won't get updated even after logging out and back in. Modified: stable/11/etc/root/dot.login stable/11/etc/root/dot.profile stable/11/share/skel/dot.login stable/11/share/skel/dot.profile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/root/dot.login ============================================================================== --- stable/11/etc/root/dot.login Tue Nov 14 16:47:05 2017 (r325813) +++ stable/11/etc/root/dot.login Tue Nov 14 17:03:56 2017 (r325814) @@ -5,5 +5,8 @@ # see also csh(1), environ(7). # +# Query terminal size; useful for serial lines. +if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z + # Uncomment to display a random cookie each login: # if ( -x /usr/bin/fortune ) /usr/bin/fortune -s Modified: stable/11/etc/root/dot.profile ============================================================================== --- stable/11/etc/root/dot.profile Tue Nov 14 16:47:05 2017 (r325813) +++ stable/11/etc/root/dot.profile Tue Nov 14 17:03:56 2017 (r325814) @@ -8,3 +8,5 @@ TERM=${TERM:-xterm} export TERM PAGER=more export PAGER + +if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi Modified: stable/11/share/skel/dot.login ============================================================================== --- stable/11/share/skel/dot.login Tue Nov 14 16:47:05 2017 (r325813) +++ stable/11/share/skel/dot.login Tue Nov 14 17:03:56 2017 (r325814) @@ -5,4 +5,5 @@ # see also csh(1), environ(7). # +if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z if ( -x /usr/bin/fortune ) /usr/bin/fortune freebsd-tips Modified: stable/11/share/skel/dot.profile ============================================================================== --- stable/11/share/skel/dot.profile Tue Nov 14 16:47:05 2017 (r325813) +++ stable/11/share/skel/dot.profile Tue Nov 14 17:03:56 2017 (r325814) @@ -21,4 +21,7 @@ PAGER=more; export PAGER # set ENV to a file invoked each time sh is started for interactive use. ENV=$HOME/.shrc; export ENV +# Query terminal size; useful for serial lines. +if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi + if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi From owner-svn-src-stable@freebsd.org Tue Nov 14 17:05:36 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74046DD7994; Tue, 14 Nov 2017 17:05:36 +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 mx1.freebsd.org (Postfix) with ESMTPS id 4B5E7662F9; Tue, 14 Nov 2017 17:05:36 +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 vAEH5ZAI048104; Tue, 14 Nov 2017 17:05:35 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEH5ZEj048100; Tue, 14 Nov 2017 17:05:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141705.vAEH5ZEj048100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 17:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325815 - in stable/11: etc/root share/skel X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/11: etc/root share/skel X-SVN-Commit-Revision: 325815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 17:05:36 -0000 Author: trasz Date: Tue Nov 14 17:05:34 2017 New Revision: 325815 URL: https://svnweb.freebsd.org/changeset/base/325815 Log: MFC r320672: Cosmetic tweaks to the default shell rc files, mostly comments. MFC r320678: Fix typo introduced in r320672 - check for existence of the right file. Modified: stable/11/etc/root/dot.login stable/11/etc/root/dot.profile stable/11/share/skel/dot.login stable/11/share/skel/dot.profile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/root/dot.login ============================================================================== --- stable/11/etc/root/dot.login Tue Nov 14 17:03:56 2017 (r325814) +++ stable/11/etc/root/dot.login Tue Nov 14 17:05:34 2017 (r325815) @@ -2,11 +2,11 @@ # # .login - csh login script, read by login shell, after `.cshrc' at login. # -# see also csh(1), environ(7). +# See also csh(1), environ(7). # # Query terminal size; useful for serial lines. if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z -# Uncomment to display a random cookie each login: +# Uncomment to display a random cookie on each login. # if ( -x /usr/bin/fortune ) /usr/bin/fortune -s Modified: stable/11/etc/root/dot.profile ============================================================================== --- stable/11/etc/root/dot.profile Tue Nov 14 17:03:56 2017 (r325814) +++ stable/11/etc/root/dot.profile Tue Nov 14 17:05:34 2017 (r325815) @@ -9,4 +9,8 @@ export TERM PAGER=more export PAGER +# Query terminal size; useful for serial lines. if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi + +# Uncomment to display a random cookie on each login. +# if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune -s ; fi Modified: stable/11/share/skel/dot.login ============================================================================== --- stable/11/share/skel/dot.login Tue Nov 14 17:03:56 2017 (r325814) +++ stable/11/share/skel/dot.login Tue Nov 14 17:05:34 2017 (r325815) @@ -2,8 +2,11 @@ # # .login - csh login script, read by login shell, after `.cshrc' at login. # -# see also csh(1), environ(7). +# See also csh(1), environ(7). # +# Query terminal size; useful for serial lines. if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z + +# Display a random cookie on each login. if ( -x /usr/bin/fortune ) /usr/bin/fortune freebsd-tips Modified: stable/11/share/skel/dot.profile ============================================================================== --- stable/11/share/skel/dot.profile Tue Nov 14 17:03:56 2017 (r325814) +++ stable/11/share/skel/dot.profile Tue Nov 14 17:05:34 2017 (r325815) @@ -24,4 +24,5 @@ ENV=$HOME/.shrc; export ENV # Query terminal size; useful for serial lines. if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi +# Display a random cookie on each login. if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi From owner-svn-src-stable@freebsd.org Tue Nov 14 17:54:01 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6823DD947A; Tue, 14 Nov 2017 17:54:01 +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 mx1.freebsd.org (Postfix) with ESMTPS id A8B886838B; Tue, 14 Nov 2017 17:54:01 +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 vAEHs0gI068691; Tue, 14 Nov 2017 17:54:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEHs0PJ068690; Tue, 14 Nov 2017 17:54:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141754.vAEHs0PJ068690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 17:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325818 - stable/11/sys/geom X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/geom X-SVN-Commit-Revision: 325818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 17:54:02 -0000 Author: trasz Date: Tue Nov 14 17:54:00 2017 New Revision: 325818 URL: https://svnweb.freebsd.org/changeset/base/325818 Log: MFC r324199: Clear G_CF_ORPHAN when attaching. This fixes cases where the same GEOM consumer can be orphaned, and then reattach to another provider. From a user point of view, this makes gmountver(4) work again. Modified: stable/11/sys/geom/geom_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/geom_subr.c ============================================================================== --- stable/11/sys/geom/geom_subr.c Tue Nov 14 17:46:37 2017 (r325817) +++ stable/11/sys/geom/geom_subr.c Tue Nov 14 17:54:00 2017 (r325818) @@ -816,6 +816,7 @@ g_attach(struct g_consumer *cp, struct g_provider *pp) g_trace(G_T_TOPOLOGY, "g_attach(%p, %p)", cp, pp); KASSERT(cp->provider == NULL, ("attach but attached")); cp->provider = pp; + cp->flags &= ~G_CF_ORPHAN; LIST_INSERT_HEAD(&pp->consumers, cp, consumers); error = redo_rank(cp->geom); if (error) { From owner-svn-src-stable@freebsd.org Tue Nov 14 17:56:33 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE0B5DD955E; Tue, 14 Nov 2017 17:56:33 +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 mx1.freebsd.org (Postfix) with ESMTPS id 8A688684DF; Tue, 14 Nov 2017 17:56:33 +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 vAEHuWFm068877; Tue, 14 Nov 2017 17:56:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEHuWe0068875; Tue, 14 Nov 2017 17:56:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141756.vAEHuWe0068875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 17:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325819 - stable/11/sys/geom/mountver X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/geom/mountver X-SVN-Commit-Revision: 325819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 17:56:33 -0000 Author: trasz Date: Tue Nov 14 17:56:32 2017 New Revision: 325819 URL: https://svnweb.freebsd.org/changeset/base/325819 Log: MFC r324276: Don't destroy gmountver(8) devices on shutdown, unless they are orphaned. Otherwise we would fail to sync the filesystem on reboot. Modified: stable/11/sys/geom/mountver/g_mountver.c stable/11/sys/geom/mountver/g_mountver.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/mountver/g_mountver.c ============================================================================== --- stable/11/sys/geom/mountver/g_mountver.c Tue Nov 14 17:54:00 2017 (r325818) +++ stable/11/sys/geom/mountver/g_mountver.c Tue Nov 14 17:56:32 2017 (r325819) @@ -190,6 +190,11 @@ g_mountver_start(struct bio *bp) * requests in order to maintain ordering. */ if (sc->sc_orphaned || !TAILQ_EMPTY(&sc->sc_queue)) { + if (sc->sc_shutting_down) { + G_MOUNTVER_LOGREQ(bp, "Discarding request due to shutdown."); + g_io_deliver(bp, ENXIO); + return; + } G_MOUNTVER_LOGREQ(bp, "Queueing request."); g_mountver_queue(bp); if (!sc->sc_orphaned) @@ -607,13 +612,20 @@ g_mountver_dumpconf(struct sbuf *sb, const char *inden static void g_mountver_shutdown_pre_sync(void *arg, int howto) { + struct g_mountver_softc *sc; struct g_class *mp; struct g_geom *gp, *gp2; mp = arg; g_topology_lock(); - LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) - g_mountver_destroy(gp, 1); + LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { + if (gp->softc == NULL) + continue; + sc = gp->softc; + sc->sc_shutting_down = 1; + if (sc->sc_orphaned) + g_mountver_destroy(gp, 1); + } g_topology_unlock(); } Modified: stable/11/sys/geom/mountver/g_mountver.h ============================================================================== --- stable/11/sys/geom/mountver/g_mountver.h Tue Nov 14 17:54:00 2017 (r325818) +++ stable/11/sys/geom/mountver/g_mountver.h Tue Nov 14 17:56:32 2017 (r325819) @@ -62,6 +62,7 @@ struct g_mountver_softc { char *sc_provider_name; char sc_ident[DISK_IDENT_SIZE]; int sc_orphaned; + int sc_shutting_down; int sc_access_r; int sc_access_w; int sc_access_e; From owner-svn-src-stable@freebsd.org Tue Nov 14 17:57:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC54FDD95FB; Tue, 14 Nov 2017 17:57:49 +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 mx1.freebsd.org (Postfix) with ESMTPS id 9945D6864D; Tue, 14 Nov 2017 17:57:49 +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 vAEHvmkK068979; Tue, 14 Nov 2017 17:57:48 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEHvmah068978; Tue, 14 Nov 2017 17:57:48 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141757.vAEHvmah068978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 17:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325820 - stable/11/bin/ps X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/bin/ps X-SVN-Commit-Revision: 325820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 17:57:49 -0000 Author: trasz Date: Tue Nov 14 17:57:48 2017 New Revision: 325820 URL: https://svnweb.freebsd.org/changeset/base/325820 Log: MFC r324367: Fix kvm_getprocs(3) error reporting in ps(1). Previously it just didn't work at all - kvm_getprocs(3) doesn't update the &nentries when it returns NULL. The end result was that ps(1) showed garbage data instead of reporting kinfo_proc size mismatch. Modified: stable/11/bin/ps/ps.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ps/ps.c ============================================================================== --- stable/11/bin/ps/ps.c Tue Nov 14 17:56:32 2017 (r325819) +++ stable/11/bin/ps/ps.c Tue Nov 14 17:57:48 2017 (r325820) @@ -521,7 +521,11 @@ main(int argc, char *argv[]) */ nentries = -1; kp = kvm_getprocs(kd, what, flag, &nentries); - if ((kp == NULL && nentries > 0) || (kp != NULL && nentries < 0)) + /* + * Ignore ESRCH to preserve behaviour of "ps -p nonexistent-pid" + * not reporting an error. + */ + if ((kp == NULL && errno != ESRCH) || (kp != NULL && nentries < 0)) xo_errx(1, "%s", kvm_geterr(kd)); nkept = 0; if (nentries > 0) { From owner-svn-src-stable@freebsd.org Tue Nov 14 18:01:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF7C4DD9860; Tue, 14 Nov 2017 18:01:49 +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 mx1.freebsd.org (Postfix) with ESMTPS id AB2DB689DE; Tue, 14 Nov 2017 18:01:49 +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 vAEI1mOW071533; Tue, 14 Nov 2017 18:01:48 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEI1mo3071531; Tue, 14 Nov 2017 18:01:48 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141801.vAEI1mo3071531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 18:01:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325821 - stable/11/bin/ps X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/bin/ps X-SVN-Commit-Revision: 325821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 18:01:50 -0000 Author: trasz Date: Tue Nov 14 18:01:48 2017 New Revision: 325821 URL: https://svnweb.freebsd.org/changeset/base/325821 Log: MFC r324427: Document "tdnam" keyword to ps(1), and add "tdname" alias. MFC r324429: Fix long name (used by libxo) for the "tdnam" ps(1) keyword. MFC r324430: Undocument "tdnam" (leaving it as an alias), and rename the column to TDNAME. Modified: stable/11/bin/ps/keyword.c stable/11/bin/ps/ps.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ps/keyword.c ============================================================================== --- stable/11/bin/ps/keyword.c Tue Nov 14 17:57:48 2017 (r325820) +++ stable/11/bin/ps/keyword.c Tue Nov 14 18:01:48 2017 (r325821) @@ -199,7 +199,8 @@ static VAR var[] = { {"tdaddr", "TDADDR", NULL, "thread-address", 0, kvar, KOFF(ki_tdaddr), KPTR, "lx", 0}, {"tdev", "TDEV", NULL, "terminal-device", 0, tdev, 0, CHAR, NULL, 0}, - {"tdnam", "TDNAM", NULL, "terminal-device-name", LJUST, tdnam, 0, CHAR, + {"tdnam", "", "tdname", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"tdname", "TDNAME", NULL, "thread-name", LJUST, tdnam, 0, CHAR, NULL, 0}, {"time", "TIME", NULL, "cpu-time", USER, cputime, 0, CHAR, NULL, 0}, {"tpgid", "TPGID", NULL, "terminal-process-gid", 0, kvar, Modified: stable/11/bin/ps/ps.1 ============================================================================== --- stable/11/bin/ps/ps.1 Tue Nov 14 17:57:48 2017 (r325820) +++ stable/11/bin/ps/ps.1 Tue Nov 14 18:01:48 2017 (r325821) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd September 7, 2017 +.Dd October 9, 2017 .Dt PS 1 .Os .Sh NAME @@ -675,6 +675,8 @@ saved UID from a setuid executable accumulated system CPU time .It Cm tdaddr thread address +.It Cm tdname +thread name .It Cm tdev control terminal device number .It Cm time From owner-svn-src-stable@freebsd.org Tue Nov 14 18:07:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C389DD9A66; Tue, 14 Nov 2017 18:07:52 +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 mx1.freebsd.org (Postfix) with ESMTPS id 760B969099; Tue, 14 Nov 2017 18:07:52 +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 vAEI7pUj073649; Tue, 14 Nov 2017 18:07:51 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEI7pgm073646; Tue, 14 Nov 2017 18:07:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141807.vAEI7pgm073646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 18:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325822 - in stable/11: lib/libc/gen sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/11: lib/libc/gen sys/vm X-SVN-Commit-Revision: 325822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 18:07:52 -0000 Author: trasz Date: Tue Nov 14 18:07:51 2017 New Revision: 325822 URL: https://svnweb.freebsd.org/changeset/base/325822 Log: MFC r324857: Add OID for the vm.overcommit sysctl. This makes it possible to remove one call to sysctl(2) from jemalloc startup code. (That also requires changes to jemalloc, but I plan to push those to upstream first.) Modified: stable/11/lib/libc/gen/sysctl.3 stable/11/sys/vm/swap_pager.c stable/11/sys/vm/vm_param.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/sysctl.3 ============================================================================== --- stable/11/lib/libc/gen/sysctl.3 Tue Nov 14 18:01:48 2017 (r325821) +++ stable/11/lib/libc/gen/sysctl.3 Tue Nov 14 18:07:51 2017 (r325822) @@ -28,7 +28,7 @@ .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd September 10, 2015 +.Dd October 22, 2017 .Dt SYSCTL 3 .Os .Sh NAME @@ -741,6 +741,7 @@ privilege may change the value. .It Dv VM_V_FREE_TARGET Ta integer Ta yes .It Dv VM_V_INACTIVE_TARGET Ta integer Ta yes .It Dv VM_V_PAGEOUT_FREE_MIN Ta integer Ta yes +.It Dv VM_OVERCOMMIT Ta integer Ta yes .El .Bl -tag -width 6n .It Li VM_LOADAVG @@ -773,6 +774,9 @@ process address space when needed. .It Li VM_V_PAGEOUT_FREE_MIN If the amount of free and cache memory falls below this value, the pageout daemon will enter "memory conserving mode" to avoid deadlock. +.It Li VM_OVERCOMMIT +Overcommit behaviour, as described in +.Xr tuning 7 . .El .Sh RETURN VALUES .Rv -std Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Tue Nov 14 18:01:48 2017 (r325821) +++ stable/11/sys/vm/swap_pager.c Tue Nov 14 18:07:51 2017 (r325822) @@ -156,7 +156,7 @@ static vm_ooffset_t swap_reserved; SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, "Amount of swap storage needed to back all allocated anonymous memory."); static int overcommit = 0; -SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, +SYSCTL_INT(_vm, VM_OVERCOMMIT, overcommit, CTLFLAG_RW, &overcommit, 0, "Configure virtual memory overcommit behavior. See tuning(7) " "for details."); static unsigned long swzone; Modified: stable/11/sys/vm/vm_param.h ============================================================================== --- stable/11/sys/vm/vm_param.h Tue Nov 14 18:01:48 2017 (r325821) +++ stable/11/sys/vm/vm_param.h Tue Nov 14 18:07:51 2017 (r325822) @@ -84,7 +84,8 @@ #define VM_V_PAGEOUT_FREE_MIN 9 /* vm_cnt.v_pageout_free_min */ #define VM_OBSOLETE_10 10 /* pageout algorithm */ #define VM_SWAPPING_ENABLED 11 /* swapping enabled */ -#define VM_MAXID 12 /* number of valid vm ids */ +#define VM_OVERCOMMIT 12 /* vm.overcommit */ +#define VM_MAXID 13 /* number of valid vm ids */ /* * Structure for swap device statistics From owner-svn-src-stable@freebsd.org Tue Nov 14 18:13:31 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACDF0DD9F3D; Tue, 14 Nov 2017 18:13:31 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7919A69796; Tue, 14 Nov 2017 18:13:31 +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 vAEIDUPj077894; Tue, 14 Nov 2017 18:13:30 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEIDUfd077893; Tue, 14 Nov 2017 18:13:30 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141813.vAEIDUfd077893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 18:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325823 - stable/11/sys/geom/mountver X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/geom/mountver X-SVN-Commit-Revision: 325823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 18:13:31 -0000 Author: trasz Date: Tue Nov 14 18:13:30 2017 New Revision: 325823 URL: https://svnweb.freebsd.org/changeset/base/325823 Log: MFC r213931: Make gmountver(8) use G_PF_ACCEPT_UNMAPPED. Modified: stable/11/sys/geom/mountver/g_mountver.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/mountver/g_mountver.c ============================================================================== --- stable/11/sys/geom/mountver/g_mountver.c Tue Nov 14 18:07:51 2017 (r325822) +++ stable/11/sys/geom/mountver/g_mountver.c Tue Nov 14 18:13:30 2017 (r325823) @@ -271,6 +271,14 @@ g_mountver_create(struct gctl_req *req, struct g_class newpp->mediasize = pp->mediasize; newpp->sectorsize = pp->sectorsize; + if ((pp->flags & G_PF_ACCEPT_UNMAPPED) != 0) { + G_MOUNTVER_DEBUG(0, "Unmapped supported for %s.", gp->name); + newpp->flags |= G_PF_ACCEPT_UNMAPPED; + } else { + G_MOUNTVER_DEBUG(0, "Unmapped unsupported for %s.", gp->name); + newpp->flags &= ~G_PF_ACCEPT_UNMAPPED; + } + cp = g_new_consumer(gp); error = g_attach(cp, pp); if (error != 0) { From owner-svn-src-stable@freebsd.org Tue Nov 14 18:17:24 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F5EADD9FFE; Tue, 14 Nov 2017 18:17:24 +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 mx1.freebsd.org (Postfix) with ESMTPS id 6BAE76991D; Tue, 14 Nov 2017 18:17:24 +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 vAEIHNQA078109; Tue, 14 Nov 2017 18:17:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEIHNPb078108; Tue, 14 Nov 2017 18:17:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711141817.vAEIHNPb078108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 Nov 2017 18:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325824 - stable/11/sys/geom/mountver X-SVN-Group: stable-11 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/11/sys/geom/mountver X-SVN-Commit-Revision: 325824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 18:17:24 -0000 Author: trasz Date: Tue Nov 14 18:17:23 2017 New Revision: 325824 URL: https://svnweb.freebsd.org/changeset/base/325824 Log: MFC r325009: Make gmountver(8) use direct dispatch. MFC r325101: Add back missing MTX_DEF, it still needs to be there. (Although it's defined to be 0, so there's no functional change.) Modified: stable/11/sys/geom/mountver/g_mountver.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/mountver/g_mountver.c ============================================================================== --- stable/11/sys/geom/mountver/g_mountver.c Tue Nov 14 18:13:30 2017 (r325823) +++ stable/11/sys/geom/mountver/g_mountver.c Tue Nov 14 18:17:23 2017 (r325824) @@ -257,7 +257,7 @@ g_mountver_create(struct gctl_req *req, struct g_class } gp = g_new_geomf(mp, "%s", name); sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); - mtx_init(&sc->sc_mtx, "gmountver", NULL, MTX_DEF); + mtx_init(&sc->sc_mtx, "gmountver", NULL, MTX_DEF | MTX_RECURSE); TAILQ_INIT(&sc->sc_queue); sc->sc_provider_name = strdup(pp->name, M_GEOM); gp->softc = sc; @@ -270,6 +270,7 @@ g_mountver_create(struct gctl_req *req, struct g_class newpp = g_new_providerf(gp, "%s", gp->name); newpp->mediasize = pp->mediasize; newpp->sectorsize = pp->sectorsize; + newpp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; if ((pp->flags & G_PF_ACCEPT_UNMAPPED) != 0) { G_MOUNTVER_DEBUG(0, "Unmapped supported for %s.", gp->name); @@ -280,6 +281,7 @@ g_mountver_create(struct gctl_req *req, struct g_class } cp = g_new_consumer(gp); + cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; error = g_attach(cp, pp); if (error != 0) { gctl_error(req, "Cannot attach to provider %s.", pp->name); From owner-svn-src-stable@freebsd.org Tue Nov 14 22:18:15 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AD81DDF635; Tue, 14 Nov 2017 22:18:15 +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 mx1.freebsd.org (Postfix) with ESMTPS id 07D9671D42; Tue, 14 Nov 2017 22:18: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 vAEMIEHS082374; Tue, 14 Nov 2017 22:18:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEMIDmt082367; Tue, 14 Nov 2017 22:18:13 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711142218.vAEMIDmt082367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 14 Nov 2017 22:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325831 - in stable/11: lib/libc/sys sys/arm/arm sys/arm/include sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/11: lib/libc/sys sys/arm/arm sys/arm/include sys/conf X-SVN-Commit-Revision: 325831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 22:18:15 -0000 Author: jhb Date: Tue Nov 14 22:18:13 2017 New Revision: 325831 URL: https://svnweb.freebsd.org/changeset/base/325831 Log: MFC 323581,323582,323583: Add ptrace operations for VFP registers. 323581: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext. Future changes will use these functions to fetch and store VFP state for threads other than curthread. 323582: Add ptrace operations to fetch and store VFP registers. 323583: Export get/set_vfpcontext from machdep.c. Should have been part of the previous commit to add ptrace operations for VFP registers. Added: stable/11/sys/arm/arm/ptrace_machdep.c - copied unchanged from r323582, head/sys/arm/arm/ptrace_machdep.c Modified: stable/11/lib/libc/sys/ptrace.2 stable/11/sys/arm/arm/machdep.c stable/11/sys/arm/include/ptrace.h stable/11/sys/arm/include/vfp.h stable/11/sys/conf/files.arm Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/ptrace.2 ============================================================================== --- stable/11/lib/libc/sys/ptrace.2 Tue Nov 14 22:17:02 2017 (r325830) +++ stable/11/lib/libc/sys/ptrace.2 Tue Nov 14 22:18:13 2017 (r325831) @@ -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 June 11, 2017 +.Dd September 14, 2017 .Dt PTRACE 2 .Os .Sh NAME @@ -762,6 +762,28 @@ The .Fa data argument is ignored. .El +.Sh ARM MACHINE-SPECIFIC REQUESTS +.Bl -tag -width "Dv PT_SETVFPREGS" +.It Dv PT_GETVFPREGS +Return the thread's +.Dv VFP +machine state in the buffer pointed to by +.Fa addr . +.Pp +The +.Fa data +argument is ignored. +.It Dv PT_SETVFPREGS +Set the thread's +.Dv VFP +machine state from the buffer pointed to by +.Fa addr . +.Pp +The +.Fa data +argument is ignored. +.El +.Pp .Sh x86 MACHINE-SPECIFIC REQUESTS .Bl -tag -width "Dv PT_GETXSTATE_INFO" .It Dv PT_GETXMMREGS Modified: stable/11/sys/arm/arm/machdep.c ============================================================================== --- stable/11/sys/arm/arm/machdep.c Tue Nov 14 22:17:02 2017 (r325830) +++ stable/11/sys/arm/arm/machdep.c Tue Nov 14 22:18:13 2017 (r325831) @@ -394,39 +394,41 @@ exec_setregs(struct thread *td, struct image_params *i /* * Get machine VFP context. */ -static void +void get_vfpcontext(struct thread *td, mcontext_vfp_t *vfp) { - struct pcb *curpcb; + struct pcb *pcb; - curpcb = curthread->td_pcb; - critical_enter(); - - vfp_store(&curpcb->pcb_vfpstate, false); - memcpy(vfp->mcv_reg, curpcb->pcb_vfpstate.reg, + pcb = td->td_pcb; + if (td == curthread) { + critical_enter(); + vfp_store(&pcb->pcb_vfpstate, false); + critical_exit(); + } else + MPASS(TD_IS_SUSPENDED(td)); + memcpy(vfp->mcv_reg, pcb->pcb_vfpstate.reg, sizeof(vfp->mcv_reg)); - vfp->mcv_fpscr = curpcb->pcb_vfpstate.fpscr; - - critical_exit(); + vfp->mcv_fpscr = pcb->pcb_vfpstate.fpscr; } /* * Set machine VFP context. */ -static void +void set_vfpcontext(struct thread *td, mcontext_vfp_t *vfp) { - struct pcb *curpcb; + struct pcb *pcb; - curpcb = curthread->td_pcb; - critical_enter(); - - vfp_discard(td); - memcpy(curpcb->pcb_vfpstate.reg, vfp->mcv_reg, - sizeof(curpcb->pcb_vfpstate.reg)); - curpcb->pcb_vfpstate.fpscr = vfp->mcv_fpscr; - - critical_exit(); + pcb = td->td_pcb; + if (td == curthread) { + critical_enter(); + vfp_discard(td); + critical_exit(); + } else + MPASS(TD_IS_SUSPENDED(td)); + memcpy(pcb->pcb_vfpstate.reg, vfp->mcv_reg, + sizeof(pcb->pcb_vfpstate.reg)); + pcb->pcb_vfpstate.fpscr = vfp->mcv_fpscr; } #endif Copied: stable/11/sys/arm/arm/ptrace_machdep.c (from r323582, head/sys/arm/arm/ptrace_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/arm/arm/ptrace_machdep.c Tue Nov 14 22:18:13 2017 (r325831, copy of r323582, head/sys/arm/arm/ptrace_machdep.c) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2017 John Baldwin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#ifdef VFP +#include +#endif + +int +cpu_ptrace(struct thread *td, int req, void *addr, int data) +{ +#ifdef VFP + mcontext_vfp_t vfp; +#endif + int error; + + switch (req) { +#ifdef VFP + case PT_GETVFPREGS: + get_vfpcontext(td, &vfp); + error = copyout(&vfp, addr, sizeof(vfp)); + break; + case PT_SETVFPREGS: + error = copyin(addr, &vfp, sizeof(vfp)); + if (error == 0) + set_vfpcontext(td, &vfp); + break; +#endif + default: + error = EINVAL; + } + + return (error); +} Modified: stable/11/sys/arm/include/ptrace.h ============================================================================== --- stable/11/sys/arm/include/ptrace.h Tue Nov 14 22:17:02 2017 (r325830) +++ stable/11/sys/arm/include/ptrace.h Tue Nov 14 22:18:13 2017 (r325831) @@ -4,5 +4,20 @@ #ifndef _MACHINE_PTRACE_H_ #define _MACHINE_PTRACE_H_ +#define __HAVE_PTRACE_MACHDEP + +/* + * Must match mcontext_vfp_t. Note that mcontext_vfp_t does not + * include explicit padding. + */ +struct vfpreg { + __uint64_t vfp_reg[32]; + __uint32_t vfp_scr; + __uint32_t vfp_pad0; +}; + +#define PT_GETVFPREGS (PT_FIRSTMACH + 0) +#define PT_SETVFPREGS (PT_FIRSTMACH + 1) + #endif /* !_MACHINE_PTRACE_H */ Modified: stable/11/sys/arm/include/vfp.h ============================================================================== --- stable/11/sys/arm/include/vfp.h Tue Nov 14 22:17:02 2017 (r325830) +++ stable/11/sys/arm/include/vfp.h Tue Nov 14 22:18:13 2017 (r325831) @@ -148,6 +148,8 @@ struct vfp_state { }; #ifdef _KERNEL +void get_vfpcontext(struct thread *, mcontext_vfp_t *); +void set_vfpcontext(struct thread *, mcontext_vfp_t *); void vfp_init(void); void vfp_store(struct vfp_state *, boolean_t); void vfp_discard(struct thread *); Modified: stable/11/sys/conf/files.arm ============================================================================== --- stable/11/sys/conf/files.arm Tue Nov 14 22:17:02 2017 (r325830) +++ stable/11/sys/conf/files.arm Tue Nov 14 22:18:13 2017 (r325831) @@ -79,6 +79,7 @@ arm/arm/platform_if.m optional platform arm/arm/pmap-v4.c optional !armv6 arm/arm/pmap-v6.c optional armv6 arm/arm/pmu.c optional pmu | fdt hwpmc +arm/arm/ptrace_machdep.c standard arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard From owner-svn-src-stable@freebsd.org Wed Nov 15 02:03:39 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3618DBC9CE; Wed, 15 Nov 2017 02:03:39 +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 mx1.freebsd.org (Postfix) with ESMTPS id AD49C79859; Wed, 15 Nov 2017 02:03:39 +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 vAF23cP4079746; Wed, 15 Nov 2017 02:03:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAF23c1F079743; Wed, 15 Nov 2017 02:03:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711150203.vAF23c1F079743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 15 Nov 2017 02:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325837 - in stable/11: sys/arm/arm sys/sys usr.bin/gcore X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/11: sys/arm/arm sys/sys usr.bin/gcore X-SVN-Commit-Revision: 325837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 02:03:39 -0000 Author: jhb Date: Wed Nov 15 02:03:38 2017 New Revision: 325837 URL: https://svnweb.freebsd.org/changeset/base/325837 Log: MFC 323584: Add a NT_ARM_VFP ELF core note to hold VFP registers for each thread. The core note matches the format and layout of NT_ARM_VFP on Linux. Debuggers use the AT_HWCAP flags to determine how many VFP registers are actually used and their format. Modified: stable/11/sys/arm/arm/elf_machdep.c stable/11/sys/sys/elf_common.h stable/11/usr.bin/gcore/elfcore.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/elf_machdep.c ============================================================================== --- stable/11/sys/arm/arm/elf_machdep.c Wed Nov 15 00:06:18 2017 (r325836) +++ stable/11/sys/arm/arm/elf_machdep.c Wed Nov 15 02:03:38 2017 (r325837) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef VFP +#include +#endif static boolean_t elf32_arm_abi_supported(struct image_params *); @@ -129,9 +132,19 @@ elf32_arm_abi_supported(struct image_params *imgp) } void -elf32_dump_thread(struct thread *td __unused, void *dst __unused, - size_t *off __unused) +elf32_dump_thread(struct thread *td, void *dst, size_t *off) { +#ifdef VFP + mcontext_vfp_t vfp; + + if (dst != NULL) { + get_vfpcontext(td, &vfp); + *off = elf32_populate_note(NT_ARM_VFP, &vfp, dst, sizeof(vfp), + NULL); + } else + *off = elf32_populate_note(NT_ARM_VFP, NULL, NULL, sizeof(vfp), + NULL); +#endif } /* Modified: stable/11/sys/sys/elf_common.h ============================================================================== --- stable/11/sys/sys/elf_common.h Wed Nov 15 00:06:18 2017 (r325836) +++ stable/11/sys/sys/elf_common.h Wed Nov 15 02:03:38 2017 (r325837) @@ -757,6 +757,7 @@ typedef struct { #define NT_PTLWPINFO 17 /* Thread ptrace miscellaneous info. */ #define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ #define NT_X86_XSTATE 0x202 /* x86 XSAVE extended state. */ +#define NT_ARM_VFP 0x400 /* ARM VFP registers */ /* Symbol Binding - ELFNN_ST_BIND - st_info */ #define STB_LOCAL 0 /* Local symbol */ Modified: stable/11/usr.bin/gcore/elfcore.c ============================================================================== --- stable/11/usr.bin/gcore/elfcore.c Wed Nov 15 00:06:18 2017 (r325836) +++ stable/11/usr.bin/gcore/elfcore.c Wed Nov 15 02:03:38 2017 (r325837) @@ -109,6 +109,9 @@ static void *elf_note_prpsinfo(void *, size_t *); static void *elf_note_prstatus(void *, size_t *); static void *elf_note_thrmisc(void *, size_t *); static void *elf_note_ptlwpinfo(void *, size_t *); +#if defined(__arm__) +static void *elf_note_arm_vfp(void *, size_t *); +#endif #if defined(__i386__) || defined(__amd64__) static void *elf_note_x86_xstate(void *, size_t *); #endif @@ -366,6 +369,9 @@ elf_putnotes(pid_t pid, struct sbuf *sb, size_t *sizep elf_putnote(NT_FPREGSET, elf_note_fpregset, tids + i, sb); elf_putnote(NT_THRMISC, elf_note_thrmisc, tids + i, sb); elf_putnote(NT_PTLWPINFO, elf_note_ptlwpinfo, tids + i, sb); +#if defined(__arm__) + elf_putnote(NT_ARM_VFP, elf_note_arm_vfp, tids + i, sb); +#endif #if defined(__i386__) || defined(__amd64__) elf_putnote(NT_X86_XSTATE, elf_note_x86_xstate, tids + i, sb); #endif @@ -689,6 +695,31 @@ elf_note_ptlwpinfo(void *arg, size_t *sizep) *sizep = sizeof(int) + sizeof(struct ptrace_lwpinfo); return (p); } + +#if defined(__arm__) +static void * +elf_note_arm_vfp(void *arg, size_t *sizep) +{ + lwpid_t tid; + struct vfpreg *vfp; + static bool has_vfp = true; + struct vfpreg info; + + tid = *(lwpid_t *)arg; + if (has_vfp) { + if (ptrace(PT_GETVFPREGS, tid, (void *)&info, 0) != 0) + has_vfp = false; + } + if (!has_vfp) { + *sizep = 0; + return (NULL); + } + vfp = calloc(1, sizeof(*vfp)); + memcpy(vfp, &info, sizeof(*vfp)); + *sizep = sizeof(*vfp); + return (vfp); +} +#endif #if defined(__i386__) || defined(__amd64__) static void * From owner-svn-src-stable@freebsd.org Wed Nov 15 12:17:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF3B8DDB555; Wed, 15 Nov 2017 12:17:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E52E687E3; Wed, 15 Nov 2017 12:17:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFCHpfP039894; Wed, 15 Nov 2017 12:17:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFCHpn6039893; Wed, 15 Nov 2017 12:17:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711151217.vAFCHpn6039893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 15 Nov 2017 12:17:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325844 - stable/11/lib/libutil X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/lib/libutil X-SVN-Commit-Revision: 325844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 12:17:52 -0000 Author: bapt Date: Wed Nov 15 12:17:51 2017 New Revision: 325844 URL: https://svnweb.freebsd.org/changeset/base/325844 Log: MFC r325716: Fix some nroff style issue Modified: stable/11/lib/libutil/hexdump.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libutil/hexdump.3 ============================================================================== --- stable/11/lib/libutil/hexdump.3 Wed Nov 15 11:35:02 2017 (r325843) +++ stable/11/lib/libutil/hexdump.3 Wed Nov 15 12:17:51 2017 (r325844) @@ -42,14 +42,9 @@ The .Fn hexdump function prints an array of bytes to standard out in hexadecimal form, -along with the -.Tn ASCII -representation of the bytes, if possible. -By default, each line of -output will start with an offset count, followed by 16 hexadecimal values, -followed by 16 -.Tn ASCII -characters. +along with the ASCII representation of the bytes, if possible. +By default, each line of output will start with an offset count, followed by 16 +hexadecimal values, followed by 16 ASCII characters. .Bl -tag -width indent .It Fa ptr Pointer to the array of bytes to print. @@ -73,12 +68,10 @@ Flags for controlling the formatting of the output. Integer value of the number of bytes to display on each line. A value of 0 implies that the default value of 16 will be used. .It Bits 8-15 -Character -.Tn ASCII -value to use as the separator for the hexadecimal output. +Character ASCII value to use as the separator for the hexadecimal output. A value of 0 implies that the default value of 32 -.Tn ( ASCII -space) will be used. +.Pq ASCII space +will be used. .It Dv HD_OMIT_COUNT Do not print the offset column at the beginning of each line. .It Dv HD_OMIT_HEX From owner-svn-src-stable@freebsd.org Wed Nov 15 12:19:13 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3140BDDB5E6; Wed, 15 Nov 2017 12:19:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE23668925; Wed, 15 Nov 2017 12:19:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFCJBw8039979; Wed, 15 Nov 2017 12:19:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFCJBSU039978; Wed, 15 Nov 2017 12:19:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711151219.vAFCJBSU039978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 15 Nov 2017 12:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325845 - stable/10/lib/libutil X-SVN-Group: stable-10 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/10/lib/libutil X-SVN-Commit-Revision: 325845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 12:19:13 -0000 Author: bapt Date: Wed Nov 15 12:19:11 2017 New Revision: 325845 URL: https://svnweb.freebsd.org/changeset/base/325845 Log: MFC r325716: Fix some nroff style issue Modified: stable/10/lib/libutil/hexdump.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libutil/hexdump.3 ============================================================================== --- stable/10/lib/libutil/hexdump.3 Wed Nov 15 12:17:51 2017 (r325844) +++ stable/10/lib/libutil/hexdump.3 Wed Nov 15 12:19:11 2017 (r325845) @@ -42,14 +42,9 @@ The .Fn hexdump function prints an array of bytes to standard out in hexadecimal form, -along with the -.Tn ASCII -representation of the bytes, if possible. -By default, each line of -output will start with an offset count, followed by 16 hexadecimal values, -followed by 16 -.Tn ASCII -characters. +along with the ASCII representation of the bytes, if possible. +By default, each line of output will start with an offset count, followed by 16 +hexadecimal values, followed by 16 ASCII characters. .Bl -tag -width indent .It Fa ptr Pointer to the array of bytes to print. @@ -73,12 +68,10 @@ Flags for controlling the formatting of the output. Integer value of the number of bytes to display on each line. A value of 0 implies that the default value of 16 will be used. .It Bits 8-15 -Character -.Tn ASCII -value to use as the separator for the hexadecimal output. +Character ASCII value to use as the separator for the hexadecimal output. A value of 0 implies that the default value of 32 -.Tn ( ASCII -space) will be used. +.Pq ASCII space +will be used. .It Dv HD_OMIT_COUNT Do not print the offset column at the beginning of each line. .It Dv HD_OMIT_HEX From owner-svn-src-stable@freebsd.org Wed Nov 15 12:20:54 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99419DDB830; Wed, 15 Nov 2017 12:20:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62E6568C1B; Wed, 15 Nov 2017 12:20:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFCKrNG040102; Wed, 15 Nov 2017 12:20:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFCKrjQ040101; Wed, 15 Nov 2017 12:20:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711151220.vAFCKrjQ040101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 15 Nov 2017 12:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325846 - stable/11/usr.bin/rctl X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/usr.bin/rctl X-SVN-Commit-Revision: 325846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 12:20:54 -0000 Author: bapt Date: Wed Nov 15 12:20:53 2017 New Revision: 325846 URL: https://svnweb.freebsd.org/changeset/base/325846 Log: MFC r325717: Remove __unused attributed on arguments that are actually used Modified: stable/11/usr.bin/rctl/rctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/rctl/rctl.c ============================================================================== --- stable/11/usr.bin/rctl/rctl.c Wed Nov 15 12:19:11 2017 (r325845) +++ stable/11/usr.bin/rctl/rctl.c Wed Nov 15 12:20:53 2017 (r325846) @@ -586,7 +586,7 @@ usage(void) } int -main(int argc __unused, char **argv __unused) +main(int argc, char **argv) { int ch, aflag = 0, hflag = 0, nflag = 0, lflag = 0, rflag = 0, uflag = 0; From owner-svn-src-stable@freebsd.org Wed Nov 15 12:21:13 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16FF4DDB8A5; Wed, 15 Nov 2017 12:21:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C633468CFE; Wed, 15 Nov 2017 12:21:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFCL7J1040158; Wed, 15 Nov 2017 12:21:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFCL7xv040157; Wed, 15 Nov 2017 12:21:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711151221.vAFCL7xv040157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 15 Nov 2017 12:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325847 - stable/10/usr.bin/rctl X-SVN-Group: stable-10 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/10/usr.bin/rctl X-SVN-Commit-Revision: 325847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 12:21:13 -0000 Author: bapt Date: Wed Nov 15 12:21:06 2017 New Revision: 325847 URL: https://svnweb.freebsd.org/changeset/base/325847 Log: MFC r325717: Remove __unused attributed on arguments that are actually used Modified: stable/10/usr.bin/rctl/rctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/rctl/rctl.c ============================================================================== --- stable/10/usr.bin/rctl/rctl.c Wed Nov 15 12:20:53 2017 (r325846) +++ stable/10/usr.bin/rctl/rctl.c Wed Nov 15 12:21:06 2017 (r325847) @@ -494,7 +494,7 @@ usage(void) } int -main(int argc __unused, char **argv __unused) +main(int argc, char **argv) { int ch, aflag = 0, hflag = 0, nflag = 0, lflag = 0, rflag = 0, uflag = 0; From owner-svn-src-stable@freebsd.org Wed Nov 15 12:22:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BA77DDBAC4; Wed, 15 Nov 2017 12:22:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3D1268FF5; Wed, 15 Nov 2017 12:22:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFCMumi044311; Wed, 15 Nov 2017 12:22:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFCMu6N044310; Wed, 15 Nov 2017 12:22:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711151222.vAFCMu6N044310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 15 Nov 2017 12:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325848 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 325848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 12:22:58 -0000 Author: bapt Date: Wed Nov 15 12:22:56 2017 New Revision: 325848 URL: https://svnweb.freebsd.org/changeset/base/325848 Log: MFC r325737: Update to 2017.10.21 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Wed Nov 15 12:21:06 2017 (r325847) +++ stable/11/share/misc/pci_vendors Wed Nov 15 12:22:56 2017 (r325848) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.09.01 -# Date: 2017-09-01 03:15:02 +# Version: 2017.10.21 +# Date: 2017-10-21 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -79,18 +79,18 @@ 0b0b Rhino Equipment Corp. 0105 R1T1 0205 R4FXO - 0206 RCB4FXO 4-channel FXO analog telphony card + 0206 RCB4FXO 4-channel FXO analog telephony card 0305 R4T1 0405 R8FXX - 0406 RCB8FXX 8-channel modular analog telphony card + 0406 RCB8FXX 8-channel modular analog telephony card 0505 R24FXX - 0506 RCB24FXS 24-Channel FXS analog telphony card + 0506 RCB24FXS 24-Channel FXS analog telephony card 0605 R2T1 0705 R24FXS - 0706 RCB24FXO 24-Channel FXO analog telphony card + 0706 RCB24FXO 24-Channel FXO analog telephony card 0905 R1T3 Single T3 Digital Telephony Card - 0906 RCB24FXX 24-channel modular analog telphony card - 0a06 RCB672FXX 672-channel modular analog telphony card + 0906 RCB24FXX 24-channel modular analog telephony card + 0a06 RCB672FXX 672-channel modular analog telephony card 0e11 Compaq Computer Corporation 0001 PCI to EISA Bridge 0002 PCI to ISA Bridge @@ -251,6 +251,9 @@ 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter + 8086 352d Integrated RAID Module RMSP3AD160F + 8086 9460 RAID Controller RSP3TD160F + 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -260,9 +263,15 @@ 1d49 0601 ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter 1d49 0603 ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter + 8086 352e Integrated RAID Module RMSP3CD080F + 8086 352f Integrated RAID Module RMSP3HD080E + 8086 9461 RAID Controller RSP3DD080F 0017 MegaRAID Tri-Mode SAS3408 1d49 0500 ThinkSystem RAID 530-8i PCIe 12Gb Adapter 1d49 0502 ThinkSystem RAID 530-8i Dense Adapter + 8086 3528 Integrated RAID RMSP3LD060 + 8086 3529 Integrated RAID RMSP3LD060 + 8086 9441 RAID Controller RSP3WD080E 001b MegaRAID Tri-Mode SAS3504 1d49 0605 ThinkSystem RAID 930-4i 2GB Flash Flex Adapter 001c MegaRAID Tri-Mode SAS3404 @@ -586,9 +595,12 @@ 1028 1fd3 HBA330 MMZ 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) + 8086 3530 Integrated RAID Module RMSP3JD160J 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA + 8086 3000 RAID Controller RSP3QD160J + 8086 3020 RAID Controller RSP3GD016J 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA @@ -614,6 +626,9 @@ 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00d3 MegaRAID Tri-Mode SAS3716W + 02b0 Virtual Endpoint on PCIe Switch + 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter + 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter 0407 MegaRAID 1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller @@ -904,6 +919,7 @@ 1043 836c M4A785TD Motherboard 1043 8410 M4A89GTD PRO/USB3 Motherboard 1043 841b M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 1179 ff50 Satellite P305D-S8995E 1458 a022 GA-MA770-DS3rev2.0 Motherboard 17f2 5000 KI690-AM2 Motherboard @@ -914,6 +930,7 @@ 103c 280a DC5750 Microtower 1043 82ef M3A78-EH Motherboard 1043 8389 M4A785TD Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 1179 ff50 Satellite P305D-S8995E 1458 4385 GA-MA770-DS3rev2.0 Motherboard 1462 7368 K9AG Neo2 @@ -965,14 +982,17 @@ 4390 SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode] 1043 82ef M3A78-EH Motherboard 1043 8389 M4A785TD Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 1458 b002 GA-MA770-DS3rev2.0 Motherboard 1849 4390 Motherboard (one of many) 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 4392 SB7x0/SB8x0/SB9x0 SATA Controller [Non-RAID5 mode] + 105b 0e13 N15235/A74MX mainboard / AMD SB700 4393 SB7x0/SB8x0/SB9x0 SATA Controller [RAID5 mode] 4394 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] 4395 SB8x0/SB9x0 SATA Controller [Storage mode] @@ -981,6 +1001,7 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller @@ -988,25 +1009,30 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4398 SB7x0 USB OHCI1 Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 15d9 a811 H8DGU 4399 SB7x0/SB8x0/SB9x0 USB OHCI2 Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 439c SB7x0/SB8x0/SB9x0 IDE Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 439d SB7x0/SB8x0/SB9x0 LPC host controller 1019 2120 A785GM-M 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 43a0 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0) 43a1 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 1) @@ -1574,6 +1600,7 @@ 103c 8006 FirePro M4170 17aa 3643 Radeon R7 A360 6605 Opal PRO [Radeon R7 M260] + 103c 2259 FirePro M4150 6606 Mars XTX [Radeon HD 8790M] 1028 0684 FirePro W4170M 6607 Mars LE [Radeon HD 8530M / R5 M240] @@ -1637,12 +1664,13 @@ 1462 2938 Radeon R9 360 OEM 1462 3271 Radeon R9 360 OEM 1682 7360 Radeon R7 360 - 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430] + 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] 1028 05ea Radeon HD 8670M 1028 06bf Radeon R5 M335 103c 1970 Radeon HD 8670M 103c 80be Radeon R5 M330 103c 8136 Radeon R5 M330 + 103c 8329 Radeon R7 M520 17aa 3804 Radeon R5 M330 17aa 3809 Radeon R5 M330 17aa 381a Radeon R5 M430 @@ -2164,6 +2192,7 @@ # GV-R928XOC-3GD 1458 3001 Tahiti XTL [Radeon R9 280X OC] 1462 2774 MSI R7970 TF 3GD5/OC BE + 1682 3001 Tahiti XTL [Radeon R9 280X] 1682 3211 Double D HD 7970 Black Edition # FX-797A-TNBC 1682 3213 HD 7970 Black Edition @@ -2271,7 +2300,13 @@ 67e8 Baffin [Polaris11] 67e9 Baffin [Polaris11] 67eb Baffin [Polaris11] - 67ef Baffin [Radeon RX 460] + 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/560] + 106b 0160 Radeon Pro 460 + 106b 0166 Radeon Pro 455 + 106b 0167 Radeon Pro 450 + 106b 0179 Radeon Pro 560 + 1642 1727 Polaris 21 XL [Radeon RX 560D] + 1682 956d Polaris 21 XL [Radeon RX 560D] 67ff Baffin [Radeon RX 560] 6800 Wimbledon XT [Radeon HD 7970M] 1002 0124 Radeon HD 7970M @@ -3120,8 +3155,9 @@ 7910 RS690 Host Bridge 1179 ff50 Satellite P305D-S8995E 17f2 5000 KI690-AM2 Motherboard - 7911 RS690 Host Bridge - 7912 RS690 PCI to PCI Bridge (Internal gfx) + 7911 RS690/RS740 Host Bridge + 1002 7910 RS690/RS740 Host Bridge + 7912 RS690/RS740 PCI to PCI Bridge (Internal gfx) 7913 RS690 PCI to PCI Bridge (PCI Express Graphics Port 0) 7915 RS690 PCI to PCI Bridge (PCI Express Port 1) 7916 RS690 PCI to PCI Bridge (PCI Express Port 2) @@ -3146,6 +3182,7 @@ 7941 RS600 [Radeon Xpress 1250] 7942 RS600M [Radeon Xpress 1250] 796e RS740 [Radeon 2100] + 105b 0e13 N15235/A74MX mainboard 9400 R600 [Radeon HD 2900 PRO/XT] 1002 2552 Radeon HD 2900 XT 1002 3000 Radeon HD 2900 PRO @@ -3363,6 +3400,7 @@ 9840 Kabini HDMI/DP Audio 9850 Mullins [Radeon R3 Graphics] 9851 Mullins [Radeon R4/R5 Graphics] + 1179 f928 Beema [Radeon R5 Graphics] 9852 Mullins [Radeon R2 Graphics] 9853 Mullins [Radeon R2 Graphics] 9854 Mullins [Radeon R3E Graphics] @@ -4004,8 +4042,23 @@ 1437 Liverpool I/O Memory Management Unit 1438 Liverpool Processor Root Port 1439 Family 16h Processor Functions 5:1 + 1450 Family 17h (Models 00h-0fh) Root Complex + 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit + 1452 Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge + 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B + 1456 Family 17h (Models 00h-0fh) Platform Security Processor + 1457 Family 17h (Models 00h-0fh) HD Audio Controller 145b Zeppelin Non-Transparent Bridge - 145c USB3 Host Controller + 145c Family 17h (Models 00h-0fh) USB 3.0 Host Controller + 145f USB 3.0 Host controller + 1460 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 + 1461 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 + 1462 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 + 1463 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3 + 1464 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4 + 1465 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 + 1466 Family 17h (Models 00h-0fh) Data Fabric Device 18h Function 6 + 1467 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4090,7 +4143,9 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) - 43bb USB 3.1 XHCI Controller + 43b4 300 Series Chipset PCIe Port + 43b7 300 Series Chipset SATA Controller + 43bb 300 Series Chipset USB 3.1 xHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4545,6 +4600,7 @@ 0533 MGA G200EH 103c 3381 iLO4 0534 G200eR2 + 0536 Integrated Matrox G200eW3 Graphics Controller 0538 G200eH 1590 00e4 iLO5 VGA 0540 M91XX @@ -4585,7 +4641,7 @@ 102b 0f84 Millennium G550 Dual Head DDR 32Mb 102b 1e41 Millennium G550 102b 2300 Millennium G550 LP PCIE - 2537 Millenium P650/P750 + 2537 Millennium P650/P750 102b 1820 Millennium P750 64MB 102b 1830 Millennium P650 64MB 102b 1850 RAD2mp @@ -4593,7 +4649,7 @@ 102b 1880 Sono S10 102b 1c10 QID 128MB 102b 2811 Millennium P650 Low-profile PCI 64MB - 102b 2821 Millenium P650 Low-profile PCI + 102b 2821 Millennium P650 Low-profile PCI 102b 2841 RAD PCI 102b 2851 Spectrum PCI 102b 2871 EpicA TC2 @@ -4607,7 +4663,7 @@ 102b 3051 RG-400SL 102b 3061 Extio F1420 102b 3081 Extio F1240 - 2538 Millenium P650 PCIe + 2538 Millennium P650 PCIe 102b 0847 RAD PCIe 102b 08c7 Millennium P650 PCIe 128MB 102b 0907 Millennium P650 PCIe 64MB @@ -4615,23 +4671,23 @@ 102b 0987 ATC PCIe 4MP 102b 1047 Millennium P650 LP PCIe 128MB 102b 1087 Millennium P650 LP PCIe 64MB - 102b 1801 Millenium P650 PCIe x1 + 102b 1801 Millennium P650 PCIe x1 102b 2538 Parhelia APVe 102b 3007 QID Low-profile PCIe 102b 3087 Aurora VX3mp 102b 30c7 QID LP PCIe 2539 Millennium P690 - 102b 0040 Millenium P690 PCIe x16 + 102b 0040 Millennium P690 PCIe x16 102b 0042 ONYX 102b 0043 SPECTRA - 102b 0080 Millenium P690 Plus LP PCIe x16 - 102b 0081 Millenium P690 LP PCIe x16 + 102b 0080 Millennium P690 Plus LP PCIe x16 + 102b 0081 Millennium P690 LP PCIe x16 102b 0082 RAD LPX PCIe x16 - 102b 00c0 Millenium P690 Plus LP PCI - 102b 00c2 Millenium P690 LP PCI + 102b 00c0 Millennium P690 Plus LP PCI + 102b 00c2 Millennium P690 LP PCI 102b 00c3 RAD LPX PCI - 102b 0101 Millenium P690 PCI - 102b 0140 Millenium P690 LP PCIe x1 + 102b 0101 Millennium P690 PCI + 102b 0140 Millennium P690 LP PCIe x1 102b 0180 Display Wall IP Decode 128 MB 4164 Morphis QxT frame grabber 43b4 Morphis Qxt encoding engine @@ -5146,11 +5202,9 @@ 3308 Integrated Lights-Out Standard MS Watchdog Timer 103c 330e iLO3 103c 3381 iLO4 - 402f PCIe Root Port 4030 zx2 System Bus Adapter 4031 zx2 I/O Controller 4037 PCIe Local Bus Adapter - 403b PCIe Root Port 103e Solliday Engineering 103f Synopsys/Logic Modeling Group 1040 Accelgraphics Inc. @@ -5167,7 +5221,6 @@ 0675 1704 ISDN Adapter (PCI Bus, D, C) 0675 1707 ISDN Adapter (PCI Bus, DV, W) 10cf 105e ISDN Adapter (PCI Bus, DV, W) - 13a0 Transformer Book T101HA-GR030R # Should be 1022:9602 9602 AMD RS780/RS880 PCI to PCI bridge (int gfx) 1043 83a2 M4A785TD Motherboard @@ -6132,6 +6185,7 @@ 1077 015e QLE2564 PCI Express to 8Gb FC Quad Channel 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine 1590 00fc StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter + 2971 ISP2684 3022 ISP4022-based Ethernet NIC 3032 ISP4032-based Ethernet IPv6 NIC 4010 ISP4010-based iSCSI TOE HBA @@ -9234,19 +9288,19 @@ 0533 C67 [GeForce 7000M / nForce 610M] 053a C68 [GeForce 7050 PV / nForce 630a] 053b C68 [GeForce 7050 PV / nForce 630a] - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 053e C68 [GeForce 7025 / nForce 630a] 0541 MCP67 Memory Controller 0542 MCP67 SMBus - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 0543 MCP67 Co-processor 0547 MCP67 Memory Controller - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 1849 0547 ALiveNF7G-HDready 0548 MCP67 ISA Bridge 1043 8308 M2N68-AM Motherboard 054c MCP67 Ethernet - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 1849 054c ALiveNF7G-HDready, MCP67 Gigabit Ethernet 054d MCP67 Ethernet 054e MCP67 Ethernet @@ -9936,7 +9990,7 @@ 0dc0 GF106 [GeForce GT 440] 0dc4 GF106 [GeForce GTS 450] 0dc5 GF106 [GeForce GTS 450 OEM] - 0dc6 GF106 [GeForce GTS 450] + 0dc6 GF106 [GeForce GTS 450 OEM] 0dcd GF106M [GeForce GT 555M] 0dce GF106M [GeForce GT 555M] 0dd1 GF106M [GeForce GTX 460M] @@ -9956,7 +10010,7 @@ 0de5 GF108 [GeForce GT 530] 0de7 GF108 [GeForce GT 610] 0de8 GF108M [GeForce GT 620M] - 0de9 GF108M [GeForce GT 630M] + 0de9 GF108M [GeForce GT 620M/630M/635M/640M LE] 1025 0692 GeForce GT 620M 1025 0725 GeForce GT 620M 1025 0728 GeForce GT 620M @@ -10177,7 +10231,7 @@ 1086 GF110 [GeForce GTX 570 Rev. 2] 1087 GF110 [GeForce GTX 560 Ti 448 Cores] 1088 GF110 [GeForce GTX 590] - 1089 GF110 [GeForce GTX 580] + 1089 GF110 [GeForce GTX 580 Rev. 2] 108b GF110 [GeForce GTX 580] 108e GF110GL [Tesla C2090] 1091 GF110GL [Tesla M2090] @@ -10301,12 +10355,31 @@ 1028 065e GeForce 820M 1028 0662 GeForce 820M 1028 068d GeForce 820M + 1028 06ad GeForce 820M + 1028 06ae GeForce 820M + 1028 06af GeForce 820M + 1028 06b0 GeForce 820M + 1028 06c0 GeForce 820M 1028 06c1 GeForce 820M 103c 18ef GeForce GT 630M 103c 18f9 GeForce GT 630M 103c 18fb GeForce GT 630M 103c 18fd GeForce GT 630M 103c 18ff GeForce GT 630M + 103c 218a GeForce 820M + 103c 21bb GeForce 820M + 103c 21bc GeForce 820M + 103c 220e GeForce 820M + 103c 2210 GeForce 820M + 103c 2212 GeForce 820M + 103c 2214 GeForce 820M + 103c 2218 GeForce 820M + 103c 225b GeForce 820M + 103c 225d GeForce 820M + 103c 226d GeForce 820M + 103c 226f GeForce 820M + 103c 22d2 GeForce 820M + 103c 22d9 GeForce 820M 103c 2335 GeForce 820M 103c 2337 GeForce 820M 103c 2aef GeForce GT 720A @@ -10344,6 +10417,7 @@ 1043 228a GeForce 820M 1043 232a GeForce 820M 1043 233a GeForce 820M + 1043 235a GeForce 820M 1043 236a GeForce 820M 1043 238a GeForce 820M 1043 8595 GeForce GT 720M @@ -10359,6 +10433,8 @@ 1043 8643 GeForce 820M 1043 864c GeForce 820M 1043 8652 GeForce 820M + 1043 8660 GeForce 820M + 1043 8661 GeForce 820M 105b 0dac GeForce GT 720M 105b 0dad GeForce GT 720M 105b 0ef3 GeForce GT 720M @@ -10433,8 +10509,10 @@ 17aa 309c GeForce GT 720A 17aa 30b4 GeForce 820A 17aa 30b7 GeForce 720A + 17aa 30e4 GeForce 820A 17aa 361b GeForce 820A 17aa 361c GeForce 820A + 17aa 361d GeForce 820A 17aa 3656 GeForce GT 620M 17aa 365a GeForce 705M 17aa 365e GeForce 800M @@ -10644,10 +10722,10 @@ 1282 GK208 [GeForce GT 640 Rev. 2] 1284 GK208 [GeForce GT 630 Rev. 2] 1286 GK208 [GeForce GT 720] - 1287 GK208 [GeForce GT 730] - 1288 GK208 [GeForce GT 720] + 1287 GK208B [GeForce GT 730] + 1288 GK208B [GeForce GT 720] 1289 GK208 [GeForce GT 710] - 128b GK208 [GeForce GT 710B] + 128b GK208B [GeForce GT 710] 1290 GK208M [GeForce GT 730M] 103c 2afa GeForce GT 730A 103c 2b04 GeForce GT 730A @@ -10671,11 +10749,12 @@ 17aa 367c GeForce 710A 1296 GK208M [GeForce 825M] 1298 GK208M [GeForce GT 720M] - 1299 GK208M [GeForce 920M] + 1299 GK208BM [GeForce 920M] 17aa 30bb GeForce 920A + 17aa 30df GeForce 920A 17aa 36a7 GeForce 920A 17aa 36af GeForce 920M - 129a GK208M [GeForce 910M] + 129a GK208BM [GeForce 910M] 12a0 GK208 12b9 GK208GLM [Quadro K610M] 12ba GK208GLM [Quadro K510M] @@ -10692,6 +10771,7 @@ 1349 GM108M [GeForce 930M] 134b GM108M [GeForce 940MX] 134d GM108M [GeForce 940MX] + 17aa 2248 ThinkPad T570 134e GM108M [GeForce 930MX] 134f GM108M [GeForce 920MX] 137a GM108GLM [Quadro K620M / Quadro M500M] @@ -10741,7 +10821,7 @@ 13d7 GM204M [GeForce GTX 980M] 13d8 GM204M [GeForce GTX 970M] 13d9 GM204M [GeForce GTX 965M] - 13da GM204M [GeForce GTX 980] + 13da GM204M [GeForce GTX 980 Mobile] 13e7 GM204 [GeForce GTX 980 Engineering Sample] 13f0 GM204GL [Quadro M5000] 13f1 GM204GL [Quadro M4000] @@ -10754,7 +10834,7 @@ 13fb GM204GLM [Quadro M5500] 1401 GM206 [GeForce GTX 960] 1402 GM206 [GeForce GTX 950] - 1406 GM206 [GeForce GTX 960] + 1406 GM206 [GeForce GTX 960 OEM] 1407 GM206 [GeForce GTX 750 v2] 1427 GM206M [GeForce GTX 965M] 1430 GM206GL [Quadro M2000] @@ -10764,7 +10844,7 @@ 15f1 GP100GL 15f7 GP100GL [Tesla P100 PCIe 12GB] 15f8 GP100GL [Tesla P100 PCIe 16GB] - 15f9 GP100GL [Tesla P100 SMX2 16GB] + 15f9 GP100GL [Tesla P100 SXM2 16GB] 1617 GM204M [GeForce GTX 980M] 1618 GM204M [GeForce GTX 970M] 1619 GM204M [GeForce GTX 965M] @@ -10794,14 +10874,23 @@ 1b87 GP104 [P104-100] 1ba0 GP104M [GeForce GTX 1080 Mobile] 1ba1 GP104M [GeForce GTX 1070 Mobile] + 1458 1651 GeForce GTX 1070 Max-Q + 1462 11e8 GeForce GTX 1070 Max-Q + 1462 11e9 GeForce GTX 1070 Max-Q + 1558 9501 GeForce GTX 1070 Max-Q + 1bad GP104 [GeForce GTX 1070 Engineering Sample] 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL [Quadro P4000] 1bb3 GP104GL [Tesla P4] 1bb4 GP104GL + 1bb5 GP104GLM [Quadro P5200 Mobile] 1bb6 GP104GLM [Quadro P5000 Mobile] 1bb7 GP104GLM [Quadro P4000 Mobile] + 1462 11e9 Quadro P4000 Max-Q 1bb8 GP104GLM [Quadro P3000 Mobile] 1be0 GP104M [GeForce GTX 1080 Mobile] + 1028 07c0 GeForce GTX 1080 Max-Q + 1458 355b GeForce GTX 1080 Max-Q 1be1 GP104M [GeForce GTX 1070 Mobile] 1c00 GP106 1c01 GP106 @@ -10810,9 +10899,13 @@ 1c07 GP106 [P106-100] 1c09 GP106 [P106-090] 1c20 GP106M [GeForce GTX 1060 Mobile] + 17aa 39b9 GeForce GTX 1060 Max-Q 3GB + 1c21 GP106M [GeForce GTX 1050 Ti Mobile] + 1c22 GP106M [GeForce GTX 1050 Mobile] 1c30 GP106GL [Quadro P2000] 1c35 GP106 - 1c60 GP106M [GeForce GTX 1060 Mobile] + 1c60 GP106M [GeForce GTX 1060 Mobile 6GB] + 103c 8390 GeForce GTX 1060 Max-Q 6GB 1c61 GP106M [GeForce GTX 1050 Ti Mobile] 1c62 GP106M [GeForce GTX 1050 Mobile] 1c70 GP106GL @@ -10831,6 +10924,8 @@ 1d01 GP108 [GeForce GT 1030] 1d10 GP108M [GeForce MX150] 1d81 GV100 + 1db1 GV100 [Tesla V100 SXM2] + 1db4 GV100 [Tesla V100 PCIe] 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) 103c 1934 FlexFabric 20Gb 2-port 650M Adapter @@ -10888,6 +10983,9 @@ f111 Saturn-X LightPulse Fibre Channel Host Adapter f112 Saturn-X LightPulse Fibre Channel Host Adapter f180 LPSe12002 EmulexSecure Fibre Channel Adapter + f400 LPe36000 Fibre Channel Host Adapter [Prism] + 10df f401 LPe35000 Fibre Channel Host Adapter [Prism] + 10df f402 LPe35000 Fibre Channel Host Adapter [Prism] f700 LP7000 Fibre Channel Host Adapter f701 LP7000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2) f800 LP8000 Fibre Channel Host Adapter @@ -11026,8 +11124,8 @@ 8129 RTL-8129 10ec 8129 RT8129 Fast Ethernet Adapter 11ec 8129 RTL8111/8168 PCIe Gigabit Ethernet (misconfigured) - 8136 RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller - 103c 1985 Pavilion 17-e163sg Notebook PC + 8136 RTL8101/2/6E PCI Express Fast Ethernet controller + 103c 1985 RTL8106E on Pavilion 17-e163sg Notebook PC 103c 2a8c Compaq 500B Microtower 103c 2ab1 Pavilion p6774 103c 30cc Pavilion dv6700 @@ -11087,6 +11185,7 @@ 8e2e 7100 KF-230TX/2 a0a0 0007 ALN-325C 8167 RTL-8110SC/8169SC Gigabit Ethernet + 105b 0e10 RTL-8110SC-GR on a N15235/A74MX mainboard 1458 e000 GA-MA69G-S3H Motherboard 1462 235c P965 Neo MS-7235 mainboard 1462 236c 945P Neo3-F motherboard @@ -14864,6 +14963,7 @@ 12d7 Biotronic SRL 12d8 Pericom Semiconductor 01a7 7C21P100 2-port PCI-X to PCI-X Bridge + 2608 PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch 400a PI7C9X442SL PCI Express Bridge Port 400e PI7C9X442SL USB OHCI Controller 400f PI7C9X442SL USB EHCI Controller @@ -15218,7 +15318,7 @@ 0040 QSC-200/300 0050 ESC-100D 0060 ESC-100M - 00f0 MPAC-100 Syncronous Serial Card (Zilog 85230) + 00f0 MPAC-100 Synchronous Serial Card (Zilog 85230) 0170 QSCLP-100 0180 DSCLP-100 0190 SSCLP-100 @@ -15687,6 +15787,7 @@ 1043 838e Virtuoso 66 (Xonar DS) 1043 8428 Virtuoso 100 (Xonar Xense) 1043 8467 CMI8786 (Xonar DG) + 1043 8521 CMI8786 (Xonar DGX) 1043 85f4 Virtuoso 100 (Xonar Essence STX II) 13f6 8782 PCI 2.0 HD Audio 13f6 ffff CMI8787-HG2PCI @@ -16176,6 +16277,13 @@ 50a2 T580-50A2 Unified Wire Ethernet Controller 50a3 T580-50A3 Unified Wire Ethernet Controller 50a4 T540-50A4 Unified Wire Ethernet Controller + 50a5 T522-50A5 Unified Wire Ethernet Controller + 50a6 T522-50A6 Unified Wire Ethernet Controller + 50a7 T580-50A7 Unified Wire Ethernet Controller + 50a8 T580-50A8 Unified Wire Ethernet Controller + 50a9 T580-50A9 Unified Wire Ethernet Controller + 50aa T580-50AA Unified Wire Ethernet Controller + 50ab T520-50AB Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16231,6 +16339,13 @@ 54a2 T580-50A2 Unified Wire Ethernet Controller 54a3 T580-50A3 Unified Wire Ethernet Controller 54a4 T540-50A4 Unified Wire Ethernet Controller + 54a5 T522-50A5 Unified Wire Ethernet Controller + 54a6 T522-50A6 Unified Wire Ethernet Controller + 54a7 T580-50A7 Unified Wire Ethernet Controller + 54a8 T580-50A8 Unified Wire Ethernet Controller + 54a9 T580-50A9 Unified Wire Ethernet Controller + 54aa T580-50AA Unified Wire Ethernet Controller + 54ab T520-50AB Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16286,6 +16401,11 @@ 55a2 T580-50A2 Unified Wire Storage Controller 55a3 T580-50A3 Unified Wire Storage Controller 55a4 T540-50A4 Unified Wire Storage Controller + 55a5 T522-50A5 Unified Wire Storage Controller + 55a6 T522-50A6 Unified Wire Storage Controller + 55a7 T580-50A7 Unified Wire Storage Controller + 55a8 T580-50A8 Unified Wire Storage Controller + 55a9 T580-50A9 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16341,6 +16461,13 @@ 56a2 T580-50A2 Unified Wire Storage Controller 56a3 T580-50A3 Unified Wire Storage Controller 56a4 T540-50A4 Unified Wire Storage Controller + 56a5 T522-50A5 Unified Wire Storage Controller + 56a6 T522-50A6 Unified Wire Storage Controller + 56a7 T580-50A7 Unified Wire Storage Controller + 56a8 T580-50A8 Unified Wire Storage Controller + 56a9 T580-50A9 Unified Wire Storage Controller + 56aa T580-50AA Unified Wire Storage Controller + 56ab T520-50AB Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16435,6 +16562,13 @@ 58a2 T580-50A2 Unified Wire Ethernet Controller [VF] 58a3 T580-50A3 Unified Wire Ethernet Controller [VF] 58a4 T540-50A4 Unified Wire Ethernet Controller [VF] + 58a5 T522-50A5 Unified Wire Ethernet Controller [VF] + 58a6 T522-50A6 Unified Wire Ethernet Controller [VF] + 58a7 T580-50A7 Unified Wire Ethernet Controller [VF] + 58a8 T580-50A8 Unified Wire Ethernet Controller [VF] + 58a9 T580-50A9 Unified Wire Ethernet Controller [VF] + 58aa T580-50AA Unified Wire Ethernet Controller [VF] + 58ab T520-50AB Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16453,6 +16587,7 @@ 6082 T6225-6082 Unified Wire Ethernet Controller 6083 T62100-6083 Unified Wire Ethernet Controller 6084 T64100-6084 Unified Wire Ethernet Controller + 6085 T6240-6085 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16471,6 +16606,7 @@ 6482 T6225-6082 Unified Wire Ethernet Controller 6483 T62100-6083 Unified Wire Ethernet Controller 6484 T64100-6084 Unified Wire Ethernet Controller + 6485 T6240-6085 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16489,6 +16625,7 @@ 6582 T6225-6082 Unified Wire Storage Controller 6583 T62100-6083 Unified Wire Storage Controller 6584 T64100-6084 Unified Wire Storage Controller + 6585 T6240-6085 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16507,6 +16644,7 @@ 6682 T6225-6082 Unified Wire Storage Controller 6683 T62100-6083 Unified Wire Storage Controller 6684 T64100-6084 Unified Wire Storage Controller + 6685 T6240-6085 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16525,6 +16663,7 @@ 6882 T6225-6082 Unified Wire Ethernet Controller [VF] 6883 T62100-6083 Unified Wire Ethernet Controller [VF] 6884 T64100-6084 Unified Wire Ethernet Controller [VF] + 6885 T6240-6085 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -17496,6 +17635,7 @@ 106b 0093 AirPort Extreme 106b 00d1 AirPort Extreme 106b 00e9 AirPort Extreme + 14e4 04d8 Pegatron UPWL6024 4357 BCM43225 802.11b/g/n 105b e021 T77H103.00 Wireless Half-size Mini PCIe Card 4358 BCM43227 802.11b/g/n @@ -18283,6 +18423,7 @@ 117c 0091 FastFrame NQ42 117c 0092 FastFrame NQ11 117c 0093 FastFrame NQ12 + 15b3 0006 Mellanox Technologies ConnectX-3 Pro Stand-up dual-port 40GbE MCX314A-BCCT 15b3 0078 ConnectX-3 Pro 10 GbE Dual Port KR Mezzanine Card 15b3 0079 ConnectX-3 Pro 40 GbE Dual Port QSFP+ Adapter 15b3 0080 ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter @@ -18297,6 +18438,8 @@ 1011 MT27600 [Connect-IB] 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] + 15b3 0003 Mellanox Technologies ConnectX-4 Stand-up single-port 40GbE MCX413A-BCAT + 15b3 0005 Mellanox Technologies ConnectX-4 Stand-up single-port 40GbE MCX415A-BCAT 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 15b3 0008 ConnectX-4 Stand-up dual-port 100GbE MCX416A-CCAT 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter @@ -18304,6 +18447,7 @@ 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0005 Mellanox Technologies ConnectX-4 Lx Stand-up single-port 40GbE MCX4131A-BCAT 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G @@ -19037,12 +19181,14 @@ 7016 AP470 48-Channel TTL Level Digital Input/Output Module 7017 AP323 16-bit, 20 or 40 Channel Analog Input Module 7018 AP408: 32-Channel Digital I/O Module + 7019 AP341 14-bit, 16-Channel Simultaneous Conversion Analog Input Module 701a AP220-16 12-Bit, 16-Channel Analog Output Module 701b AP231-16 16-Bit, 16-Channel Analog Output Module 7021 APA7-201 Reconfigurable Artix-7 FPGA module 48 TTL channels 7022 APA7-202 Reconfigurable Artix-7 FPGA module 24 RS485 channels 7023 APA7-203 Reconfigurable Artix-7 FPGA module 24 TTL & 12 RS485 channels 7024 APA7-204 Reconfigurable Artix-7 FPGA module 24 LVDS channels + 7027 AP418 16-Channel High Voltage Digital Input/Output Module 7042 AP482 Counter Timer Module with TTL Level Input/Output 7043 AP483 Counter Timer Module with TTL Level and RS422 Input/Output 7044 AP484 Counter Timer Module with RS422 Input/Output @@ -19451,6 +19597,7 @@ 1803 ProdaSafe GmbH 1805 Euresys S.A. 1809 Lumanate, Inc. +180c IEI Integration Corp 1813 Ambient Technologies Inc 4000 HaM controllerless modem 16be 0001 V9x HAM Data Fax Modem @@ -19892,11 +20039,12 @@ 1924 8012 SFN8522-R1 8000 Series 10G Adapter 1924 8013 SFN8042-R1 8000 Series 10/40G Adapter 1924 8014 SFN8542-R1 8000 Series 10/40G Adapter - 1924 8016 SFN8022-R2 8000 Series 10G Adapte + 1924 8016 SFN8022-R2 8000 Series 10G Adapter 1924 8017 SFN8522-R2 8000 Series 10G Adapter 1924 8018 SFN8042-R2 8000 Series 10/40G Adapter 1924 8019 SFN8542-R2 8000 Series 10/40G Adapter 1924 801a SFN8722-R1 8000 Series OCP 10G Adapter + 1924 801b SFN8522-R3 8000 Series 10G Adapter 1803 SFC9020 10G Ethernet Controller (Virtual Function) 1813 SFL9021 10GBASE-T Ethernet Controller (Virtual Function) 1903 SFC9120 10G Ethernet Controller (Virtual Function) @@ -20082,6 +20230,7 @@ # E2200, E2201, E2205 e091 Killer E220x Gigabit Ethernet Controller e0a1 Killer E2400 Gigabit Ethernet Controller + e0b1 Killer E2500 Gigabit Ethernet Controller 196a Sensory Networks Inc. 0101 NodalCore C-1000 Content Classification Accelerator 0102 NodalCore C-2000 Content Classification Accelerator @@ -20365,7 +20514,7 @@ 3003 ioMemory Mezzanine 1aee Caustic Graphics Inc. # nee Qumranet, Inc. -1af4 Red Hat, Inc +1af4 Red Hat, Inc. 1000 Virtio network device 1001 Virtio block device 1002 Virtio memory balloon @@ -20642,6 +20791,8 @@ 1cc7 Radian Memory Systems Inc. 0200 RMS-200 0250 RMS-250 +1ccf Zoom Corporation + 0001 TAC-2 Thunderbolt Audio Converter 1cd2 SesKion GmbH 0301 Simulyzer-RT CompactPCI Serial DIO-1 card 0302 Simulyzer-RT CompactPCI Serial PSI5-ECU-1 card @@ -20659,6 +20810,7 @@ 0005 ExaNIC X40 0006 ExaNIC X10-HPT 0007 ExaNIC X40 + 0008 ExaNIC V5P 1cf7 Subspace Dynamics 1d00 Pure Storage 1d0f Amazon.com, Inc. @@ -20774,6 +20926,9 @@ 2020 DC-390 690c 690c dc29 DC290 +1de5 Eideticom, Inc + 1000 IO Memory Controller + 2000 NoLoad Hardware Development Kit # nee Tumsan Oy 1fc0 Ascom (Finland) Oy 0300 E2200 Dual E1/Rawpipe Card @@ -20808,6 +20963,7 @@ 0000 3014 10-Giga TOE Dual Port CX4 Low Profile SmartNIC 4010 TN4010 Clean SROM 4020 TN9030 10GbE CX4 Ethernet Adapter + 180c 2040 Mustang-200 10GbE Ethernet Adapter 4022 TN9310 10GbE SFP+ Ethernet Adapter 1043 8709 XG-C100F 10GbE SFP+ Ethernet Adapter 1186 4d00 DXE-810S 10GbE SFP+ Ethernet Adapter @@ -21616,6 +21772,7 @@ 17aa 21cf ThinkPad T520 0150 Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller 1043 84ca P8 series motherboard + 1458 d000 Ivy Bridge GT1 [HD Graphics] 15d9 0624 X9SCM-F Motherboard 1849 0150 Motherboard 0151 Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port @@ -22123,6 +22280,7 @@ 0960 80960RP (i960RP) Microprocessor/Bridge 0962 80960RM (i960RM) Bridge 0964 80960RP (i960RP) Microprocessor/Bridge + 0a03 Haswell-ULT Thermal Subsystem 0a04 Haswell-ULT DRAM Controller 17aa 2214 ThinkPad X240 0a06 Haswell-ULT Integrated Graphics Controller @@ -22135,6 +22293,17 @@ 0a2a Haswell-ULT Integrated Graphics Controller 0a2e Haswell-ULT Integrated Graphics Controller 0a53 DC P3520 SSD + 0a54 Express Flash NVMe P4500 + 1028 1fe1 Express Flash NVMe 1TB 2.5" U.2 (P4500) + 1028 1fe2 Express Flash NVMe 2TB 2.5" U.2 (P4500) + 1028 1fe3 Express Flash NVMe 4TB 2.5" U.2 (P4500) + 1028 1fe4 Express Flash NVMe 4TB HHHL AIC (P4500) + 0a55 Express Flash NVMe P4600 + 1028 1fe5 Express Flash NVMe 1.6TB 2.5" U.2 (P4600) + 1028 1fe6 Express Flash NVMe 2TB 2.5" U.2 (P4600) + 1028 1fe7 Express Flash NVMe 3.2TB 2.5" U.2 (P4600) + 1028 1fe8 Express Flash NVMe 2.0TB HHHL AIC (P4600) + 1028 1fe9 Express Flash NVMe 4.0TB HHHL AIC (P4600) 0be0 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 0be1 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 105b 0d7c D270S/D250S Motherboard @@ -23269,7 +23438,7 @@ 8086 011a Ethernet Converged Network Adapter X520-4 8086 011b Ethernet Converged Network Adapter X520-4 8086 011c Ethernet Converged Network Adapter X520-4 - 154c XL710/X710 Virtual Function + 154c Ethernet Virtual Function 700 Series 154d Ethernet 10G 2P X520 Adapter 8086 7b11 10GbE 2P X520 Adapter 1557 82599 10 Gigabit Network Connection @@ -23312,7 +23481,7 @@ 156d DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013] 156f Ethernet Connection I219-LM 1570 Ethernet Connection I219-V - 1571 XL710/X710 Virtual Function + 1571 Ethernet Virtual Function 700 Series 1572 Ethernet Controller X710 for 10GbE SFP+ 1028 0000 Ethernet 10G X710 rNDC 1028 1f99 Ethernet 10G 4P X710/I350 rNDC @@ -23403,6 +23572,7 @@ 8086 00a0 Ethernet Converged Network Adapter X710-T4 8086 1003 Ethernet Converged Network Adapter X710-T 158a Ethernet Controller XXV710 for 25GbE backplane + 8086 000a Ethernet 25G 2P XXV710 Mezz 158b Ethernet Controller XXV710 for 25GbE SFP28 8086 0000 Ethernet Network Adapter XXV710 8086 0001 Ethernet Network Adapter XXV710-2 @@ -23413,6 +23583,7 @@ 8086 0006 Ethernet Network Adapter OCP XXV710-2 8086 0007 Ethernet Network Adapter OCP XXV710-1 8086 0008 Ethernet Network Adapter OCP XXV710-1 + 8086 0009 Ethernet 25G 2P XXV710 Adapter 8086 4001 Ethernet Network Adapter XXV710-2 15a0 Ethernet Connection (2) I218-LM 15a1 Ethernet Connection (2) I218-V @@ -23464,6 +23635,7 @@ 15d6 Ethernet Connection (5) I219-V 15d7 Ethernet Connection (4) I219-LM 15d8 Ethernet Connection (4) I219-V + 17aa 2247 ThinkPad T570 17aa 224f ThinkPad X1 Carbon 5th Gen 15d9 JHL6340 Thunderbolt 3 NHI (C step) [Alpine Ridge 2C 2016] 15da JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] @@ -23529,9 +23701,10 @@ 190f Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1910 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1911 Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model + 17aa 2247 ThinkPad T570 17aa 224f ThinkPad X1 Carbon 5th Gen 1912 HD Graphics 530 - 1916 HD Graphics 520 + 1916 Skylake GT2 [HD Graphics 520] 1028 06f3 Latitude 3570 1918 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1919 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit @@ -24017,6 +24190,7 @@ 2018 Sky Lake-E M2PCI Registers 201a Sky Lake-E Non-Transparent Bridge Registers 201c Sky Lake-E Non-Transparent Bridge Registers + 2020 Sky Lake-E DMI3 Registers 2021 Sky Lake-E CBDMA Registers 2024 Sky Lake-E MM/Vt-d Configuration Registers 2030 Sky Lake-E PCI Express Root Port A @@ -24662,7 +24836,7 @@ 8086 a000 D865PERL mainboard 8086 e000 D865PERL mainboard 8086 e001 Desktop Board D865GBF - 8086 e002 SoundMax Intergrated Digital Audio + 8086 e002 SoundMax Integrated Digital Audio 24d6 82801EB/ER (ICH5/ICH5R) AC'97 Modem Controller 103c 006a NX9500 24d7 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 @@ -25659,7 +25833,7 @@ 2822 SATA Controller [RAID mode] 1028 020d Inspiron 530 103c 2a6f Asus IPIBL-LB Motherboard - 1043 8277 P5K PRO Motherboard + 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] 2823 C610/X99 series chipset sSATA Controller [RAID mode] 2824 82801HB (ICH8) 4 port SATA Controller [AHCI mode] 1043 81ec P5B @@ -25834,7 +26008,7 @@ 284b 82801H (ICH8 Family) HD Audio Controller 1025 011f Realtek ALC268 audio codec 1025 0121 Aspire 5920G - 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theather) + 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theater) 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 1028 01f9 Latitude D630 @@ -25889,14 +26063,14 @@ 1028 0210 PowerEdge T300 onboard SATA Controller 1028 0211 Optiplex 755 1028 023c PowerEdge R200 onboard SATA Controller - 1043 8277 P5K PRO Motherboard *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Nov 15 12:23:02 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F11AADDBAF4; Wed, 15 Nov 2017 12:23:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7680068FF6; Wed, 15 Nov 2017 12:23:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFCN1HX044359; Wed, 15 Nov 2017 12:23:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFCN1HU044358; Wed, 15 Nov 2017 12:23:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711151223.vAFCN1HU044358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 15 Nov 2017 12:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325849 - stable/10/share/misc X-SVN-Group: stable-10 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/10/share/misc X-SVN-Commit-Revision: 325849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 12:23:03 -0000 Author: bapt Date: Wed Nov 15 12:23:01 2017 New Revision: 325849 URL: https://svnweb.freebsd.org/changeset/base/325849 Log: MFC r325737: Update to 2017.10.21 Modified: stable/10/share/misc/pci_vendors Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/pci_vendors ============================================================================== --- stable/10/share/misc/pci_vendors Wed Nov 15 12:22:56 2017 (r325848) +++ stable/10/share/misc/pci_vendors Wed Nov 15 12:23:01 2017 (r325849) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.09.01 -# Date: 2017-09-01 03:15:02 +# Version: 2017.10.21 +# Date: 2017-10-21 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -79,18 +79,18 @@ 0b0b Rhino Equipment Corp. 0105 R1T1 0205 R4FXO - 0206 RCB4FXO 4-channel FXO analog telphony card + 0206 RCB4FXO 4-channel FXO analog telephony card 0305 R4T1 0405 R8FXX - 0406 RCB8FXX 8-channel modular analog telphony card + 0406 RCB8FXX 8-channel modular analog telephony card 0505 R24FXX - 0506 RCB24FXS 24-Channel FXS analog telphony card + 0506 RCB24FXS 24-Channel FXS analog telephony card 0605 R2T1 0705 R24FXS - 0706 RCB24FXO 24-Channel FXO analog telphony card + 0706 RCB24FXO 24-Channel FXO analog telephony card 0905 R1T3 Single T3 Digital Telephony Card - 0906 RCB24FXX 24-channel modular analog telphony card - 0a06 RCB672FXX 672-channel modular analog telphony card + 0906 RCB24FXX 24-channel modular analog telephony card + 0a06 RCB672FXX 672-channel modular analog telephony card 0e11 Compaq Computer Corporation 0001 PCI to EISA Bridge 0002 PCI to ISA Bridge @@ -251,6 +251,9 @@ 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter + 8086 352d Integrated RAID Module RMSP3AD160F + 8086 9460 RAID Controller RSP3TD160F + 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -260,9 +263,15 @@ 1d49 0601 ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter 1d49 0603 ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter + 8086 352e Integrated RAID Module RMSP3CD080F + 8086 352f Integrated RAID Module RMSP3HD080E + 8086 9461 RAID Controller RSP3DD080F 0017 MegaRAID Tri-Mode SAS3408 1d49 0500 ThinkSystem RAID 530-8i PCIe 12Gb Adapter 1d49 0502 ThinkSystem RAID 530-8i Dense Adapter + 8086 3528 Integrated RAID RMSP3LD060 + 8086 3529 Integrated RAID RMSP3LD060 + 8086 9441 RAID Controller RSP3WD080E 001b MegaRAID Tri-Mode SAS3504 1d49 0605 ThinkSystem RAID 930-4i 2GB Flash Flex Adapter 001c MegaRAID Tri-Mode SAS3404 @@ -586,9 +595,12 @@ 1028 1fd3 HBA330 MMZ 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) + 8086 3530 Integrated RAID Module RMSP3JD160J 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA + 8086 3000 RAID Controller RSP3QD160J + 8086 3020 RAID Controller RSP3GD016J 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA @@ -614,6 +626,9 @@ 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00d3 MegaRAID Tri-Mode SAS3716W + 02b0 Virtual Endpoint on PCIe Switch + 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter + 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter 0407 MegaRAID 1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller @@ -904,6 +919,7 @@ 1043 836c M4A785TD Motherboard 1043 8410 M4A89GTD PRO/USB3 Motherboard 1043 841b M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 1179 ff50 Satellite P305D-S8995E 1458 a022 GA-MA770-DS3rev2.0 Motherboard 17f2 5000 KI690-AM2 Motherboard @@ -914,6 +930,7 @@ 103c 280a DC5750 Microtower 1043 82ef M3A78-EH Motherboard 1043 8389 M4A785TD Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 1179 ff50 Satellite P305D-S8995E 1458 4385 GA-MA770-DS3rev2.0 Motherboard 1462 7368 K9AG Neo2 @@ -965,14 +982,17 @@ 4390 SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode] 1043 82ef M3A78-EH Motherboard 1043 8389 M4A785TD Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 1458 b002 GA-MA770-DS3rev2.0 Motherboard 1849 4390 Motherboard (one of many) 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 4392 SB7x0/SB8x0/SB9x0 SATA Controller [Non-RAID5 mode] + 105b 0e13 N15235/A74MX mainboard / AMD SB700 4393 SB7x0/SB8x0/SB9x0 SATA Controller [RAID5 mode] 4394 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] 4395 SB8x0/SB9x0 SATA Controller [Storage mode] @@ -981,6 +1001,7 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller @@ -988,25 +1009,30 @@ 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4398 SB7x0 USB OHCI1 Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 15d9 a811 H8DGU 4399 SB7x0/SB8x0/SB9x0 USB OHCI2 Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 439c SB7x0/SB8x0/SB9x0 IDE Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard + 105b 0e13 N15235/A74MX mainboard / AMD SB700 439d SB7x0/SB8x0/SB9x0 LPC host controller 1019 2120 A785GM-M 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO + 105b 0e13 N15235/A74MX mainboard / AMD SB700 174b 1001 PURE Fusion Mini 43a0 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0) 43a1 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 1) @@ -1574,6 +1600,7 @@ 103c 8006 FirePro M4170 17aa 3643 Radeon R7 A360 6605 Opal PRO [Radeon R7 M260] + 103c 2259 FirePro M4150 6606 Mars XTX [Radeon HD 8790M] 1028 0684 FirePro W4170M 6607 Mars LE [Radeon HD 8530M / R5 M240] @@ -1637,12 +1664,13 @@ 1462 2938 Radeon R9 360 OEM 1462 3271 Radeon R9 360 OEM 1682 7360 Radeon R7 360 - 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430] + 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] 1028 05ea Radeon HD 8670M 1028 06bf Radeon R5 M335 103c 1970 Radeon HD 8670M 103c 80be Radeon R5 M330 103c 8136 Radeon R5 M330 + 103c 8329 Radeon R7 M520 17aa 3804 Radeon R5 M330 17aa 3809 Radeon R5 M330 17aa 381a Radeon R5 M430 @@ -2164,6 +2192,7 @@ # GV-R928XOC-3GD 1458 3001 Tahiti XTL [Radeon R9 280X OC] 1462 2774 MSI R7970 TF 3GD5/OC BE + 1682 3001 Tahiti XTL [Radeon R9 280X] 1682 3211 Double D HD 7970 Black Edition # FX-797A-TNBC 1682 3213 HD 7970 Black Edition @@ -2271,7 +2300,13 @@ 67e8 Baffin [Polaris11] 67e9 Baffin [Polaris11] 67eb Baffin [Polaris11] - 67ef Baffin [Radeon RX 460] + 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/560] + 106b 0160 Radeon Pro 460 + 106b 0166 Radeon Pro 455 + 106b 0167 Radeon Pro 450 + 106b 0179 Radeon Pro 560 + 1642 1727 Polaris 21 XL [Radeon RX 560D] + 1682 956d Polaris 21 XL [Radeon RX 560D] 67ff Baffin [Radeon RX 560] 6800 Wimbledon XT [Radeon HD 7970M] 1002 0124 Radeon HD 7970M @@ -3120,8 +3155,9 @@ 7910 RS690 Host Bridge 1179 ff50 Satellite P305D-S8995E 17f2 5000 KI690-AM2 Motherboard - 7911 RS690 Host Bridge - 7912 RS690 PCI to PCI Bridge (Internal gfx) + 7911 RS690/RS740 Host Bridge + 1002 7910 RS690/RS740 Host Bridge + 7912 RS690/RS740 PCI to PCI Bridge (Internal gfx) 7913 RS690 PCI to PCI Bridge (PCI Express Graphics Port 0) 7915 RS690 PCI to PCI Bridge (PCI Express Port 1) 7916 RS690 PCI to PCI Bridge (PCI Express Port 2) @@ -3146,6 +3182,7 @@ 7941 RS600 [Radeon Xpress 1250] 7942 RS600M [Radeon Xpress 1250] 796e RS740 [Radeon 2100] + 105b 0e13 N15235/A74MX mainboard 9400 R600 [Radeon HD 2900 PRO/XT] 1002 2552 Radeon HD 2900 XT 1002 3000 Radeon HD 2900 PRO @@ -3363,6 +3400,7 @@ 9840 Kabini HDMI/DP Audio 9850 Mullins [Radeon R3 Graphics] 9851 Mullins [Radeon R4/R5 Graphics] + 1179 f928 Beema [Radeon R5 Graphics] 9852 Mullins [Radeon R2 Graphics] 9853 Mullins [Radeon R2 Graphics] 9854 Mullins [Radeon R3E Graphics] @@ -4004,8 +4042,23 @@ 1437 Liverpool I/O Memory Management Unit 1438 Liverpool Processor Root Port 1439 Family 16h Processor Functions 5:1 + 1450 Family 17h (Models 00h-0fh) Root Complex + 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit + 1452 Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge + 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B + 1456 Family 17h (Models 00h-0fh) Platform Security Processor + 1457 Family 17h (Models 00h-0fh) HD Audio Controller 145b Zeppelin Non-Transparent Bridge - 145c USB3 Host Controller + 145c Family 17h (Models 00h-0fh) USB 3.0 Host Controller + 145f USB 3.0 Host controller + 1460 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 + 1461 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 + 1462 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 + 1463 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3 + 1464 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4 + 1465 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 + 1466 Family 17h (Models 00h-0fh) Data Fabric Device 18h Function 6 + 1467 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4090,7 +4143,9 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) - 43bb USB 3.1 XHCI Controller + 43b4 300 Series Chipset PCIe Port + 43b7 300 Series Chipset SATA Controller + 43bb 300 Series Chipset USB 3.1 xHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4545,6 +4600,7 @@ 0533 MGA G200EH 103c 3381 iLO4 0534 G200eR2 + 0536 Integrated Matrox G200eW3 Graphics Controller 0538 G200eH 1590 00e4 iLO5 VGA 0540 M91XX @@ -4585,7 +4641,7 @@ 102b 0f84 Millennium G550 Dual Head DDR 32Mb 102b 1e41 Millennium G550 102b 2300 Millennium G550 LP PCIE - 2537 Millenium P650/P750 + 2537 Millennium P650/P750 102b 1820 Millennium P750 64MB 102b 1830 Millennium P650 64MB 102b 1850 RAD2mp @@ -4593,7 +4649,7 @@ 102b 1880 Sono S10 102b 1c10 QID 128MB 102b 2811 Millennium P650 Low-profile PCI 64MB - 102b 2821 Millenium P650 Low-profile PCI + 102b 2821 Millennium P650 Low-profile PCI 102b 2841 RAD PCI 102b 2851 Spectrum PCI 102b 2871 EpicA TC2 @@ -4607,7 +4663,7 @@ 102b 3051 RG-400SL 102b 3061 Extio F1420 102b 3081 Extio F1240 - 2538 Millenium P650 PCIe + 2538 Millennium P650 PCIe 102b 0847 RAD PCIe 102b 08c7 Millennium P650 PCIe 128MB 102b 0907 Millennium P650 PCIe 64MB @@ -4615,23 +4671,23 @@ 102b 0987 ATC PCIe 4MP 102b 1047 Millennium P650 LP PCIe 128MB 102b 1087 Millennium P650 LP PCIe 64MB - 102b 1801 Millenium P650 PCIe x1 + 102b 1801 Millennium P650 PCIe x1 102b 2538 Parhelia APVe 102b 3007 QID Low-profile PCIe 102b 3087 Aurora VX3mp 102b 30c7 QID LP PCIe 2539 Millennium P690 - 102b 0040 Millenium P690 PCIe x16 + 102b 0040 Millennium P690 PCIe x16 102b 0042 ONYX 102b 0043 SPECTRA - 102b 0080 Millenium P690 Plus LP PCIe x16 - 102b 0081 Millenium P690 LP PCIe x16 + 102b 0080 Millennium P690 Plus LP PCIe x16 + 102b 0081 Millennium P690 LP PCIe x16 102b 0082 RAD LPX PCIe x16 - 102b 00c0 Millenium P690 Plus LP PCI - 102b 00c2 Millenium P690 LP PCI + 102b 00c0 Millennium P690 Plus LP PCI + 102b 00c2 Millennium P690 LP PCI 102b 00c3 RAD LPX PCI - 102b 0101 Millenium P690 PCI - 102b 0140 Millenium P690 LP PCIe x1 + 102b 0101 Millennium P690 PCI + 102b 0140 Millennium P690 LP PCIe x1 102b 0180 Display Wall IP Decode 128 MB 4164 Morphis QxT frame grabber 43b4 Morphis Qxt encoding engine @@ -5146,11 +5202,9 @@ 3308 Integrated Lights-Out Standard MS Watchdog Timer 103c 330e iLO3 103c 3381 iLO4 - 402f PCIe Root Port 4030 zx2 System Bus Adapter 4031 zx2 I/O Controller 4037 PCIe Local Bus Adapter - 403b PCIe Root Port 103e Solliday Engineering 103f Synopsys/Logic Modeling Group 1040 Accelgraphics Inc. @@ -5167,7 +5221,6 @@ 0675 1704 ISDN Adapter (PCI Bus, D, C) 0675 1707 ISDN Adapter (PCI Bus, DV, W) 10cf 105e ISDN Adapter (PCI Bus, DV, W) - 13a0 Transformer Book T101HA-GR030R # Should be 1022:9602 9602 AMD RS780/RS880 PCI to PCI bridge (int gfx) 1043 83a2 M4A785TD Motherboard @@ -6132,6 +6185,7 @@ 1077 015e QLE2564 PCI Express to 8Gb FC Quad Channel 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine 1590 00fc StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter + 2971 ISP2684 3022 ISP4022-based Ethernet NIC 3032 ISP4032-based Ethernet IPv6 NIC 4010 ISP4010-based iSCSI TOE HBA @@ -9234,19 +9288,19 @@ 0533 C67 [GeForce 7000M / nForce 610M] 053a C68 [GeForce 7050 PV / nForce 630a] 053b C68 [GeForce 7050 PV / nForce 630a] - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 053e C68 [GeForce 7025 / nForce 630a] 0541 MCP67 Memory Controller 0542 MCP67 SMBus - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 0543 MCP67 Co-processor 0547 MCP67 Memory Controller - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 1849 0547 ALiveNF7G-HDready 0548 MCP67 ISA Bridge 1043 8308 M2N68-AM Motherboard 054c MCP67 Ethernet - 1043 8308 M2N68-AM Motherbord + 1043 8308 M2N68-AM Motherboard 1849 054c ALiveNF7G-HDready, MCP67 Gigabit Ethernet 054d MCP67 Ethernet 054e MCP67 Ethernet @@ -9936,7 +9990,7 @@ 0dc0 GF106 [GeForce GT 440] 0dc4 GF106 [GeForce GTS 450] 0dc5 GF106 [GeForce GTS 450 OEM] - 0dc6 GF106 [GeForce GTS 450] + 0dc6 GF106 [GeForce GTS 450 OEM] 0dcd GF106M [GeForce GT 555M] 0dce GF106M [GeForce GT 555M] 0dd1 GF106M [GeForce GTX 460M] @@ -9956,7 +10010,7 @@ 0de5 GF108 [GeForce GT 530] 0de7 GF108 [GeForce GT 610] 0de8 GF108M [GeForce GT 620M] - 0de9 GF108M [GeForce GT 630M] + 0de9 GF108M [GeForce GT 620M/630M/635M/640M LE] 1025 0692 GeForce GT 620M 1025 0725 GeForce GT 620M 1025 0728 GeForce GT 620M @@ -10177,7 +10231,7 @@ 1086 GF110 [GeForce GTX 570 Rev. 2] 1087 GF110 [GeForce GTX 560 Ti 448 Cores] 1088 GF110 [GeForce GTX 590] - 1089 GF110 [GeForce GTX 580] + 1089 GF110 [GeForce GTX 580 Rev. 2] 108b GF110 [GeForce GTX 580] 108e GF110GL [Tesla C2090] 1091 GF110GL [Tesla M2090] @@ -10301,12 +10355,31 @@ 1028 065e GeForce 820M 1028 0662 GeForce 820M 1028 068d GeForce 820M + 1028 06ad GeForce 820M + 1028 06ae GeForce 820M + 1028 06af GeForce 820M + 1028 06b0 GeForce 820M + 1028 06c0 GeForce 820M 1028 06c1 GeForce 820M 103c 18ef GeForce GT 630M 103c 18f9 GeForce GT 630M 103c 18fb GeForce GT 630M 103c 18fd GeForce GT 630M 103c 18ff GeForce GT 630M + 103c 218a GeForce 820M + 103c 21bb GeForce 820M + 103c 21bc GeForce 820M + 103c 220e GeForce 820M + 103c 2210 GeForce 820M + 103c 2212 GeForce 820M + 103c 2214 GeForce 820M + 103c 2218 GeForce 820M + 103c 225b GeForce 820M + 103c 225d GeForce 820M + 103c 226d GeForce 820M + 103c 226f GeForce 820M + 103c 22d2 GeForce 820M + 103c 22d9 GeForce 820M 103c 2335 GeForce 820M 103c 2337 GeForce 820M 103c 2aef GeForce GT 720A @@ -10344,6 +10417,7 @@ 1043 228a GeForce 820M 1043 232a GeForce 820M 1043 233a GeForce 820M + 1043 235a GeForce 820M 1043 236a GeForce 820M 1043 238a GeForce 820M 1043 8595 GeForce GT 720M @@ -10359,6 +10433,8 @@ 1043 8643 GeForce 820M 1043 864c GeForce 820M 1043 8652 GeForce 820M + 1043 8660 GeForce 820M + 1043 8661 GeForce 820M 105b 0dac GeForce GT 720M 105b 0dad GeForce GT 720M 105b 0ef3 GeForce GT 720M @@ -10433,8 +10509,10 @@ 17aa 309c GeForce GT 720A 17aa 30b4 GeForce 820A 17aa 30b7 GeForce 720A + 17aa 30e4 GeForce 820A 17aa 361b GeForce 820A 17aa 361c GeForce 820A + 17aa 361d GeForce 820A 17aa 3656 GeForce GT 620M 17aa 365a GeForce 705M 17aa 365e GeForce 800M @@ -10644,10 +10722,10 @@ 1282 GK208 [GeForce GT 640 Rev. 2] 1284 GK208 [GeForce GT 630 Rev. 2] 1286 GK208 [GeForce GT 720] - 1287 GK208 [GeForce GT 730] - 1288 GK208 [GeForce GT 720] + 1287 GK208B [GeForce GT 730] + 1288 GK208B [GeForce GT 720] 1289 GK208 [GeForce GT 710] - 128b GK208 [GeForce GT 710B] + 128b GK208B [GeForce GT 710] 1290 GK208M [GeForce GT 730M] 103c 2afa GeForce GT 730A 103c 2b04 GeForce GT 730A @@ -10671,11 +10749,12 @@ 17aa 367c GeForce 710A 1296 GK208M [GeForce 825M] 1298 GK208M [GeForce GT 720M] - 1299 GK208M [GeForce 920M] + 1299 GK208BM [GeForce 920M] 17aa 30bb GeForce 920A + 17aa 30df GeForce 920A 17aa 36a7 GeForce 920A 17aa 36af GeForce 920M - 129a GK208M [GeForce 910M] + 129a GK208BM [GeForce 910M] 12a0 GK208 12b9 GK208GLM [Quadro K610M] 12ba GK208GLM [Quadro K510M] @@ -10692,6 +10771,7 @@ 1349 GM108M [GeForce 930M] 134b GM108M [GeForce 940MX] 134d GM108M [GeForce 940MX] + 17aa 2248 ThinkPad T570 134e GM108M [GeForce 930MX] 134f GM108M [GeForce 920MX] 137a GM108GLM [Quadro K620M / Quadro M500M] @@ -10741,7 +10821,7 @@ 13d7 GM204M [GeForce GTX 980M] 13d8 GM204M [GeForce GTX 970M] 13d9 GM204M [GeForce GTX 965M] - 13da GM204M [GeForce GTX 980] + 13da GM204M [GeForce GTX 980 Mobile] 13e7 GM204 [GeForce GTX 980 Engineering Sample] 13f0 GM204GL [Quadro M5000] 13f1 GM204GL [Quadro M4000] @@ -10754,7 +10834,7 @@ 13fb GM204GLM [Quadro M5500] 1401 GM206 [GeForce GTX 960] 1402 GM206 [GeForce GTX 950] - 1406 GM206 [GeForce GTX 960] + 1406 GM206 [GeForce GTX 960 OEM] 1407 GM206 [GeForce GTX 750 v2] 1427 GM206M [GeForce GTX 965M] 1430 GM206GL [Quadro M2000] @@ -10764,7 +10844,7 @@ 15f1 GP100GL 15f7 GP100GL [Tesla P100 PCIe 12GB] 15f8 GP100GL [Tesla P100 PCIe 16GB] - 15f9 GP100GL [Tesla P100 SMX2 16GB] + 15f9 GP100GL [Tesla P100 SXM2 16GB] 1617 GM204M [GeForce GTX 980M] 1618 GM204M [GeForce GTX 970M] 1619 GM204M [GeForce GTX 965M] @@ -10794,14 +10874,23 @@ 1b87 GP104 [P104-100] 1ba0 GP104M [GeForce GTX 1080 Mobile] 1ba1 GP104M [GeForce GTX 1070 Mobile] + 1458 1651 GeForce GTX 1070 Max-Q + 1462 11e8 GeForce GTX 1070 Max-Q + 1462 11e9 GeForce GTX 1070 Max-Q + 1558 9501 GeForce GTX 1070 Max-Q + 1bad GP104 [GeForce GTX 1070 Engineering Sample] 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL [Quadro P4000] 1bb3 GP104GL [Tesla P4] 1bb4 GP104GL + 1bb5 GP104GLM [Quadro P5200 Mobile] 1bb6 GP104GLM [Quadro P5000 Mobile] 1bb7 GP104GLM [Quadro P4000 Mobile] + 1462 11e9 Quadro P4000 Max-Q 1bb8 GP104GLM [Quadro P3000 Mobile] 1be0 GP104M [GeForce GTX 1080 Mobile] + 1028 07c0 GeForce GTX 1080 Max-Q + 1458 355b GeForce GTX 1080 Max-Q 1be1 GP104M [GeForce GTX 1070 Mobile] 1c00 GP106 1c01 GP106 @@ -10810,9 +10899,13 @@ 1c07 GP106 [P106-100] 1c09 GP106 [P106-090] 1c20 GP106M [GeForce GTX 1060 Mobile] + 17aa 39b9 GeForce GTX 1060 Max-Q 3GB + 1c21 GP106M [GeForce GTX 1050 Ti Mobile] + 1c22 GP106M [GeForce GTX 1050 Mobile] 1c30 GP106GL [Quadro P2000] 1c35 GP106 - 1c60 GP106M [GeForce GTX 1060 Mobile] + 1c60 GP106M [GeForce GTX 1060 Mobile 6GB] + 103c 8390 GeForce GTX 1060 Max-Q 6GB 1c61 GP106M [GeForce GTX 1050 Ti Mobile] 1c62 GP106M [GeForce GTX 1050 Mobile] 1c70 GP106GL @@ -10831,6 +10924,8 @@ 1d01 GP108 [GeForce GT 1030] 1d10 GP108M [GeForce MX150] 1d81 GV100 + 1db1 GV100 [Tesla V100 SXM2] + 1db4 GV100 [Tesla V100 PCIe] 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) 103c 1934 FlexFabric 20Gb 2-port 650M Adapter @@ -10888,6 +10983,9 @@ f111 Saturn-X LightPulse Fibre Channel Host Adapter f112 Saturn-X LightPulse Fibre Channel Host Adapter f180 LPSe12002 EmulexSecure Fibre Channel Adapter + f400 LPe36000 Fibre Channel Host Adapter [Prism] + 10df f401 LPe35000 Fibre Channel Host Adapter [Prism] + 10df f402 LPe35000 Fibre Channel Host Adapter [Prism] f700 LP7000 Fibre Channel Host Adapter f701 LP7000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2) f800 LP8000 Fibre Channel Host Adapter @@ -11026,8 +11124,8 @@ 8129 RTL-8129 10ec 8129 RT8129 Fast Ethernet Adapter 11ec 8129 RTL8111/8168 PCIe Gigabit Ethernet (misconfigured) - 8136 RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller - 103c 1985 Pavilion 17-e163sg Notebook PC + 8136 RTL8101/2/6E PCI Express Fast Ethernet controller + 103c 1985 RTL8106E on Pavilion 17-e163sg Notebook PC 103c 2a8c Compaq 500B Microtower 103c 2ab1 Pavilion p6774 103c 30cc Pavilion dv6700 @@ -11087,6 +11185,7 @@ 8e2e 7100 KF-230TX/2 a0a0 0007 ALN-325C 8167 RTL-8110SC/8169SC Gigabit Ethernet + 105b 0e10 RTL-8110SC-GR on a N15235/A74MX mainboard 1458 e000 GA-MA69G-S3H Motherboard 1462 235c P965 Neo MS-7235 mainboard 1462 236c 945P Neo3-F motherboard @@ -14864,6 +14963,7 @@ 12d7 Biotronic SRL 12d8 Pericom Semiconductor 01a7 7C21P100 2-port PCI-X to PCI-X Bridge + 2608 PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch 400a PI7C9X442SL PCI Express Bridge Port 400e PI7C9X442SL USB OHCI Controller 400f PI7C9X442SL USB EHCI Controller @@ -15218,7 +15318,7 @@ 0040 QSC-200/300 0050 ESC-100D 0060 ESC-100M - 00f0 MPAC-100 Syncronous Serial Card (Zilog 85230) + 00f0 MPAC-100 Synchronous Serial Card (Zilog 85230) 0170 QSCLP-100 0180 DSCLP-100 0190 SSCLP-100 @@ -15687,6 +15787,7 @@ 1043 838e Virtuoso 66 (Xonar DS) 1043 8428 Virtuoso 100 (Xonar Xense) 1043 8467 CMI8786 (Xonar DG) + 1043 8521 CMI8786 (Xonar DGX) 1043 85f4 Virtuoso 100 (Xonar Essence STX II) 13f6 8782 PCI 2.0 HD Audio 13f6 ffff CMI8787-HG2PCI @@ -16176,6 +16277,13 @@ 50a2 T580-50A2 Unified Wire Ethernet Controller 50a3 T580-50A3 Unified Wire Ethernet Controller 50a4 T540-50A4 Unified Wire Ethernet Controller + 50a5 T522-50A5 Unified Wire Ethernet Controller + 50a6 T522-50A6 Unified Wire Ethernet Controller + 50a7 T580-50A7 Unified Wire Ethernet Controller + 50a8 T580-50A8 Unified Wire Ethernet Controller + 50a9 T580-50A9 Unified Wire Ethernet Controller + 50aa T580-50AA Unified Wire Ethernet Controller + 50ab T520-50AB Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16231,6 +16339,13 @@ 54a2 T580-50A2 Unified Wire Ethernet Controller 54a3 T580-50A3 Unified Wire Ethernet Controller 54a4 T540-50A4 Unified Wire Ethernet Controller + 54a5 T522-50A5 Unified Wire Ethernet Controller + 54a6 T522-50A6 Unified Wire Ethernet Controller + 54a7 T580-50A7 Unified Wire Ethernet Controller + 54a8 T580-50A8 Unified Wire Ethernet Controller + 54a9 T580-50A9 Unified Wire Ethernet Controller + 54aa T580-50AA Unified Wire Ethernet Controller + 54ab T520-50AB Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16286,6 +16401,11 @@ 55a2 T580-50A2 Unified Wire Storage Controller 55a3 T580-50A3 Unified Wire Storage Controller 55a4 T540-50A4 Unified Wire Storage Controller + 55a5 T522-50A5 Unified Wire Storage Controller + 55a6 T522-50A6 Unified Wire Storage Controller + 55a7 T580-50A7 Unified Wire Storage Controller + 55a8 T580-50A8 Unified Wire Storage Controller + 55a9 T580-50A9 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16341,6 +16461,13 @@ 56a2 T580-50A2 Unified Wire Storage Controller 56a3 T580-50A3 Unified Wire Storage Controller 56a4 T540-50A4 Unified Wire Storage Controller + 56a5 T522-50A5 Unified Wire Storage Controller + 56a6 T522-50A6 Unified Wire Storage Controller + 56a7 T580-50A7 Unified Wire Storage Controller + 56a8 T580-50A8 Unified Wire Storage Controller + 56a9 T580-50A9 Unified Wire Storage Controller + 56aa T580-50AA Unified Wire Storage Controller + 56ab T520-50AB Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16435,6 +16562,13 @@ 58a2 T580-50A2 Unified Wire Ethernet Controller [VF] 58a3 T580-50A3 Unified Wire Ethernet Controller [VF] 58a4 T540-50A4 Unified Wire Ethernet Controller [VF] + 58a5 T522-50A5 Unified Wire Ethernet Controller [VF] + 58a6 T522-50A6 Unified Wire Ethernet Controller [VF] + 58a7 T580-50A7 Unified Wire Ethernet Controller [VF] + 58a8 T580-50A8 Unified Wire Ethernet Controller [VF] + 58a9 T580-50A9 Unified Wire Ethernet Controller [VF] + 58aa T580-50AA Unified Wire Ethernet Controller [VF] + 58ab T520-50AB Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16453,6 +16587,7 @@ 6082 T6225-6082 Unified Wire Ethernet Controller 6083 T62100-6083 Unified Wire Ethernet Controller 6084 T64100-6084 Unified Wire Ethernet Controller + 6085 T6240-6085 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16471,6 +16606,7 @@ 6482 T6225-6082 Unified Wire Ethernet Controller 6483 T62100-6083 Unified Wire Ethernet Controller 6484 T64100-6084 Unified Wire Ethernet Controller + 6485 T6240-6085 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16489,6 +16625,7 @@ 6582 T6225-6082 Unified Wire Storage Controller 6583 T62100-6083 Unified Wire Storage Controller 6584 T64100-6084 Unified Wire Storage Controller + 6585 T6240-6085 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16507,6 +16644,7 @@ 6682 T6225-6082 Unified Wire Storage Controller 6683 T62100-6083 Unified Wire Storage Controller 6684 T64100-6084 Unified Wire Storage Controller + 6685 T6240-6085 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16525,6 +16663,7 @@ 6882 T6225-6082 Unified Wire Ethernet Controller [VF] 6883 T62100-6083 Unified Wire Ethernet Controller [VF] 6884 T64100-6084 Unified Wire Ethernet Controller [VF] + 6885 T6240-6085 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -17496,6 +17635,7 @@ 106b 0093 AirPort Extreme 106b 00d1 AirPort Extreme 106b 00e9 AirPort Extreme + 14e4 04d8 Pegatron UPWL6024 4357 BCM43225 802.11b/g/n 105b e021 T77H103.00 Wireless Half-size Mini PCIe Card 4358 BCM43227 802.11b/g/n @@ -18283,6 +18423,7 @@ 117c 0091 FastFrame NQ42 117c 0092 FastFrame NQ11 117c 0093 FastFrame NQ12 + 15b3 0006 Mellanox Technologies ConnectX-3 Pro Stand-up dual-port 40GbE MCX314A-BCCT 15b3 0078 ConnectX-3 Pro 10 GbE Dual Port KR Mezzanine Card 15b3 0079 ConnectX-3 Pro 40 GbE Dual Port QSFP+ Adapter 15b3 0080 ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter @@ -18297,6 +18438,8 @@ 1011 MT27600 [Connect-IB] 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] + 15b3 0003 Mellanox Technologies ConnectX-4 Stand-up single-port 40GbE MCX413A-BCAT + 15b3 0005 Mellanox Technologies ConnectX-4 Stand-up single-port 40GbE MCX415A-BCAT 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 15b3 0008 ConnectX-4 Stand-up dual-port 100GbE MCX416A-CCAT 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter @@ -18304,6 +18447,7 @@ 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0005 Mellanox Technologies ConnectX-4 Lx Stand-up single-port 40GbE MCX4131A-BCAT 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G @@ -19037,12 +19181,14 @@ 7016 AP470 48-Channel TTL Level Digital Input/Output Module 7017 AP323 16-bit, 20 or 40 Channel Analog Input Module 7018 AP408: 32-Channel Digital I/O Module + 7019 AP341 14-bit, 16-Channel Simultaneous Conversion Analog Input Module 701a AP220-16 12-Bit, 16-Channel Analog Output Module 701b AP231-16 16-Bit, 16-Channel Analog Output Module 7021 APA7-201 Reconfigurable Artix-7 FPGA module 48 TTL channels 7022 APA7-202 Reconfigurable Artix-7 FPGA module 24 RS485 channels 7023 APA7-203 Reconfigurable Artix-7 FPGA module 24 TTL & 12 RS485 channels 7024 APA7-204 Reconfigurable Artix-7 FPGA module 24 LVDS channels + 7027 AP418 16-Channel High Voltage Digital Input/Output Module 7042 AP482 Counter Timer Module with TTL Level Input/Output 7043 AP483 Counter Timer Module with TTL Level and RS422 Input/Output 7044 AP484 Counter Timer Module with RS422 Input/Output @@ -19451,6 +19597,7 @@ 1803 ProdaSafe GmbH 1805 Euresys S.A. 1809 Lumanate, Inc. +180c IEI Integration Corp 1813 Ambient Technologies Inc 4000 HaM controllerless modem 16be 0001 V9x HAM Data Fax Modem @@ -19892,11 +20039,12 @@ 1924 8012 SFN8522-R1 8000 Series 10G Adapter 1924 8013 SFN8042-R1 8000 Series 10/40G Adapter 1924 8014 SFN8542-R1 8000 Series 10/40G Adapter - 1924 8016 SFN8022-R2 8000 Series 10G Adapte + 1924 8016 SFN8022-R2 8000 Series 10G Adapter 1924 8017 SFN8522-R2 8000 Series 10G Adapter 1924 8018 SFN8042-R2 8000 Series 10/40G Adapter 1924 8019 SFN8542-R2 8000 Series 10/40G Adapter 1924 801a SFN8722-R1 8000 Series OCP 10G Adapter + 1924 801b SFN8522-R3 8000 Series 10G Adapter 1803 SFC9020 10G Ethernet Controller (Virtual Function) 1813 SFL9021 10GBASE-T Ethernet Controller (Virtual Function) 1903 SFC9120 10G Ethernet Controller (Virtual Function) @@ -20082,6 +20230,7 @@ # E2200, E2201, E2205 e091 Killer E220x Gigabit Ethernet Controller e0a1 Killer E2400 Gigabit Ethernet Controller + e0b1 Killer E2500 Gigabit Ethernet Controller 196a Sensory Networks Inc. 0101 NodalCore C-1000 Content Classification Accelerator 0102 NodalCore C-2000 Content Classification Accelerator @@ -20365,7 +20514,7 @@ 3003 ioMemory Mezzanine 1aee Caustic Graphics Inc. # nee Qumranet, Inc. -1af4 Red Hat, Inc +1af4 Red Hat, Inc. 1000 Virtio network device 1001 Virtio block device 1002 Virtio memory balloon @@ -20642,6 +20791,8 @@ 1cc7 Radian Memory Systems Inc. 0200 RMS-200 0250 RMS-250 +1ccf Zoom Corporation + 0001 TAC-2 Thunderbolt Audio Converter 1cd2 SesKion GmbH 0301 Simulyzer-RT CompactPCI Serial DIO-1 card 0302 Simulyzer-RT CompactPCI Serial PSI5-ECU-1 card @@ -20659,6 +20810,7 @@ 0005 ExaNIC X40 0006 ExaNIC X10-HPT 0007 ExaNIC X40 + 0008 ExaNIC V5P 1cf7 Subspace Dynamics 1d00 Pure Storage 1d0f Amazon.com, Inc. @@ -20774,6 +20926,9 @@ 2020 DC-390 690c 690c dc29 DC290 +1de5 Eideticom, Inc + 1000 IO Memory Controller + 2000 NoLoad Hardware Development Kit # nee Tumsan Oy 1fc0 Ascom (Finland) Oy 0300 E2200 Dual E1/Rawpipe Card @@ -20808,6 +20963,7 @@ 0000 3014 10-Giga TOE Dual Port CX4 Low Profile SmartNIC 4010 TN4010 Clean SROM 4020 TN9030 10GbE CX4 Ethernet Adapter + 180c 2040 Mustang-200 10GbE Ethernet Adapter 4022 TN9310 10GbE SFP+ Ethernet Adapter 1043 8709 XG-C100F 10GbE SFP+ Ethernet Adapter 1186 4d00 DXE-810S 10GbE SFP+ Ethernet Adapter @@ -21616,6 +21772,7 @@ 17aa 21cf ThinkPad T520 0150 Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller 1043 84ca P8 series motherboard + 1458 d000 Ivy Bridge GT1 [HD Graphics] 15d9 0624 X9SCM-F Motherboard 1849 0150 Motherboard 0151 Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port @@ -22123,6 +22280,7 @@ 0960 80960RP (i960RP) Microprocessor/Bridge 0962 80960RM (i960RM) Bridge 0964 80960RP (i960RP) Microprocessor/Bridge + 0a03 Haswell-ULT Thermal Subsystem 0a04 Haswell-ULT DRAM Controller 17aa 2214 ThinkPad X240 0a06 Haswell-ULT Integrated Graphics Controller @@ -22135,6 +22293,17 @@ 0a2a Haswell-ULT Integrated Graphics Controller 0a2e Haswell-ULT Integrated Graphics Controller 0a53 DC P3520 SSD + 0a54 Express Flash NVMe P4500 + 1028 1fe1 Express Flash NVMe 1TB 2.5" U.2 (P4500) + 1028 1fe2 Express Flash NVMe 2TB 2.5" U.2 (P4500) + 1028 1fe3 Express Flash NVMe 4TB 2.5" U.2 (P4500) + 1028 1fe4 Express Flash NVMe 4TB HHHL AIC (P4500) + 0a55 Express Flash NVMe P4600 + 1028 1fe5 Express Flash NVMe 1.6TB 2.5" U.2 (P4600) + 1028 1fe6 Express Flash NVMe 2TB 2.5" U.2 (P4600) + 1028 1fe7 Express Flash NVMe 3.2TB 2.5" U.2 (P4600) + 1028 1fe8 Express Flash NVMe 2.0TB HHHL AIC (P4600) + 1028 1fe9 Express Flash NVMe 4.0TB HHHL AIC (P4600) 0be0 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 0be1 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 105b 0d7c D270S/D250S Motherboard @@ -23269,7 +23438,7 @@ 8086 011a Ethernet Converged Network Adapter X520-4 8086 011b Ethernet Converged Network Adapter X520-4 8086 011c Ethernet Converged Network Adapter X520-4 - 154c XL710/X710 Virtual Function + 154c Ethernet Virtual Function 700 Series 154d Ethernet 10G 2P X520 Adapter 8086 7b11 10GbE 2P X520 Adapter 1557 82599 10 Gigabit Network Connection @@ -23312,7 +23481,7 @@ 156d DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013] 156f Ethernet Connection I219-LM 1570 Ethernet Connection I219-V - 1571 XL710/X710 Virtual Function + 1571 Ethernet Virtual Function 700 Series 1572 Ethernet Controller X710 for 10GbE SFP+ 1028 0000 Ethernet 10G X710 rNDC 1028 1f99 Ethernet 10G 4P X710/I350 rNDC @@ -23403,6 +23572,7 @@ 8086 00a0 Ethernet Converged Network Adapter X710-T4 8086 1003 Ethernet Converged Network Adapter X710-T 158a Ethernet Controller XXV710 for 25GbE backplane + 8086 000a Ethernet 25G 2P XXV710 Mezz 158b Ethernet Controller XXV710 for 25GbE SFP28 8086 0000 Ethernet Network Adapter XXV710 8086 0001 Ethernet Network Adapter XXV710-2 @@ -23413,6 +23583,7 @@ 8086 0006 Ethernet Network Adapter OCP XXV710-2 8086 0007 Ethernet Network Adapter OCP XXV710-1 8086 0008 Ethernet Network Adapter OCP XXV710-1 + 8086 0009 Ethernet 25G 2P XXV710 Adapter 8086 4001 Ethernet Network Adapter XXV710-2 15a0 Ethernet Connection (2) I218-LM 15a1 Ethernet Connection (2) I218-V @@ -23464,6 +23635,7 @@ 15d6 Ethernet Connection (5) I219-V 15d7 Ethernet Connection (4) I219-LM 15d8 Ethernet Connection (4) I219-V + 17aa 2247 ThinkPad T570 17aa 224f ThinkPad X1 Carbon 5th Gen 15d9 JHL6340 Thunderbolt 3 NHI (C step) [Alpine Ridge 2C 2016] 15da JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] @@ -23529,9 +23701,10 @@ 190f Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1910 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1911 Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model + 17aa 2247 ThinkPad T570 17aa 224f ThinkPad X1 Carbon 5th Gen 1912 HD Graphics 530 - 1916 HD Graphics 520 + 1916 Skylake GT2 [HD Graphics 520] 1028 06f3 Latitude 3570 1918 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1919 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit @@ -24017,6 +24190,7 @@ 2018 Sky Lake-E M2PCI Registers 201a Sky Lake-E Non-Transparent Bridge Registers 201c Sky Lake-E Non-Transparent Bridge Registers + 2020 Sky Lake-E DMI3 Registers 2021 Sky Lake-E CBDMA Registers 2024 Sky Lake-E MM/Vt-d Configuration Registers 2030 Sky Lake-E PCI Express Root Port A @@ -24662,7 +24836,7 @@ 8086 a000 D865PERL mainboard 8086 e000 D865PERL mainboard 8086 e001 Desktop Board D865GBF - 8086 e002 SoundMax Intergrated Digital Audio + 8086 e002 SoundMax Integrated Digital Audio 24d6 82801EB/ER (ICH5/ICH5R) AC'97 Modem Controller 103c 006a NX9500 24d7 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 @@ -25659,7 +25833,7 @@ 2822 SATA Controller [RAID mode] 1028 020d Inspiron 530 103c 2a6f Asus IPIBL-LB Motherboard - 1043 8277 P5K PRO Motherboard + 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] 2823 C610/X99 series chipset sSATA Controller [RAID mode] 2824 82801HB (ICH8) 4 port SATA Controller [AHCI mode] 1043 81ec P5B @@ -25834,7 +26008,7 @@ 284b 82801H (ICH8 Family) HD Audio Controller 1025 011f Realtek ALC268 audio codec 1025 0121 Aspire 5920G - 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theather) + 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theater) 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 1028 01f9 Latitude D630 @@ -25889,14 +26063,14 @@ 1028 0210 PowerEdge T300 onboard SATA Controller 1028 0211 Optiplex 755 1028 023c PowerEdge R200 onboard SATA Controller - 1043 8277 P5K PRO Motherboard *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Nov 15 14:35:43 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 941D2DDE7BD; Wed, 15 Nov 2017 14:35:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50B236D48B; Wed, 15 Nov 2017 14:35:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFEZgpp000376; Wed, 15 Nov 2017 14:35:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFEZgxx000375; Wed, 15 Nov 2017 14:35:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711151435.vAFEZgxx000375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Nov 2017 14:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325853 - stable/11/sys/i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/i386/i386 X-SVN-Commit-Revision: 325853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 14:35:43 -0000 Author: kib Date: Wed Nov 15 14:35:42 2017 New Revision: 325853 URL: https://svnweb.freebsd.org/changeset/base/325853 Log: MFC r325553: Remove useless DEBUG printfs in i386 sendsig() implementations. Modified: stable/11/sys/i386/i386/machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/i386/machdep.c ============================================================================== --- stable/11/sys/i386/i386/machdep.c Wed Nov 15 13:41:03 2017 (r325852) +++ stable/11/sys/i386/i386/machdep.c Wed Nov 15 14:35:42 2017 (r325853) @@ -444,9 +444,6 @@ osendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mas * Copy the sigframe out to the user's stack. */ if (copyout(&sf, fp, sizeof(*fp)) != 0) { -#ifdef DEBUG - printf("process %ld has trashed its stack\n", (long)p->p_pid); -#endif PROC_LOCK(p); sigexit(td, SIGILL); } @@ -573,9 +570,6 @@ freebsd4_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse * Copy the sigframe out to the user's stack. */ if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { -#ifdef DEBUG - printf("process %ld has trashed its stack\n", (long)p->p_pid); -#endif PROC_LOCK(p); sigexit(td, SIGILL); } @@ -739,9 +733,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask (xfpusave != NULL && copyout(xfpusave, (void *)sf.sf_uc.uc_mcontext.mc_xfpustate, xfpusave_len) != 0)) { -#ifdef DEBUG - printf("process %ld has trashed its stack\n", (long)p->p_pid); -#endif PROC_LOCK(p); sigexit(td, SIGILL); } From owner-svn-src-stable@freebsd.org Wed Nov 15 15:24:29 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AC2EDDFFDC; Wed, 15 Nov 2017 15:24:29 +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 mx1.freebsd.org (Postfix) with ESMTPS id 664586F2ED; Wed, 15 Nov 2017 15:24:29 +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 vAFFOSZx021997; Wed, 15 Nov 2017 15:24:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFFOS6q021996; Wed, 15 Nov 2017 15:24:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711151524.vAFFOS6q021996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 15 Nov 2017 15:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325856 - stable/11/contrib/elftoolchain/readelf X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 325856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 15:24:29 -0000 Author: jhb Date: Wed Nov 15 15:24:28 2017 New Revision: 325856 URL: https://svnweb.freebsd.org/changeset/base/325856 Log: MFC 323588: Recognize NT_PTLWPINFO and NT_ARM_VFP in FreeBSD ELF cores. Modified: stable/11/contrib/elftoolchain/readelf/readelf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/11/contrib/elftoolchain/readelf/readelf.c Wed Nov 15 15:02:45 2017 (r325855) +++ stable/11/contrib/elftoolchain/readelf/readelf.c Wed Nov 15 15:24:28 2017 (r325856) @@ -1141,7 +1141,9 @@ note_type_freebsd_core(unsigned int nt) case 14: return "NT_PROCSTAT_OSREL"; case 15: return "NT_PROCSTAT_PSSTRINGS"; case 16: return "NT_PROCSTAT_AUXV"; + case 17: return "NT_PTLWPINFO"; case 0x202: return "NT_X86_XSTATE (x86 XSAVE extended state)"; + case 0x400: return "NT_ARM_VFP (arm VFP registers)"; default: return (note_type_unknown(nt)); } } From owner-svn-src-stable@freebsd.org Wed Nov 15 15:56:11 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02D19DE0C8B; Wed, 15 Nov 2017 15:56:11 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80DCC702AF; Wed, 15 Nov 2017 15:56:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFFu9JT034625; Wed, 15 Nov 2017 15:56:09 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFFu8Lp034614; Wed, 15 Nov 2017 15:56:08 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201711151556.vAFFu8Lp034614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 15 Nov 2017 15:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325858 - in stable/11: sys/compat/cloudabi sys/compat/cloudabi32 sys/compat/cloudabi64 sys/contrib/cloudabi usr.bin/truss X-SVN-Group: stable-11 X-SVN-Commit-Author: ed X-SVN-Commit-Paths: in stable/11: sys/compat/cloudabi sys/compat/cloudabi32 sys/compat/cloudabi64 sys/contrib/cloudabi usr.bin/truss X-SVN-Commit-Revision: 325858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 15:56:11 -0000 Author: ed Date: Wed Nov 15 15:56:08 2017 New Revision: 325858 URL: https://svnweb.freebsd.org/changeset/base/325858 Log: MFC r324727 and r325555: Import the latest CloudABI definitions, version 0.16. The most important change in this release is the removal of the poll_fd() system call; CloudABI's equivalent of kevent(). Though I think that kqueue is a lot saner than many of its alternatives, our experience is that emulating this system call on other systems accurately isn't easy. It has become a complex API, even though I'm not convinced this complexity is needed. This is why we've decided to take a different approach, by looking one layer up. We're currently adding an event loop to CloudABI's C library that is API compatible with libuv (except when incompatible with Capsicum). Initially, this event loop will be built on top of plain inefficient poll() calls. Only after this is finished, we'll work our way backwards and design a new set of system calls to optimize it. Interesting challenges will include integrating asynchronous I/O into such a system call API. libuv currently doesn't aio(4) on Linux/BSD, due to it being unreliable and having undesired semantics. Upgrade to CloudABI v0.17. Compared to the previous version, v0.16, there are a couple of minor changes: - CLOUDABI_AT_PID: Process identifiers for CloudABI processes. Initially, BSD process identifiers weren't exposed inside the runtime, due to them being pretty much useless inside of a cluster computing environment. When jobs are scheduled across systems, the BSD process number doesn't act as an identifier. Even on individual systems they may recycle relatively quickly. With this change, the kernel will now generate a UUIDv4 when executing a process. These UUIDs can be obtained within the process using program_getpid(). Right now, FreeBSD will not attempt to store this value. This should of course happen at some point in time, so that it may be printed by administration tools. - Removal of some unused structure members for polling. With the polling framework being simplified/redesigned, it turns out some of the structure fields were not used by the C library. We can remove these to keep things nice and tidy. Modified: stable/11/sys/compat/cloudabi/cloudabi_fd.c stable/11/sys/compat/cloudabi32/cloudabi32_module.c stable/11/sys/compat/cloudabi32/cloudabi32_poll.c stable/11/sys/compat/cloudabi32/cloudabi32_proto.h stable/11/sys/compat/cloudabi32/cloudabi32_syscall.h stable/11/sys/compat/cloudabi32/cloudabi32_syscalls.c stable/11/sys/compat/cloudabi32/cloudabi32_sysent.c stable/11/sys/compat/cloudabi32/cloudabi32_systrace_args.c stable/11/sys/compat/cloudabi64/cloudabi64_module.c stable/11/sys/compat/cloudabi64/cloudabi64_poll.c stable/11/sys/compat/cloudabi64/cloudabi64_proto.h stable/11/sys/compat/cloudabi64/cloudabi64_syscall.h stable/11/sys/compat/cloudabi64/cloudabi64_syscalls.c stable/11/sys/compat/cloudabi64/cloudabi64_sysent.c stable/11/sys/compat/cloudabi64/cloudabi64_systrace_args.c stable/11/sys/contrib/cloudabi/cloudabi32_types.h stable/11/sys/contrib/cloudabi/cloudabi64_types.h stable/11/sys/contrib/cloudabi/cloudabi_types_common.h stable/11/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S stable/11/sys/contrib/cloudabi/cloudabi_vdso_armv6.S stable/11/sys/contrib/cloudabi/cloudabi_vdso_i686.S stable/11/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S stable/11/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S stable/11/sys/contrib/cloudabi/syscalls32.master stable/11/sys/contrib/cloudabi/syscalls64.master stable/11/usr.bin/truss/syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- stable/11/sys/compat/cloudabi/cloudabi_fd.c Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi/cloudabi_fd.c Wed Nov 15 15:56:08 2017 (r325858) @@ -73,9 +73,7 @@ __FBSDID("$FreeBSD$"); MAPPING(CLOUDABI_RIGHT_MEM_MAP, CAP_MMAP) \ MAPPING(CLOUDABI_RIGHT_MEM_MAP_EXEC, CAP_MMAP_X) \ MAPPING(CLOUDABI_RIGHT_POLL_FD_READWRITE, CAP_EVENT) \ - MAPPING(CLOUDABI_RIGHT_POLL_MODIFY, CAP_KQUEUE_CHANGE) \ MAPPING(CLOUDABI_RIGHT_POLL_PROC_TERMINATE, CAP_EVENT) \ - MAPPING(CLOUDABI_RIGHT_POLL_WAIT, CAP_KQUEUE_EVENT) \ MAPPING(CLOUDABI_RIGHT_PROC_EXEC, CAP_FEXECVE) \ MAPPING(CLOUDABI_RIGHT_SOCK_SHUTDOWN, CAP_SHUTDOWN) \ @@ -93,9 +91,6 @@ cloudabi_sys_fd_create1(struct thread *td, struct filecaps fcaps = {}; switch (uap->type) { - case CLOUDABI_FILETYPE_POLL: - cap_rights_init(&fcaps.fc_rights, CAP_FSTAT, CAP_KQUEUE); - return (kern_kqueue(td, 0, &fcaps)); case CLOUDABI_FILETYPE_SHARED_MEMORY: cap_rights_init(&fcaps.fc_rights, CAP_FSTAT, CAP_FTRUNCATE, CAP_MMAP_RWX); @@ -201,8 +196,6 @@ cloudabi_convert_filetype(const struct file *fp) switch (fp->f_type) { case DTYPE_FIFO: return (CLOUDABI_FILETYPE_SOCKET_STREAM); - case DTYPE_KQUEUE: - return (CLOUDABI_FILETYPE_POLL); case DTYPE_PIPE: return (CLOUDABI_FILETYPE_SOCKET_STREAM); case DTYPE_PROCDESC: @@ -315,10 +308,6 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t CLOUDABI_RIGHT_MEM_MAP_EXEC | CLOUDABI_RIGHT_POLL_FD_READWRITE | CLOUDABI_RIGHT_PROC_EXEC; - break; - case CLOUDABI_FILETYPE_POLL: - *base &= ~CLOUDABI_RIGHT_FILE_ADVISE; - *inheriting = 0; break; case CLOUDABI_FILETYPE_PROCESS: *base &= ~(CLOUDABI_RIGHT_FILE_ADVISE | Modified: stable/11/sys/compat/cloudabi32/cloudabi32_module.c ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_module.c Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi32/cloudabi32_module.c Wed Nov 15 15:56:08 2017 (r325858) @@ -63,10 +63,10 @@ cloudabi32_copyout_strings(struct image_params *imgp) int cloudabi32_fixup(register_t **stack_base, struct image_params *imgp) { - char canarybuf[64]; + char canarybuf[64], pidbuf[16]; Elf32_Auxargs *args; struct thread *td; - void *argdata, *canary; + void *argdata, *canary, *pid; size_t argdatalen; int error; @@ -79,8 +79,9 @@ cloudabi32_fixup(register_t **stack_base, struct image td = curthread; td->td_proc->p_osrel = __FreeBSD_version; - /* Store canary for stack smashing protection. */ argdata = *stack_base; + + /* Store canary for stack smashing protection. */ arc4rand(canarybuf, sizeof(canarybuf), 0); *stack_base -= howmany(sizeof(canarybuf), sizeof(register_t)); canary = *stack_base; @@ -89,6 +90,20 @@ cloudabi32_fixup(register_t **stack_base, struct image return (error); /* + * Generate a random UUID that identifies the process. Right now + * we don't store this UUID in the kernel. Ideally, it should be + * exposed through ps(1). + */ + arc4rand(pidbuf, sizeof(pidbuf), 0); + pidbuf[6] = (pidbuf[6] & 0x0f) | 0x40; + pidbuf[8] = (pidbuf[8] & 0x3f) | 0x80; + *stack_base -= howmany(sizeof(pidbuf), sizeof(register_t)); + pid = *stack_base; + error = copyout(pidbuf, pid, sizeof(pidbuf)); + if (error != 0) + return (error); + + /* * Compute length of program arguments. As the argument data is * binary safe, we had to add a trailing null byte in * exec_copyin_data_fds(). Undo this by reducing the length. @@ -111,9 +126,10 @@ cloudabi32_fixup(register_t **stack_base, struct image VAL(CLOUDABI_AT_PAGESZ, args->pagesz), PTR(CLOUDABI_AT_PHDR, args->phdr), VAL(CLOUDABI_AT_PHNUM, args->phnum), - VAL(CLOUDABI_AT_TID, td->td_tid), + PTR(CLOUDABI_AT_PID, pid), PTR(CLOUDABI_AT_SYSINFO_EHDR, imgp->proc->p_sysent->sv_shared_page_base), + VAL(CLOUDABI_AT_TID, td->td_tid), #undef VAL #undef PTR { .a_type = CLOUDABI_AT_NULL }, Modified: stable/11/sys/compat/cloudabi32/cloudabi32_poll.c ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_poll.c Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi32/cloudabi32_poll.c Wed Nov 15 15:56:08 2017 (r325858) @@ -78,8 +78,7 @@ convert_signal(int sig) struct cloudabi32_kevent_args { const cloudabi32_subscription_t *in; - cloudabi32_event_t *out; - bool once; + cloudabi_event_t *out; }; /* Converts CloudABI's subscription objects to FreeBSD's struct kevent. */ @@ -124,9 +123,7 @@ cloudabi32_kevent_copyin(void *arg, struct kevent *kev case CLOUDABI_EVENTTYPE_FD_READ: kevp->filter = EVFILT_READ; kevp->ident = sub.fd_readwrite.fd; - if ((sub.fd_readwrite.flags & - CLOUDABI_SUBSCRIPTION_FD_READWRITE_POLL) != 0) - kevp->fflags = NOTE_FILE_POLL; + kevp->fflags = NOTE_FILE_POLL; break; case CLOUDABI_EVENTTYPE_FD_WRITE: kevp->filter = EVFILT_WRITE; @@ -138,24 +135,7 @@ cloudabi32_kevent_copyin(void *arg, struct kevent *kev kevp->fflags = NOTE_EXIT; break; } - if (args->once) { - /* Ignore flags. Simply use oneshot mode. */ - kevp->flags = EV_ADD | EV_ONESHOT; - } else { - /* Translate flags. */ - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ADD) != 0) - kevp->flags |= EV_ADD; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_CLEAR) != 0) - kevp->flags |= EV_CLEAR; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_DELETE) != 0) - kevp->flags |= EV_DELETE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_DISABLE) != 0) - kevp->flags |= EV_DISABLE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ENABLE) != 0) - kevp->flags |= EV_ENABLE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ONESHOT) != 0) - kevp->flags |= EV_ONESHOT; - } + kevp->flags = EV_ADD | EV_ONESHOT; ++kevp; } return (0); @@ -165,7 +145,7 @@ cloudabi32_kevent_copyin(void *arg, struct kevent *kev static int cloudabi32_kevent_copyout(void *arg, struct kevent *kevp, int count) { - cloudabi32_event_t ev; + cloudabi_event_t ev; struct cloudabi32_kevent_args *args; int error; @@ -177,19 +157,15 @@ cloudabi32_kevent_copyout(void *arg, struct kevent *ke switch (kevp->filter) { case EVFILT_TIMER: ev.type = CLOUDABI_EVENTTYPE_CLOCK; - ev.clock.identifier = kevp->ident; break; case EVFILT_READ: ev.type = CLOUDABI_EVENTTYPE_FD_READ; - ev.fd_readwrite.fd = kevp->ident; break; case EVFILT_WRITE: ev.type = CLOUDABI_EVENTTYPE_FD_WRITE; - ev.fd_readwrite.fd = kevp->ident; break; case EVFILT_PROCDESC: ev.type = CLOUDABI_EVENTTYPE_PROC_TERMINATE; - ev.proc_terminate.fd = kevp->ident; break; } @@ -238,7 +214,6 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi struct cloudabi32_kevent_args args = { .in = uap->in, .out = uap->out, - .once = true, }; struct kevent_copyops copyops = { .k_copyin = cloudabi32_kevent_copyin, @@ -252,7 +227,7 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi */ if (uap->nsubscriptions == 1) { cloudabi32_subscription_t sub; - cloudabi32_event_t ev = {}; + cloudabi_event_t ev = {}; int error; error = copyin(uap->in, &sub, sizeof(sub)); @@ -262,7 +237,6 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi ev.type = sub.type; if (sub.type == CLOUDABI_EVENTTYPE_CONDVAR) { /* Wait on a condition variable. */ - ev.condvar.condvar = sub.condvar.condvar; ev.error = cloudabi_convert_errno( cloudabi_futex_condvar_wait( td, TO_PTR(sub.condvar.condvar), @@ -274,7 +248,6 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi return (copyout(&ev, uap->out, sizeof(ev))); } else if (sub.type == CLOUDABI_EVENTTYPE_LOCK_RDLOCK) { /* Acquire a read lock. */ - ev.lock.lock = sub.lock.lock; ev.error = cloudabi_convert_errno( cloudabi_futex_lock_rdlock( td, TO_PTR(sub.lock.lock), @@ -284,7 +257,6 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi return (copyout(&ev, uap->out, sizeof(ev))); } else if (sub.type == CLOUDABI_EVENTTYPE_LOCK_WRLOCK) { /* Acquire a write lock. */ - ev.lock.lock = sub.lock.lock; ev.error = cloudabi_convert_errno( cloudabi_futex_lock_wrlock( td, TO_PTR(sub.lock.lock), @@ -295,7 +267,7 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi } } else if (uap->nsubscriptions == 2) { cloudabi32_subscription_t sub[2]; - cloudabi32_event_t ev[2] = {}; + cloudabi_event_t ev[2] = {}; int error; error = copyin(uap->in, &sub, sizeof(sub)); @@ -309,8 +281,6 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { /* Wait for a condition variable with timeout. */ - ev[0].condvar.condvar = sub[0].condvar.condvar; - ev[1].clock.identifier = sub[1].clock.identifier; error = cloudabi_futex_condvar_wait( td, TO_PTR(sub[0].condvar.condvar), sub[0].condvar.condvar_scope, @@ -330,8 +300,6 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { /* Acquire a read lock with a timeout. */ - ev[0].lock.lock = sub[0].lock.lock; - ev[1].clock.identifier = sub[1].clock.identifier; error = cloudabi_futex_lock_rdlock( td, TO_PTR(sub[0].lock.lock), sub[0].lock.lock_scope, sub[1].clock.clock_id, @@ -349,8 +317,6 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { /* Acquire a write lock with a timeout. */ - ev[0].lock.lock = sub[0].lock.lock; - ev[1].clock.identifier = sub[1].clock.identifier; error = cloudabi_futex_lock_wrlock( td, TO_PTR(sub[0].lock.lock), sub[0].lock.lock_scope, sub[1].clock.clock_id, @@ -368,41 +334,4 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi } return (kern_kevent_anonymous(td, uap->nsubscriptions, ©ops)); -} - -int -cloudabi32_sys_poll_fd(struct thread *td, - struct cloudabi32_sys_poll_fd_args *uap) -{ - struct cloudabi32_kevent_args args = { - .in = uap->in, - .out = uap->out, - .once = false, - }; - struct kevent_copyops copyops = { - .k_copyin = cloudabi32_kevent_copyin, - .k_copyout = cloudabi32_kevent_copyout, - .arg = &args, - }; - cloudabi32_subscription_t subtimo; - struct timespec timeout; - int error; - - if (uap->timeout != NULL) { - /* Poll with a timeout. */ - error = copyin(uap->timeout, &subtimo, sizeof(subtimo)); - if (error != 0) - return (error); - if (subtimo.type != CLOUDABI_EVENTTYPE_CLOCK || - subtimo.clock.flags != 0) - return (EINVAL); - timeout.tv_sec = subtimo.clock.timeout / 1000000000; - timeout.tv_nsec = subtimo.clock.timeout % 1000000000; - return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, - ©ops, &timeout)); - } else { - /* Poll without a timeout. */ - return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, - ©ops, NULL)); - } } Modified: stable/11/sys/compat/cloudabi32/cloudabi32_proto.h ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_proto.h Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi32/cloudabi32_proto.h Wed Nov 15 15:56:08 2017 (r325858) @@ -224,17 +224,9 @@ struct cloudabi_sys_mem_unmap_args { }; struct cloudabi32_sys_poll_args { char in_l_[PADL_(const cloudabi32_subscription_t *)]; const cloudabi32_subscription_t * in; char in_r_[PADR_(const cloudabi32_subscription_t *)]; - char out_l_[PADL_(cloudabi32_event_t *)]; cloudabi32_event_t * out; char out_r_[PADR_(cloudabi32_event_t *)]; + char out_l_[PADL_(cloudabi_event_t *)]; cloudabi_event_t * out; char out_r_[PADR_(cloudabi_event_t *)]; char nsubscriptions_l_[PADL_(size_t)]; size_t nsubscriptions; char nsubscriptions_r_[PADR_(size_t)]; }; -struct cloudabi32_sys_poll_fd_args { - char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char in_l_[PADL_(const cloudabi32_subscription_t *)]; const cloudabi32_subscription_t * in; char in_r_[PADR_(const cloudabi32_subscription_t *)]; - char in_len_l_[PADL_(size_t)]; size_t in_len; char in_len_r_[PADR_(size_t)]; - char out_l_[PADL_(cloudabi32_event_t *)]; cloudabi32_event_t * out; char out_r_[PADR_(cloudabi32_event_t *)]; - char out_len_l_[PADL_(size_t)]; size_t out_len; char out_len_r_[PADR_(size_t)]; - char timeout_l_[PADL_(const cloudabi32_subscription_t *)]; const cloudabi32_subscription_t * timeout; char timeout_r_[PADR_(const cloudabi32_subscription_t *)]; -}; struct cloudabi_sys_proc_exec_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char data_l_[PADL_(const void *)]; const void * data; char data_r_[PADR_(const void *)]; @@ -317,7 +309,6 @@ int cloudabi_sys_mem_protect(struct thread *, struct c int cloudabi_sys_mem_sync(struct thread *, struct cloudabi_sys_mem_sync_args *); int cloudabi_sys_mem_unmap(struct thread *, struct cloudabi_sys_mem_unmap_args *); int cloudabi32_sys_poll(struct thread *, struct cloudabi32_sys_poll_args *); -int cloudabi32_sys_poll_fd(struct thread *, struct cloudabi32_sys_poll_fd_args *); int cloudabi_sys_proc_exec(struct thread *, struct cloudabi_sys_proc_exec_args *); int cloudabi_sys_proc_exit(struct thread *, struct cloudabi_sys_proc_exit_args *); int cloudabi_sys_proc_fork(struct thread *, struct cloudabi_sys_proc_fork_args *); @@ -397,7 +388,6 @@ int cloudabi_sys_thread_yield(struct thread *, struct #define CLOUDABI32_SYS_AUE_cloudabi_sys_mem_sync AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi_sys_mem_unmap AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi32_sys_poll AUE_NULL -#define CLOUDABI32_SYS_AUE_cloudabi32_sys_poll_fd AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi_sys_proc_exec AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi_sys_proc_exit AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi_sys_proc_fork AUE_NULL Modified: stable/11/sys/compat/cloudabi32/cloudabi32_syscall.h ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_syscall.h Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi32/cloudabi32_syscall.h Wed Nov 15 15:56:08 2017 (r325858) @@ -43,16 +43,15 @@ #define CLOUDABI32_SYS_cloudabi_sys_mem_sync 35 #define CLOUDABI32_SYS_cloudabi_sys_mem_unmap 36 #define CLOUDABI32_SYS_cloudabi32_sys_poll 37 -#define CLOUDABI32_SYS_cloudabi32_sys_poll_fd 38 -#define CLOUDABI32_SYS_cloudabi_sys_proc_exec 39 -#define CLOUDABI32_SYS_cloudabi_sys_proc_exit 40 -#define CLOUDABI32_SYS_cloudabi_sys_proc_fork 41 -#define CLOUDABI32_SYS_cloudabi_sys_proc_raise 42 -#define CLOUDABI32_SYS_cloudabi_sys_random_get 43 -#define CLOUDABI32_SYS_cloudabi32_sys_sock_recv 44 -#define CLOUDABI32_SYS_cloudabi32_sys_sock_send 45 -#define CLOUDABI32_SYS_cloudabi_sys_sock_shutdown 46 -#define CLOUDABI32_SYS_cloudabi32_sys_thread_create 47 -#define CLOUDABI32_SYS_cloudabi_sys_thread_exit 48 -#define CLOUDABI32_SYS_cloudabi_sys_thread_yield 49 -#define CLOUDABI32_SYS_MAXSYSCALL 50 +#define CLOUDABI32_SYS_cloudabi_sys_proc_exec 38 +#define CLOUDABI32_SYS_cloudabi_sys_proc_exit 39 +#define CLOUDABI32_SYS_cloudabi_sys_proc_fork 40 +#define CLOUDABI32_SYS_cloudabi_sys_proc_raise 41 +#define CLOUDABI32_SYS_cloudabi_sys_random_get 42 +#define CLOUDABI32_SYS_cloudabi32_sys_sock_recv 43 +#define CLOUDABI32_SYS_cloudabi32_sys_sock_send 44 +#define CLOUDABI32_SYS_cloudabi_sys_sock_shutdown 45 +#define CLOUDABI32_SYS_cloudabi32_sys_thread_create 46 +#define CLOUDABI32_SYS_cloudabi_sys_thread_exit 47 +#define CLOUDABI32_SYS_cloudabi_sys_thread_yield 48 +#define CLOUDABI32_SYS_MAXSYSCALL 49 Modified: stable/11/sys/compat/cloudabi32/cloudabi32_syscalls.c ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_syscalls.c Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi32/cloudabi32_syscalls.c Wed Nov 15 15:56:08 2017 (r325858) @@ -44,16 +44,15 @@ const char *cloudabi32_syscallnames[] = { "cloudabi_sys_mem_sync", /* 35 = cloudabi_sys_mem_sync */ "cloudabi_sys_mem_unmap", /* 36 = cloudabi_sys_mem_unmap */ "cloudabi32_sys_poll", /* 37 = cloudabi32_sys_poll */ - "cloudabi32_sys_poll_fd", /* 38 = cloudabi32_sys_poll_fd */ - "cloudabi_sys_proc_exec", /* 39 = cloudabi_sys_proc_exec */ - "cloudabi_sys_proc_exit", /* 40 = cloudabi_sys_proc_exit */ - "cloudabi_sys_proc_fork", /* 41 = cloudabi_sys_proc_fork */ - "cloudabi_sys_proc_raise", /* 42 = cloudabi_sys_proc_raise */ - "cloudabi_sys_random_get", /* 43 = cloudabi_sys_random_get */ - "cloudabi32_sys_sock_recv", /* 44 = cloudabi32_sys_sock_recv */ - "cloudabi32_sys_sock_send", /* 45 = cloudabi32_sys_sock_send */ - "cloudabi_sys_sock_shutdown", /* 46 = cloudabi_sys_sock_shutdown */ - "cloudabi32_sys_thread_create", /* 47 = cloudabi32_sys_thread_create */ - "cloudabi_sys_thread_exit", /* 48 = cloudabi_sys_thread_exit */ - "cloudabi_sys_thread_yield", /* 49 = cloudabi_sys_thread_yield */ + "cloudabi_sys_proc_exec", /* 38 = cloudabi_sys_proc_exec */ + "cloudabi_sys_proc_exit", /* 39 = cloudabi_sys_proc_exit */ + "cloudabi_sys_proc_fork", /* 40 = cloudabi_sys_proc_fork */ + "cloudabi_sys_proc_raise", /* 41 = cloudabi_sys_proc_raise */ + "cloudabi_sys_random_get", /* 42 = cloudabi_sys_random_get */ + "cloudabi32_sys_sock_recv", /* 43 = cloudabi32_sys_sock_recv */ + "cloudabi32_sys_sock_send", /* 44 = cloudabi32_sys_sock_send */ + "cloudabi_sys_sock_shutdown", /* 45 = cloudabi_sys_sock_shutdown */ + "cloudabi32_sys_thread_create", /* 46 = cloudabi32_sys_thread_create */ + "cloudabi_sys_thread_exit", /* 47 = cloudabi_sys_thread_exit */ + "cloudabi_sys_thread_yield", /* 48 = cloudabi_sys_thread_yield */ }; Modified: stable/11/sys/compat/cloudabi32/cloudabi32_sysent.c ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_sysent.c Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi32/cloudabi32_sysent.c Wed Nov 15 15:56:08 2017 (r325858) @@ -52,16 +52,15 @@ struct sysent cloudabi32_sysent[] = { { AS(cloudabi_sys_mem_sync_args), (sy_call_t *)cloudabi_sys_mem_sync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 35 = cloudabi_sys_mem_sync */ { AS(cloudabi_sys_mem_unmap_args), (sy_call_t *)cloudabi_sys_mem_unmap, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 36 = cloudabi_sys_mem_unmap */ { AS(cloudabi32_sys_poll_args), (sy_call_t *)cloudabi32_sys_poll, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 37 = cloudabi32_sys_poll */ - { AS(cloudabi32_sys_poll_fd_args), (sy_call_t *)cloudabi32_sys_poll_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 38 = cloudabi32_sys_poll_fd */ - { AS(cloudabi_sys_proc_exec_args), (sy_call_t *)cloudabi_sys_proc_exec, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = cloudabi_sys_proc_exec */ - { AS(cloudabi_sys_proc_exit_args), (sy_call_t *)cloudabi_sys_proc_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 40 = cloudabi_sys_proc_exit */ - { 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = cloudabi_sys_proc_fork */ - { AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = cloudabi_sys_proc_raise */ - { AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = cloudabi_sys_random_get */ - { AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = cloudabi32_sys_sock_recv */ - { AS(cloudabi32_sys_sock_send_args), (sy_call_t *)cloudabi32_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi32_sys_sock_send */ - { AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi_sys_sock_shutdown */ - { AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi32_sys_thread_create */ - { AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi_sys_thread_exit */ - { 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi_sys_thread_yield */ + { AS(cloudabi_sys_proc_exec_args), (sy_call_t *)cloudabi_sys_proc_exec, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 38 = cloudabi_sys_proc_exec */ + { AS(cloudabi_sys_proc_exit_args), (sy_call_t *)cloudabi_sys_proc_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = cloudabi_sys_proc_exit */ + { 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 40 = cloudabi_sys_proc_fork */ + { AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = cloudabi_sys_proc_raise */ + { AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = cloudabi_sys_random_get */ + { AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = cloudabi32_sys_sock_recv */ + { AS(cloudabi32_sys_sock_send_args), (sy_call_t *)cloudabi32_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = cloudabi32_sys_sock_send */ + { AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi_sys_sock_shutdown */ + { AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi32_sys_thread_create */ + { AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi_sys_thread_exit */ + { 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi_sys_thread_yield */ }; Modified: stable/11/sys/compat/cloudabi32/cloudabi32_systrace_args.c ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_systrace_args.c Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi32/cloudabi32_systrace_args.c Wed Nov 15 15:56:08 2017 (r325858) @@ -352,25 +352,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 37: { struct cloudabi32_sys_poll_args *p = params; uarg[0] = (intptr_t) p->in; /* const cloudabi32_subscription_t * */ - uarg[1] = (intptr_t) p->out; /* cloudabi32_event_t * */ + uarg[1] = (intptr_t) p->out; /* cloudabi_event_t * */ uarg[2] = p->nsubscriptions; /* size_t */ *n_args = 3; break; } - /* cloudabi32_sys_poll_fd */ - case 38: { - struct cloudabi32_sys_poll_fd_args *p = params; - iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->in; /* const cloudabi32_subscription_t * */ - uarg[2] = p->in_len; /* size_t */ - uarg[3] = (intptr_t) p->out; /* cloudabi32_event_t * */ - uarg[4] = p->out_len; /* size_t */ - uarg[5] = (intptr_t) p->timeout; /* const cloudabi32_subscription_t * */ - *n_args = 6; - break; - } /* cloudabi_sys_proc_exec */ - case 39: { + case 38: { struct cloudabi_sys_proc_exec_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->data; /* const void * */ @@ -381,26 +369,26 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi_sys_proc_exit */ - case 40: { + case 39: { struct cloudabi_sys_proc_exit_args *p = params; iarg[0] = p->rval; /* cloudabi_exitcode_t */ *n_args = 1; break; } /* cloudabi_sys_proc_fork */ - case 41: { + case 40: { *n_args = 0; break; } /* cloudabi_sys_proc_raise */ - case 42: { + case 41: { struct cloudabi_sys_proc_raise_args *p = params; iarg[0] = p->sig; /* cloudabi_signal_t */ *n_args = 1; break; } /* cloudabi_sys_random_get */ - case 43: { + case 42: { struct cloudabi_sys_random_get_args *p = params; uarg[0] = (intptr_t) p->buf; /* void * */ uarg[1] = p->buf_len; /* size_t */ @@ -408,7 +396,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi32_sys_sock_recv */ - case 44: { + case 43: { struct cloudabi32_sys_sock_recv_args *p = params; iarg[0] = p->sock; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->in; /* const cloudabi32_recv_in_t * */ @@ -417,7 +405,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi32_sys_sock_send */ - case 45: { + case 44: { struct cloudabi32_sys_sock_send_args *p = params; iarg[0] = p->sock; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->in; /* const cloudabi32_send_in_t * */ @@ -426,7 +414,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi_sys_sock_shutdown */ - case 46: { + case 45: { struct cloudabi_sys_sock_shutdown_args *p = params; iarg[0] = p->sock; /* cloudabi_fd_t */ iarg[1] = p->how; /* cloudabi_sdflags_t */ @@ -434,14 +422,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi32_sys_thread_create */ - case 47: { + case 46: { struct cloudabi32_sys_thread_create_args *p = params; uarg[0] = (intptr_t) p->attr; /* cloudabi32_threadattr_t * */ *n_args = 1; break; } /* cloudabi_sys_thread_exit */ - case 48: { + case 47: { struct cloudabi_sys_thread_exit_args *p = params; uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */ iarg[1] = p->scope; /* cloudabi_scope_t */ @@ -449,7 +437,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi_sys_thread_yield */ - case 49: { + case 48: { *n_args = 0; break; } @@ -1074,7 +1062,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "const cloudabi32_subscription_t *"; break; case 1: - p = "cloudabi32_event_t *"; + p = "cloudabi_event_t *"; break; case 2: p = "size_t"; @@ -1083,38 +1071,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* cloudabi32_sys_poll_fd */ + /* cloudabi_sys_proc_exec */ case 38: switch(ndx) { case 0: p = "cloudabi_fd_t"; break; case 1: - p = "const cloudabi32_subscription_t *"; - break; - case 2: - p = "size_t"; - break; - case 3: - p = "cloudabi32_event_t *"; - break; - case 4: - p = "size_t"; - break; - case 5: - p = "const cloudabi32_subscription_t *"; - break; - default: - break; - }; - break; - /* cloudabi_sys_proc_exec */ - case 39: - switch(ndx) { - case 0: - p = "cloudabi_fd_t"; - break; - case 1: p = "const void *"; break; case 2: @@ -1131,7 +1094,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_proc_exit */ - case 40: + case 39: switch(ndx) { case 0: p = "cloudabi_exitcode_t"; @@ -1141,10 +1104,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_proc_fork */ - case 41: + case 40: break; /* cloudabi_sys_proc_raise */ - case 42: + case 41: switch(ndx) { case 0: p = "cloudabi_signal_t"; @@ -1154,7 +1117,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_random_get */ - case 43: + case 42: switch(ndx) { case 0: p = "void *"; @@ -1167,7 +1130,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi32_sys_sock_recv */ - case 44: + case 43: switch(ndx) { case 0: p = "cloudabi_fd_t"; @@ -1183,7 +1146,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi32_sys_sock_send */ - case 45: + case 44: switch(ndx) { case 0: p = "cloudabi_fd_t"; @@ -1199,7 +1162,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_sock_shutdown */ - case 46: + case 45: switch(ndx) { case 0: p = "cloudabi_fd_t"; @@ -1212,7 +1175,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi32_sys_thread_create */ - case 47: + case 46: switch(ndx) { case 0: p = "cloudabi32_threadattr_t *"; @@ -1222,7 +1185,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_thread_exit */ - case 48: + case 47: switch(ndx) { case 0: p = "cloudabi_lock_t *"; @@ -1235,7 +1198,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_thread_yield */ - case 49: + case 48: break; default: break; @@ -1438,60 +1401,55 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "size_t"; break; - /* cloudabi32_sys_poll_fd */ + /* cloudabi_sys_proc_exec */ case 38: if (ndx == 0 || ndx == 1) - p = "size_t"; - break; - /* cloudabi_sys_proc_exec */ - case 39: - if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_proc_exit */ - case 40: + case 39: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_proc_fork */ - case 41: + case 40: /* cloudabi_sys_proc_raise */ - case 42: + case 41: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_random_get */ - case 43: + case 42: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi32_sys_sock_recv */ - case 44: + case 43: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi32_sys_sock_send */ - case 45: + case 44: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_sock_shutdown */ - case 46: + case 45: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi32_sys_thread_create */ - case 47: + case 46: if (ndx == 0 || ndx == 1) p = "cloudabi_tid_t"; break; /* cloudabi_sys_thread_exit */ - case 48: + case 47: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_thread_yield */ - case 49: + case 48: default: break; }; Modified: stable/11/sys/compat/cloudabi64/cloudabi64_module.c ============================================================================== --- stable/11/sys/compat/cloudabi64/cloudabi64_module.c Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi64/cloudabi64_module.c Wed Nov 15 15:56:08 2017 (r325858) @@ -63,10 +63,10 @@ cloudabi64_copyout_strings(struct image_params *imgp) int cloudabi64_fixup(register_t **stack_base, struct image_params *imgp) { - char canarybuf[64]; + char canarybuf[64], pidbuf[16]; Elf64_Auxargs *args; struct thread *td; - void *argdata, *canary; + void *argdata, *canary, *pid; size_t argdatalen; int error; @@ -79,8 +79,9 @@ cloudabi64_fixup(register_t **stack_base, struct image td = curthread; td->td_proc->p_osrel = __FreeBSD_version; - /* Store canary for stack smashing protection. */ argdata = *stack_base; + + /* Store canary for stack smashing protection. */ arc4rand(canarybuf, sizeof(canarybuf), 0); *stack_base -= howmany(sizeof(canarybuf), sizeof(register_t)); canary = *stack_base; @@ -89,6 +90,20 @@ cloudabi64_fixup(register_t **stack_base, struct image return (error); /* + * Generate a random UUID that identifies the process. Right now + * we don't store this UUID in the kernel. Ideally, it should be + * exposed through ps(1). + */ + arc4rand(pidbuf, sizeof(pidbuf), 0); + pidbuf[6] = (pidbuf[6] & 0x0f) | 0x40; + pidbuf[8] = (pidbuf[8] & 0x3f) | 0x80; + *stack_base -= howmany(sizeof(pidbuf), sizeof(register_t)); + pid = *stack_base; + error = copyout(pidbuf, pid, sizeof(pidbuf)); + if (error != 0) + return (error); + + /* * Compute length of program arguments. As the argument data is * binary safe, we had to add a trailing null byte in * exec_copyin_data_fds(). Undo this by reducing the length. @@ -111,9 +126,10 @@ cloudabi64_fixup(register_t **stack_base, struct image VAL(CLOUDABI_AT_PAGESZ, args->pagesz), PTR(CLOUDABI_AT_PHDR, args->phdr), VAL(CLOUDABI_AT_PHNUM, args->phnum), - VAL(CLOUDABI_AT_TID, td->td_tid), + PTR(CLOUDABI_AT_PID, pid), PTR(CLOUDABI_AT_SYSINFO_EHDR, imgp->proc->p_sysent->sv_shared_page_base), + VAL(CLOUDABI_AT_TID, td->td_tid), #undef VAL #undef PTR { .a_type = CLOUDABI_AT_NULL }, Modified: stable/11/sys/compat/cloudabi64/cloudabi64_poll.c ============================================================================== --- stable/11/sys/compat/cloudabi64/cloudabi64_poll.c Wed Nov 15 15:52:06 2017 (r325857) +++ stable/11/sys/compat/cloudabi64/cloudabi64_poll.c Wed Nov 15 15:56:08 2017 (r325858) @@ -78,8 +78,7 @@ convert_signal(int sig) struct cloudabi64_kevent_args { const cloudabi64_subscription_t *in; - cloudabi64_event_t *out; - bool once; + cloudabi_event_t *out; }; /* Converts CloudABI's subscription objects to FreeBSD's struct kevent. */ @@ -124,9 +123,7 @@ cloudabi64_kevent_copyin(void *arg, struct kevent *kev case CLOUDABI_EVENTTYPE_FD_READ: kevp->filter = EVFILT_READ; kevp->ident = sub.fd_readwrite.fd; - if ((sub.fd_readwrite.flags & - CLOUDABI_SUBSCRIPTION_FD_READWRITE_POLL) != 0) - kevp->fflags = NOTE_FILE_POLL; + kevp->fflags = NOTE_FILE_POLL; break; case CLOUDABI_EVENTTYPE_FD_WRITE: kevp->filter = EVFILT_WRITE; @@ -138,24 +135,7 @@ cloudabi64_kevent_copyin(void *arg, struct kevent *kev kevp->fflags = NOTE_EXIT; break; } - if (args->once) { - /* Ignore flags. Simply use oneshot mode. */ - kevp->flags = EV_ADD | EV_ONESHOT; - } else { - /* Translate flags. */ - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ADD) != 0) - kevp->flags |= EV_ADD; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_CLEAR) != 0) - kevp->flags |= EV_CLEAR; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_DELETE) != 0) - kevp->flags |= EV_DELETE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_DISABLE) != 0) - kevp->flags |= EV_DISABLE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ENABLE) != 0) - kevp->flags |= EV_ENABLE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ONESHOT) != 0) - kevp->flags |= EV_ONESHOT; - } + kevp->flags = EV_ADD | EV_ONESHOT; ++kevp; } return (0); @@ -165,7 +145,7 @@ cloudabi64_kevent_copyin(void *arg, struct kevent *kev static int cloudabi64_kevent_copyout(void *arg, struct kevent *kevp, int count) { - cloudabi64_event_t ev; + cloudabi_event_t ev; struct cloudabi64_kevent_args *args; int error; @@ -177,19 +157,15 @@ cloudabi64_kevent_copyout(void *arg, struct kevent *ke switch (kevp->filter) { case EVFILT_TIMER: ev.type = CLOUDABI_EVENTTYPE_CLOCK; - ev.clock.identifier = kevp->ident; break; case EVFILT_READ: ev.type = CLOUDABI_EVENTTYPE_FD_READ; - ev.fd_readwrite.fd = kevp->ident; break; case EVFILT_WRITE: ev.type = CLOUDABI_EVENTTYPE_FD_WRITE; - ev.fd_readwrite.fd = kevp->ident; break; case EVFILT_PROCDESC: ev.type = CLOUDABI_EVENTTYPE_PROC_TERMINATE; - ev.proc_terminate.fd = kevp->ident; break; } @@ -238,7 +214,6 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi struct cloudabi64_kevent_args args = { .in = uap->in, .out = uap->out, - .once = true, }; struct kevent_copyops copyops = { .k_copyin = cloudabi64_kevent_copyin, @@ -252,7 +227,7 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi */ if (uap->nsubscriptions == 1) { cloudabi64_subscription_t sub; - cloudabi64_event_t ev = {}; + cloudabi_event_t ev = {}; int error; error = copyin(uap->in, &sub, sizeof(sub)); @@ -262,7 +237,6 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi ev.type = sub.type; if (sub.type == CLOUDABI_EVENTTYPE_CONDVAR) { /* Wait on a condition variable. */ - ev.condvar.condvar = sub.condvar.condvar; ev.error = cloudabi_convert_errno( cloudabi_futex_condvar_wait( td, TO_PTR(sub.condvar.condvar), @@ -274,7 +248,6 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi return (copyout(&ev, uap->out, sizeof(ev))); } else if (sub.type == CLOUDABI_EVENTTYPE_LOCK_RDLOCK) { /* Acquire a read lock. */ - ev.lock.lock = sub.lock.lock; ev.error = cloudabi_convert_errno( cloudabi_futex_lock_rdlock( td, TO_PTR(sub.lock.lock), @@ -284,7 +257,6 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi return (copyout(&ev, uap->out, sizeof(ev))); } else if (sub.type == CLOUDABI_EVENTTYPE_LOCK_WRLOCK) { /* Acquire a write lock. */ - ev.lock.lock = sub.lock.lock; ev.error = cloudabi_convert_errno( cloudabi_futex_lock_wrlock( td, TO_PTR(sub.lock.lock), @@ -295,7 +267,7 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi } } else if (uap->nsubscriptions == 2) { cloudabi64_subscription_t sub[2]; - cloudabi64_event_t ev[2] = {}; + cloudabi_event_t ev[2] = {}; int error; error = copyin(uap->in, &sub, sizeof(sub)); @@ -309,8 +281,6 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { /* Wait for a condition variable with timeout. */ - ev[0].condvar.condvar = sub[0].condvar.condvar; - ev[1].clock.identifier = sub[1].clock.identifier; error = cloudabi_futex_condvar_wait( td, TO_PTR(sub[0].condvar.condvar), sub[0].condvar.condvar_scope, @@ -330,8 +300,6 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { /* Acquire a read lock with a timeout. */ - ev[0].lock.lock = sub[0].lock.lock; - ev[1].clock.identifier = sub[1].clock.identifier; error = cloudabi_futex_lock_rdlock( td, TO_PTR(sub[0].lock.lock), sub[0].lock.lock_scope, sub[1].clock.clock_id, @@ -349,8 +317,6 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { /* Acquire a write lock with a timeout. */ - ev[0].lock.lock = sub[0].lock.lock; - ev[1].clock.identifier = sub[1].clock.identifier; error = cloudabi_futex_lock_wrlock( td, TO_PTR(sub[0].lock.lock), sub[0].lock.lock_scope, sub[1].clock.clock_id, @@ -368,41 +334,4 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi } return (kern_kevent_anonymous(td, uap->nsubscriptions, ©ops)); -} - -int -cloudabi64_sys_poll_fd(struct thread *td, - struct cloudabi64_sys_poll_fd_args *uap) -{ - struct cloudabi64_kevent_args args = { - .in = uap->in, - .out = uap->out, - .once = false, - }; - struct kevent_copyops copyops = { - .k_copyin = cloudabi64_kevent_copyin, - .k_copyout = cloudabi64_kevent_copyout, - .arg = &args, - }; - cloudabi64_subscription_t subtimo; - struct timespec timeout; - int error; - - if (uap->timeout != NULL) { - /* Poll with a timeout. */ - error = copyin(uap->timeout, &subtimo, sizeof(subtimo)); - if (error != 0) - return (error); - if (subtimo.type != CLOUDABI_EVENTTYPE_CLOCK || - subtimo.clock.flags != 0) - return (EINVAL); - timeout.tv_sec = subtimo.clock.timeout / 1000000000; - timeout.tv_nsec = subtimo.clock.timeout % 1000000000; - return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, - ©ops, &timeout)); - } else { - /* Poll without a timeout. */ - return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, - ©ops, NULL)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Nov 15 17:36:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AE81DE2BC3; Wed, 15 Nov 2017 17:36:05 +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 B6A13734AE; Wed, 15 Nov 2017 17:36: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 vAFHa2B5052206; Wed, 15 Nov 2017 09:36:02 -0800 (PST) (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 vAFHa2qF052205; Wed, 15 Nov 2017 09:36:02 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201711151736.vAFHa2qF052205@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r325844 - stable/11/lib/libutil In-Reply-To: <201711151217.vAFCHpn6039893@repo.freebsd.org> To: Baptiste Daroussin Date: Wed, 15 Nov 2017 09:36:02 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 17:36:05 -0000 > Author: bapt > Date: Wed Nov 15 12:17:51 2017 > New Revision: 325844 > URL: https://svnweb.freebsd.org/changeset/base/325844 > > Log: > MFC r325716: > > Fix some nroff style issue > > Modified: > stable/11/lib/libutil/hexdump.3 > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/lib/libutil/hexdump.3 > ============================================================================== > --- stable/11/lib/libutil/hexdump.3 Wed Nov 15 11:35:02 2017 (r325843) > +++ stable/11/lib/libutil/hexdump.3 Wed Nov 15 12:17:51 2017 (r325844) > @@ -42,14 +42,9 @@ > The > .Fn hexdump > function prints an array of bytes to standard out in hexadecimal form, > -along with the > -.Tn ASCII > -representation of the bytes, if possible. > -By default, each line of > -output will start with an offset count, followed by 16 hexadecimal values, > -followed by 16 > -.Tn ASCII > -characters. > +along with the ASCII representation of the bytes, if possible. > +By default, each line of output will start with an offset count, followed by 16 > +hexadecimal values, followed by 16 ASCII characters. Just for the future, the old school way of dong this would be: By default, each line of output will start with an offset count, followed by 16 hexadecimal values, followed by 16 ASCII characters. IE, you put each fragment of a sentance on its own line. It is bad form in .troff to try and pack lines full. I am not sure why we are removing the troff .Tn macro, mandoc may do nothing with it, but if someone formats the man page for a typesetter this does make the ASCII look special. > .Bl -tag -width indent > .It Fa ptr > Pointer to the array of bytes to print. > @@ -73,12 +68,10 @@ Flags for controlling the formatting of the output. > Integer value of the number of bytes to display on each line. > A value of 0 implies that the default value of 16 will be used. > .It Bits 8-15 > -Character > -.Tn ASCII > -value to use as the separator for the hexadecimal output. > +Character ASCII value to use as the separator for the hexadecimal output. > A value of 0 implies that the default value of 32 > -.Tn ( ASCII > -space) will be used. > +.Pq ASCII space > +will be used. > .It Dv HD_OMIT_COUNT > Do not print the offset column at the beginning of each line. > .It Dv HD_OMIT_HEX > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Wed Nov 15 22:34:16 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2C60DE9317; Wed, 15 Nov 2017 22:34:16 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CAA67EB57; Wed, 15 Nov 2017 22:34:16 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFMYFw9005897; Wed, 15 Nov 2017 22:34:15 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFMYFE8005895; Wed, 15 Nov 2017 22:34:15 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201711152234.vAFMYFE8005895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 15 Nov 2017 22:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325866 - in stable/11/sys: compat/freebsd32 kern X-SVN-Group: stable-11 X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in stable/11/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 325866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 22:34:16 -0000 Author: gordon Date: Wed Nov 15 22:34:15 2017 New Revision: 325866 URL: https://svnweb.freebsd.org/changeset/base/325866 Log: MFC r325865 Properly bzero kldstat structure to prevent kernel information leak. Security: FreeBSD-SA-17:10.kldstat Security: CVE-2017-1088 Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c stable/11/sys/kern/kern_linker.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_misc.c Wed Nov 15 22:30:21 2017 (r325865) +++ stable/11/sys/compat/freebsd32/freebsd32_misc.c Wed Nov 15 22:34:15 2017 (r325866) @@ -2950,8 +2950,8 @@ freebsd32_copyout_strings(struct image_params *imgp) int freebsd32_kldstat(struct thread *td, struct freebsd32_kldstat_args *uap) { - struct kld_file_stat stat; - struct kld32_file_stat stat32; + struct kld_file_stat *stat; + struct kld32_file_stat *stat32; int error, version; if ((error = copyin(&uap->stat->version, &version, sizeof(version))) @@ -2961,17 +2961,22 @@ freebsd32_kldstat(struct thread *td, struct freebsd32_ version != sizeof(struct kld32_file_stat)) return (EINVAL); - error = kern_kldstat(td, uap->fileid, &stat); - if (error != 0) - return (error); - - bcopy(&stat.name[0], &stat32.name[0], sizeof(stat.name)); - CP(stat, stat32, refs); - CP(stat, stat32, id); - PTROUT_CP(stat, stat32, address); - CP(stat, stat32, size); - bcopy(&stat.pathname[0], &stat32.pathname[0], sizeof(stat.pathname)); - return (copyout(&stat32, uap->stat, version)); + stat = malloc(sizeof(*stat), M_TEMP, M_WAITOK | M_ZERO); + stat32 = malloc(sizeof(*stat32), M_TEMP, M_WAITOK | M_ZERO); + error = kern_kldstat(td, uap->fileid, stat); + if (error == 0) { + bcopy(&stat->name[0], &stat32->name[0], sizeof(stat->name)); + CP(*stat, *stat32, refs); + CP(*stat, *stat32, id); + PTROUT_CP(*stat, *stat32, address); + CP(*stat, *stat32, size); + bcopy(&stat->pathname[0], &stat32->pathname[0], + sizeof(stat->pathname)); + error = copyout(stat32, uap->stat, version); + } + free(stat, M_TEMP); + free(stat32, M_TEMP); + return (error); } int Modified: stable/11/sys/kern/kern_linker.c ============================================================================== --- stable/11/sys/kern/kern_linker.c Wed Nov 15 22:30:21 2017 (r325865) +++ stable/11/sys/kern/kern_linker.c Wed Nov 15 22:34:15 2017 (r325866) @@ -1228,7 +1228,7 @@ out: int sys_kldstat(struct thread *td, struct kldstat_args *uap) { - struct kld_file_stat stat; + struct kld_file_stat *stat; int error, version; /* @@ -1241,10 +1241,12 @@ sys_kldstat(struct thread *td, struct kldstat_args *ua version != sizeof(struct kld_file_stat)) return (EINVAL); - error = kern_kldstat(td, uap->fileid, &stat); - if (error != 0) - return (error); - return (copyout(&stat, uap->stat, version)); + stat = malloc(sizeof(*stat), M_TEMP, M_WAITOK | M_ZERO); + error = kern_kldstat(td, uap->fileid, stat); + if (error == 0) + error = copyout(stat, uap->stat, version); + free(stat, M_TEMP); + return (error); } int From owner-svn-src-stable@freebsd.org Wed Nov 15 22:35:17 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6A14DE938D; Wed, 15 Nov 2017 22:35:17 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FE587ECA6; Wed, 15 Nov 2017 22:35:17 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAFMZGHS006009; Wed, 15 Nov 2017 22:35:16 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAFMZGWM006007; Wed, 15 Nov 2017 22:35:16 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201711152235.vAFMZGWM006007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 15 Nov 2017 22:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325867 - in stable/10/sys: compat/freebsd32 kern X-SVN-Group: stable-10 X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in stable/10/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 325867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 22:35:17 -0000 Author: gordon Date: Wed Nov 15 22:35:16 2017 New Revision: 325867 URL: https://svnweb.freebsd.org/changeset/base/325867 Log: MFC r325865 Properly bzero kldstat structure to prevent kernel information leak. Security: FreeBSD-SA-17:10.kldstat Security: CVE-2017-1088 Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/kern/kern_linker.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Nov 15 22:34:15 2017 (r325866) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Nov 15 22:35:16 2017 (r325867) @@ -3068,8 +3068,8 @@ freebsd32_copyout_strings(struct image_params *imgp) int freebsd32_kldstat(struct thread *td, struct freebsd32_kldstat_args *uap) { - struct kld_file_stat stat; - struct kld32_file_stat stat32; + struct kld_file_stat *stat; + struct kld32_file_stat *stat32; int error, version; if ((error = copyin(&uap->stat->version, &version, sizeof(version))) @@ -3079,17 +3079,22 @@ freebsd32_kldstat(struct thread *td, struct freebsd32_ version != sizeof(struct kld32_file_stat)) return (EINVAL); - error = kern_kldstat(td, uap->fileid, &stat); - if (error != 0) - return (error); - - bcopy(&stat.name[0], &stat32.name[0], sizeof(stat.name)); - CP(stat, stat32, refs); - CP(stat, stat32, id); - PTROUT_CP(stat, stat32, address); - CP(stat, stat32, size); - bcopy(&stat.pathname[0], &stat32.pathname[0], sizeof(stat.pathname)); - return (copyout(&stat32, uap->stat, version)); + stat = malloc(sizeof(*stat), M_TEMP, M_WAITOK | M_ZERO); + stat32 = malloc(sizeof(*stat32), M_TEMP, M_WAITOK | M_ZERO); + error = kern_kldstat(td, uap->fileid, stat); + if (error == 0) { + bcopy(&stat->name[0], &stat32->name[0], sizeof(stat->name)); + CP(*stat, *stat32, refs); + CP(*stat, *stat32, id); + PTROUT_CP(*stat, *stat32, address); + CP(*stat, *stat32, size); + bcopy(&stat->pathname[0], &stat32->pathname[0], + sizeof(stat->pathname)); + error = copyout(stat32, uap->stat, version); + } + free(stat, M_TEMP); + free(stat32, M_TEMP); + return (error); } int Modified: stable/10/sys/kern/kern_linker.c ============================================================================== --- stable/10/sys/kern/kern_linker.c Wed Nov 15 22:34:15 2017 (r325866) +++ stable/10/sys/kern/kern_linker.c Wed Nov 15 22:35:16 2017 (r325867) @@ -1223,7 +1223,7 @@ out: int sys_kldstat(struct thread *td, struct kldstat_args *uap) { - struct kld_file_stat stat; + struct kld_file_stat *stat; int error, version; /* @@ -1236,10 +1236,12 @@ sys_kldstat(struct thread *td, struct kldstat_args *ua version != sizeof(struct kld_file_stat)) return (EINVAL); - error = kern_kldstat(td, uap->fileid, &stat); - if (error != 0) - return (error); - return (copyout(&stat, uap->stat, version)); + stat = malloc(sizeof(*stat), M_TEMP, M_WAITOK | M_ZERO); + error = kern_kldstat(td, uap->fileid, stat); + if (error == 0) + error = copyout(stat, uap->stat, version); + free(stat, M_TEMP); + return (error); } int From owner-svn-src-stable@freebsd.org Thu Nov 16 06:55:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC2CBDBFE01; Thu, 16 Nov 2017 06:55:58 +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 mx1.freebsd.org (Postfix) with ESMTPS id B6DB56F87D; Thu, 16 Nov 2017 06:55:58 +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 vAG6tvwX017378; Thu, 16 Nov 2017 06:55:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAG6tvMD017377; Thu, 16 Nov 2017 06:55:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711160655.vAG6tvMD017377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 16 Nov 2017 06:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325885 - stable/11/tests/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/tests/sys/kern X-SVN-Commit-Revision: 325885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 06:55:59 -0000 Author: jhb Date: Thu Nov 16 06:55:57 2017 New Revision: 325885 URL: https://svnweb.freebsd.org/changeset/base/325885 Log: MFC 324993: Add a test for sending a signal while stepping a thread via PT_STEP. Modified: stable/11/tests/sys/kern/ptrace_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/kern/ptrace_test.c ============================================================================== --- stable/11/tests/sys/kern/ptrace_test.c Thu Nov 16 02:42:37 2017 (r325884) +++ stable/11/tests/sys/kern/ptrace_test.c Thu Nov 16 06:55:57 2017 (r325885) @@ -3377,6 +3377,92 @@ ATF_TC_BODY(ptrace__PT_ATTACH_with_SBDRY_thread, tc) ATF_REQUIRE(close(fd) == 0); } +static void +sigusr1_step_handler(int sig) +{ + + CHILD_REQUIRE(sig == SIGUSR1); + raise(SIGABRT); +} + +/* + * Verify that PT_STEP with a signal invokes the signal before + * stepping the next instruction (and that the next instruction is + * stepped correctly). + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_STEP_with_signal); +ATF_TC_BODY(ptrace__PT_STEP_with_signal, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + signal(SIGUSR1, sigusr1_step_handler); + raise(SIGABRT); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The next stop should report the SIGABRT in the child body. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGABRT); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SI); + ATF_REQUIRE(pl.pl_siginfo.si_signo == SIGABRT); + + /* Step the child process inserting SIGUSR1. */ + ATF_REQUIRE(ptrace(PT_STEP, fpid, (caddr_t)1, SIGUSR1) == 0); + + /* The next stop should report the SIGABRT in the signal handler. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGABRT); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SI); + ATF_REQUIRE(pl.pl_siginfo.si_signo == SIGABRT); + + /* Continue the child process discarding the signal. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The next stop should report a trace trap from PT_STEP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE(pl.pl_flags & PL_FLAG_SI); + ATF_REQUIRE(pl.pl_siginfo.si_signo == SIGTRAP); + ATF_REQUIRE(pl.pl_siginfo.si_code == TRAP_TRACE); + + /* Continue the child to let it exit. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The last event should be for the child process's exit. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + ATF_TP_ADD_TCS(tp) { @@ -3428,6 +3514,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ptrace__parent_terminate_with_pending_sigstop2); ATF_TP_ADD_TC(tp, ptrace__event_mask_sigkill_discard); ATF_TP_ADD_TC(tp, ptrace__PT_ATTACH_with_SBDRY_thread); + ATF_TP_ADD_TC(tp, ptrace__PT_STEP_with_signal); return (atf_no_error()); } From owner-svn-src-stable@freebsd.org Thu Nov 16 12:51:40 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3CB9DDCD97; Thu, 16 Nov 2017 12:51:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 884C1798C5; Thu, 16 Nov 2017 12:51: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 vAGCpdDU097895; Thu, 16 Nov 2017 12:51:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGCpdTv097894; Thu, 16 Nov 2017 12:51:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201711161251.vAGCpdTv097894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 16 Nov 2017 12:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325890 - stable/11/sys/dev/hwpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/hwpmc X-SVN-Commit-Revision: 325890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 12:51:40 -0000 Author: kib Date: Thu Nov 16 12:51:39 2017 New Revision: 325890 URL: https://svnweb.freebsd.org/changeset/base/325890 Log: MFC r325758: Style bug. Modified: stable/11/sys/dev/hwpmc/hwpmc_logging.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_logging.c Thu Nov 16 10:47:21 2017 (r325889) +++ stable/11/sys/dev/hwpmc/hwpmc_logging.c Thu Nov 16 12:51:39 2017 (r325890) @@ -739,7 +739,7 @@ pmclog_deconfigure_log(struct pmc_owner *po) /* drop a reference to the fd */ if (po->po_file != NULL) { error = fdrop(po->po_file, curthread); - po->po_file = NULL; + po->po_file = NULL; } else error = 0; po->po_error = 0; From owner-svn-src-stable@freebsd.org Thu Nov 16 15:59:31 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F696DE1C1C; Thu, 16 Nov 2017 15:59:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAD3E7F9E2; Thu, 16 Nov 2017 15:59:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAGFxTZr077334; Thu, 16 Nov 2017 15:59:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGFxTh6077329; Thu, 16 Nov 2017 15:59:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711161559.vAGFxTh6077329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Nov 2017 15:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325898 - in stable/11/release: . arm tools X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/11/release: . arm tools X-SVN-Commit-Revision: 325898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 15:59:31 -0000 Author: gjb Date: Thu Nov 16 15:59:29 2017 New Revision: 325898 URL: https://svnweb.freebsd.org/changeset/base/325898 Log: MFC r320252, r320686, r325769: r320252: In release/release.sh: - Rename chroot_arm_armv6_build_release() to chroot_arm_build_release() and make it hardware agnostic (such as armv6 -vs- armv7 -vs- arm64). - Evaluate EMBEDDED_TARGET differently so release/tools/arm.subr can be used for arm/armv6 and arm64/aarch64. - Update comments and copyright. In release/tools/arm.subr: - In arm_create_disk(), change the default alignment from 63 to 512k, fixing a boot issue on arm64 and EFI. [1] - Update comments and copyright. r320686: Fix the ftp-stage target for RPI3 images by loosening the constraints on the TARGET and TARGET_ARCH variables. r325769: Update the GUMSTIX image build to use arm/arm TARGET/TARGET_ARCH. Update the TARGET/TARGET_ARCH matching in release/release.sh and release/Makefile.mirrors for simplification. Note: The RPI3.conf addition from r320252 is not included, as the 11-STABLE image fails to boot in my testing. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/Makefile.mirrors stable/11/release/arm/GUMSTIX.conf stable/11/release/release.sh stable/11/release/tools/arm.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/release/Makefile.mirrors ============================================================================== --- stable/11/release/Makefile.mirrors Thu Nov 16 15:26:39 2017 (r325897) +++ stable/11/release/Makefile.mirrors Thu Nov 16 15:59:29 2017 (r325898) @@ -21,7 +21,7 @@ STAGE_TARGETS?= iso-images-stage .endif .if (defined(EMBEDDED_TARGET) && !empty(EMBEDDED_TARGET)) || (defined(EMBEDDEDBUILD) && !empty(EMBEDDEDBUILD)) -. if ${TARGET} == "arm" || ${EMBEDDED_TARGET} == "arm" +. if ${TARGET:Marm*} != "" || ${EMBEDDED_TARGET:Marm*} != "" EMBEDDED= 1 . endif .endif @@ -57,7 +57,7 @@ TLD?= ${FTPDIR}/releases .endif .if defined(EMBEDDED) && !empty(EMBEDDED) -. if ${TARGET} == "arm" && ${TARGET_ARCH} == "armv6" +. if ${TARGET:Marm*} != "" && (${TARGET_ARCH:Marm*} != "" || ${TARGET_ARCH} == "aarch64") . if !defined(BOARDNAME) && empty(BOARDNAME) BOARDNAME:= ${KERNCONF} . else Modified: stable/11/release/arm/GUMSTIX.conf ============================================================================== --- stable/11/release/arm/GUMSTIX.conf Thu Nov 16 15:26:39 2017 (r325897) +++ stable/11/release/arm/GUMSTIX.conf Thu Nov 16 15:59:29 2017 (r325898) @@ -5,7 +5,7 @@ EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm" -EMBEDDED_TARGET_ARCH="armv6" +EMBEDDED_TARGET_ARCH="arm" EMBEDDEDPORTS="sysutils/u-boot-duovero" KERNEL="GUMSTIX" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" Modified: stable/11/release/release.sh ============================================================================== --- stable/11/release/release.sh Thu Nov 16 15:26:39 2017 (r325897) +++ stable/11/release/release.sh Thu Nov 16 15:59:29 2017 (r325898) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2013-2015 The FreeBSD Foundation +# Copyright (c) 2013-2017 The FreeBSD Foundation # Copyright (c) 2013 Glen Barber # Copyright (c) 2011 Nathan Whitehorn # All rights reserved. @@ -148,10 +148,11 @@ env_check() { WITH_COMPRESSED_IMAGES= NODOC=yes case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in - arm:armv6) - chroot_build_release_cmd="chroot_arm_armv6_build_release" + arm:arm*|arm64:aarch64) + chroot_build_release_cmd="chroot_arm_build_release" ;; *) + ;; esac fi @@ -346,13 +347,19 @@ chroot_build_release() { return 0 } # chroot_build_release() -# chroot_arm_armv6_build_release(): Create arm/armv6 SD card image. -chroot_arm_armv6_build_release() { +# chroot_arm_build_release(): Create arm SD card image. +chroot_arm_build_release() { load_target_env eval chroot ${CHROOTDIR} make -C /usr/src/release obj - if [ -e "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr" ]; then - . "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr" - fi + case ${EMBEDDED_TARGET} in + arm|arm64) + if [ -e "${RELENGDIR}/tools/arm.subr" ]; then + . "${RELENGDIR}/tools/arm.subr" + fi + ;; + *) + ;; + esac [ ! -z "${RELEASECONF}" ] && . "${RELEASECONF}" WORLDDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V WORLDDIR)" OBJDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V .OBJDIR)" @@ -381,7 +388,7 @@ chroot_arm_armv6_build_release() { > CHECKSUM.SHA256 return 0 -} # chroot_arm_armv6_build_release() +} # chroot_arm_build_release() # main(): Start here. main() { Modified: stable/11/release/tools/arm.subr ============================================================================== --- stable/11/release/tools/arm.subr Thu Nov 16 15:26:39 2017 (r325897) +++ stable/11/release/tools/arm.subr Thu Nov 16 15:59:29 2017 (r325898) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2015 The FreeBSD Foundation +# Copyright (c) 2015-2017 The FreeBSD Foundation # All rights reserved. # # Portions of this software were developed by Glen Barber @@ -27,7 +27,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# Common subroutines used to build arm/armv6 images. +# Common subroutines used to build arm SD card images. # # $FreeBSD$ # @@ -65,7 +65,7 @@ umount_loop() { arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - chroot ${CHROOTDIR} gpart add -t '!12' -a 63 -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} From owner-svn-src-stable@freebsd.org Thu Nov 16 16:00:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 406BFDE1C8E; Thu, 16 Nov 2017 16:00:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1F1F7FB1A; Thu, 16 Nov 2017 16:00:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAGG018g077448; Thu, 16 Nov 2017 16:00:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGG01pO077444; Thu, 16 Nov 2017 16:00:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201711161600.vAGG01pO077444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Nov 2017 16:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325899 - in stable/10/release: . arm tools X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/10/release: . arm tools X-SVN-Commit-Revision: 325899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 16:00:03 -0000 Author: gjb Date: Thu Nov 16 16:00:01 2017 New Revision: 325899 URL: https://svnweb.freebsd.org/changeset/base/325899 Log: MFC r320252, r320686, r325769: r320252: In release/release.sh: - Rename chroot_arm_armv6_build_release() to chroot_arm_build_release() and make it hardware agnostic (such as armv6 -vs- armv7 -vs- arm64). - Evaluate EMBEDDED_TARGET differently so release/tools/arm.subr can be used for arm/armv6 and arm64/aarch64. - Update comments and copyright. In release/tools/arm.subr: - In arm_create_disk(), change the default alignment from 63 to 512k, fixing a boot issue on arm64 and EFI. [1] - Update comments and copyright. r320686: Fix the ftp-stage target by loosening the constraints on the TARGET and TARGET_ARCH variables. r325769: Update the GUMSTIX image build to use arm/arm TARGET/TARGET_ARCH. Update the TARGET/TARGET_ARCH matching in release/release.sh and release/Makefile.mirrors for simplification. Note: The RPI3.conf addition from r320252 is not included, as it is not supported on 10-STABLE. Additionally, arm64/aarch64 changes are also excluded from this commit. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile.mirrors stable/10/release/arm/GUMSTIX.conf stable/10/release/release.sh stable/10/release/tools/arm.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile.mirrors ============================================================================== --- stable/10/release/Makefile.mirrors Thu Nov 16 15:59:29 2017 (r325898) +++ stable/10/release/Makefile.mirrors Thu Nov 16 16:00:01 2017 (r325899) @@ -21,7 +21,7 @@ STAGE_TARGETS?= iso-images-stage .endif .if (defined(EMBEDDED_TARGET) && !empty(EMBEDDED_TARGET)) || (defined(EMBEDDEDBUILD) && !empty(EMBEDDEDBUILD)) -. if ${TARGET} == "arm" || ${EMBEDDED_TARGET} == "arm" +. if ${TARGET:Marm*} != "" || ${EMBEDDED_TARGET:Marm*} != "" EMBEDDED= 1 . endif .endif @@ -57,7 +57,7 @@ TLD?= ${FTPDIR}/releases .endif .if defined(EMBEDDED) && !empty(EMBEDDED) -. if ${TARGET} == "arm" && ${TARGET_ARCH} == "armv6" +. if ${TARGET:Marm*} != "" && ${TARGET_ARCH:Marm*} != "" . if !defined(BOARDNAME) && empty(BOARDNAME) BOARDNAME:= ${KERNCONF} . else Modified: stable/10/release/arm/GUMSTIX.conf ============================================================================== --- stable/10/release/arm/GUMSTIX.conf Thu Nov 16 15:59:29 2017 (r325898) +++ stable/10/release/arm/GUMSTIX.conf Thu Nov 16 16:00:01 2017 (r325899) @@ -6,7 +6,7 @@ SRCBRANCH="base/stable/10@rHEAD" EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm" -EMBEDDED_TARGET_ARCH="armv6" +EMBEDDED_TARGET_ARCH="arm" EMBEDDEDPORTS="sysutils/u-boot-duovero" KERNEL="GUMSTIX" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Thu Nov 16 15:59:29 2017 (r325898) +++ stable/10/release/release.sh Thu Nov 16 16:00:01 2017 (r325899) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2013-2015 The FreeBSD Foundation +# Copyright (c) 2013-2017 The FreeBSD Foundation # Copyright (c) 2013 Glen Barber # Copyright (c) 2011 Nathan Whitehorn # All rights reserved. @@ -145,10 +145,11 @@ env_check() { WITH_COMPRESSED_IMAGES= NODOC=yes case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in - arm:armv6) - chroot_build_release_cmd="chroot_arm_armv6_build_release" + arm:arm*|arm64:aarch64) + chroot_build_release_cmd="chroot_arm_build_release" ;; *) + ;; esac fi @@ -340,13 +341,19 @@ chroot_build_release() { return 0 } # chroot_build_release() -# chroot_arm_armv6_build_release(): Create arm/armv6 SD card image. -chroot_arm_armv6_build_release() { +# chroot_arm_build_release(): Create arm SD card image. +chroot_arm_build_release() { load_target_env eval chroot ${CHROOTDIR} make -C /usr/src/release obj - if [ -e "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr" ]; then - . "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr" - fi + case ${EMBEDDED_TARGET} in + arm|arm64) + if [ -e "${RELENGDIR}/tools/arm.subr" ]; then + . "${RELENGDIR}/tools/arm.subr" + fi + ;; + *) + ;; + esac [ ! -z "${RELEASECONF}" ] && . "${RELEASECONF}" WORLDDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V WORLDDIR)" OBJDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V .OBJDIR)" @@ -375,7 +382,7 @@ chroot_arm_armv6_build_release() { > CHECKSUM.SHA256 return 0 -} # chroot_arm_armv6_build_release() +} # chroot_arm_build_release() # main(): Start here. main() { Modified: stable/10/release/tools/arm.subr ============================================================================== --- stable/10/release/tools/arm.subr Thu Nov 16 15:59:29 2017 (r325898) +++ stable/10/release/tools/arm.subr Thu Nov 16 16:00:01 2017 (r325899) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2015 The FreeBSD Foundation +# Copyright (c) 2015-2017 The FreeBSD Foundation # All rights reserved. # # Portions of this software were developed by Glen Barber @@ -27,7 +27,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# Common subroutines used to build arm/armv6 images. +# Common subroutines used to build arm SD card images. # # $FreeBSD$ # @@ -65,7 +65,7 @@ umount_loop() { arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - chroot ${CHROOTDIR} gpart add -t '!12' -a 63 -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} From owner-svn-src-stable@freebsd.org Thu Nov 16 18:22:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1A18DE50AA; Thu, 16 Nov 2017 18:22:04 +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 mx1.freebsd.org (Postfix) with ESMTPS id AC13D6415D; Thu, 16 Nov 2017 18:22:04 +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 vAGIM3ao038995; Thu, 16 Nov 2017 18:22:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGIM39h038993; Thu, 16 Nov 2017 18:22:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711161822.vAGIM39h038993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 16 Nov 2017 18:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325900 - in stable: 10/sys/amd64/vmm/io 11/sys/amd64/vmm/io X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/sys/amd64/vmm/io 11/sys/amd64/vmm/io X-SVN-Commit-Revision: 325900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 18:22:04 -0000 Author: jhb Date: Thu Nov 16 18:22:03 2017 New Revision: 325900 URL: https://svnweb.freebsd.org/changeset/base/325900 Log: MFC 325039: Rework pass through changes in r305485 to be safer. Specifically, devices that do not support PCI-e FLR and were not gracefully shutdown by the guest OS could continue to issue DMA requests after the VM was terminated. The changes in r305485 meant that those DMA requests were completed against the host's memory which could result in random memory corruption. Instead, leave ppt devices that are not attached to a VM disabled in the IOMMU and only restore the devices to the host domain if the ppt(4) driver is detached from a device. As an added safety belt, disable busmastering for a pass-through device when before adding it to the host domain during ppt(4) detach. PR: 222937 Modified: stable/11/sys/amd64/vmm/io/iommu.c stable/11/sys/amd64/vmm/io/ppt.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/amd64/vmm/io/iommu.c stable/10/sys/amd64/vmm/io/ppt.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/amd64/vmm/io/iommu.c ============================================================================== --- stable/11/sys/amd64/vmm/io/iommu.c Thu Nov 16 16:00:01 2017 (r325899) +++ stable/11/sys/amd64/vmm/io/iommu.c Thu Nov 16 18:22:03 2017 (r325900) @@ -174,6 +174,7 @@ iommu_init(void) { int error, bus, slot, func; vm_paddr_t maxaddr; + devclass_t dc; device_t dev; if (!iommu_enable) @@ -214,6 +215,7 @@ iommu_init(void) add_tag = EVENTHANDLER_REGISTER(pci_add_device, iommu_pci_add, NULL, 0); delete_tag = EVENTHANDLER_REGISTER(pci_delete_device, iommu_pci_delete, NULL, 0); + dc = devclass_find("ppt"); for (bus = 0; bus <= PCI_BUSMAX; bus++) { for (slot = 0; slot <= PCI_SLOTMAX; slot++) { for (func = 0; func <= PCI_FUNCMAX; func++) { @@ -221,7 +223,15 @@ iommu_init(void) if (dev == NULL) continue; - /* Everything belongs to the host domain. */ + /* Skip passthrough devices. */ + if (dc != NULL && + device_get_devclass(dev) == dc) + continue; + + /* + * Everything else belongs to the host + * domain. + */ iommu_add_device(host_domain, pci_get_rid(dev)); } Modified: stable/11/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/11/sys/amd64/vmm/io/ppt.c Thu Nov 16 16:00:01 2017 (r325899) +++ stable/11/sys/amd64/vmm/io/ppt.c Thu Nov 16 18:22:03 2017 (r325900) @@ -154,6 +154,7 @@ ppt_attach(device_t dev) ppt = device_get_softc(dev); + iommu_remove_device(iommu_host_domain(), pci_get_rid(dev)); num_pptdevs++; TAILQ_INSERT_TAIL(&pptdev_list, ppt, next); ppt->dev = dev; @@ -175,6 +176,8 @@ ppt_detach(device_t dev) return (EBUSY); num_pptdevs--; TAILQ_REMOVE(&pptdev_list, ppt, next); + pci_disable_busmaster(dev); + iommu_add_device(iommu_host_domain(), pci_get_rid(dev)); return (0); } @@ -368,7 +371,6 @@ ppt_assign_device(struct vm *vm, int bus, int slot, in true); pci_restore_state(ppt->dev); ppt->vm = vm; - iommu_remove_device(iommu_host_domain(), pci_get_rid(ppt->dev)); iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); return (0); } @@ -397,7 +399,6 @@ ppt_unassign_device(struct vm *vm, int bus, int slot, ppt_teardown_msi(ppt); ppt_teardown_msix(ppt); iommu_remove_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); - iommu_add_device(iommu_host_domain(), pci_get_rid(ppt->dev)); ppt->vm = NULL; return (0); } From owner-svn-src-stable@freebsd.org Thu Nov 16 18:22:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59B9ADE50A3; Thu, 16 Nov 2017 18:22:04 +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 mx1.freebsd.org (Postfix) with ESMTPS id 3444F6415A; Thu, 16 Nov 2017 18:22:04 +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 vAGIM3UW038988; Thu, 16 Nov 2017 18:22:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGIM3QP038986; Thu, 16 Nov 2017 18:22:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711161822.vAGIM3QP038986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 16 Nov 2017 18:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325900 - in stable: 10/sys/amd64/vmm/io 11/sys/amd64/vmm/io X-SVN-Group: stable-10 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 10/sys/amd64/vmm/io 11/sys/amd64/vmm/io X-SVN-Commit-Revision: 325900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 18:22:04 -0000 Author: jhb Date: Thu Nov 16 18:22:03 2017 New Revision: 325900 URL: https://svnweb.freebsd.org/changeset/base/325900 Log: MFC 325039: Rework pass through changes in r305485 to be safer. Specifically, devices that do not support PCI-e FLR and were not gracefully shutdown by the guest OS could continue to issue DMA requests after the VM was terminated. The changes in r305485 meant that those DMA requests were completed against the host's memory which could result in random memory corruption. Instead, leave ppt devices that are not attached to a VM disabled in the IOMMU and only restore the devices to the host domain if the ppt(4) driver is detached from a device. As an added safety belt, disable busmastering for a pass-through device when before adding it to the host domain during ppt(4) detach. PR: 222937 Modified: stable/10/sys/amd64/vmm/io/iommu.c stable/10/sys/amd64/vmm/io/ppt.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/amd64/vmm/io/iommu.c stable/11/sys/amd64/vmm/io/ppt.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/amd64/vmm/io/iommu.c ============================================================================== --- stable/10/sys/amd64/vmm/io/iommu.c Thu Nov 16 16:00:01 2017 (r325899) +++ stable/10/sys/amd64/vmm/io/iommu.c Thu Nov 16 18:22:03 2017 (r325900) @@ -158,6 +158,7 @@ iommu_init(void) { int error, bus, slot, func; vm_paddr_t maxaddr; + devclass_t dc; device_t dev; if (!iommu_enable) @@ -195,6 +196,7 @@ iommu_init(void) */ iommu_create_mapping(host_domain, 0, 0, maxaddr); + dc = devclass_find("ppt"); for (bus = 0; bus <= PCI_BUSMAX; bus++) { for (slot = 0; slot <= PCI_SLOTMAX; slot++) { for (func = 0; func <= PCI_FUNCMAX; func++) { @@ -202,7 +204,15 @@ iommu_init(void) if (dev == NULL) continue; - /* Everything belongs to the host domain. */ + /* Skip passthrough devices. */ + if (dc != NULL && + device_get_devclass(dev) == dc) + continue; + + /* + * Everything else belongs to the host + * domain. + */ iommu_add_device(host_domain, pci_get_rid(dev)); } Modified: stable/10/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.c Thu Nov 16 16:00:01 2017 (r325899) +++ stable/10/sys/amd64/vmm/io/ppt.c Thu Nov 16 18:22:03 2017 (r325900) @@ -154,6 +154,7 @@ ppt_attach(device_t dev) ppt = device_get_softc(dev); + iommu_remove_device(iommu_host_domain(), pci_get_rid(dev)); num_pptdevs++; TAILQ_INSERT_TAIL(&pptdev_list, ppt, next); ppt->dev = dev; @@ -175,6 +176,8 @@ ppt_detach(device_t dev) return (EBUSY); num_pptdevs--; TAILQ_REMOVE(&pptdev_list, ppt, next); + pci_disable_busmaster(dev); + iommu_add_device(iommu_host_domain(), pci_get_rid(dev)); return (0); } @@ -368,7 +371,6 @@ ppt_assign_device(struct vm *vm, int bus, int slot, in true); pci_restore_state(ppt->dev); ppt->vm = vm; - iommu_remove_device(iommu_host_domain(), pci_get_rid(ppt->dev)); iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); return (0); } @@ -397,7 +399,6 @@ ppt_unassign_device(struct vm *vm, int bus, int slot, ppt_teardown_msi(ppt); ppt_teardown_msix(ppt); iommu_remove_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); - iommu_add_device(iommu_host_domain(), pci_get_rid(ppt->dev)); ppt->vm = NULL; return (0); } From owner-svn-src-stable@freebsd.org Thu Nov 16 19:07:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 652BCDE630C; Thu, 16 Nov 2017 19:07:20 +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 mx1.freebsd.org (Postfix) with ESMTPS id 2F7D86624F; Thu, 16 Nov 2017 19:07:20 +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 vAGJ7JJe059272; Thu, 16 Nov 2017 19:07:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGJ7Jxu059271; Thu, 16 Nov 2017 19:07:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201711161907.vAGJ7Jxu059271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 16 Nov 2017 19:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325902 - stable/11/lib/libsysdecode X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/lib/libsysdecode X-SVN-Commit-Revision: 325902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 19:07:20 -0000 Author: jhb Date: Thu Nov 16 19:07:19 2017 New Revision: 325902 URL: https://svnweb.freebsd.org/changeset/base/325902 Log: MFC 319517: Add a cross-reference to sysdecode_socket_protocol(3). Modified: stable/11/lib/libsysdecode/sysdecode.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/sysdecode.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode.3 Thu Nov 16 18:52:58 2017 (r325901) +++ stable/11/lib/libsysdecode/sysdecode.3 Thu Nov 16 19:07:19 2017 (r325902) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2016 +.Dd June 3, 2017 .Dt SYSDECODE 3 .Os .Sh NAME @@ -76,6 +76,7 @@ A placeholder for use when the ABI is not known. .Xr sysdecode_mask 3 , .Xr sysdecode_quotactl_cmd 3 , .Xr sysdecode_sigcode 3 , +.Xr sysdecode_socket_protocol 3 , .Xr sysdecode_sockopt_name 3 , .Xr sysdecode_syscallnames 3 , .Xr sysdecode_utrace 3 From owner-svn-src-stable@freebsd.org Thu Nov 16 21:45:12 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DFC5DEA5B1; Thu, 16 Nov 2017 21:45: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 mx1.freebsd.org (Postfix) with ESMTPS id CD71A6BED7; Thu, 16 Nov 2017 21:45:11 +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 vAGLjARb028182; Thu, 16 Nov 2017 21:45:10 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGLjAiG028181; Thu, 16 Nov 2017 21:45:10 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201711162145.vAGLjAiG028181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 16 Nov 2017 21:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325904 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 325904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 21:45:12 -0000 Author: vangyzen Date: Thu Nov 16 21:45:10 2017 New Revision: 325904 URL: https://svnweb.freebsd.org/changeset/base/325904 Log: MFC r325764 Add __BEGIN_DECLS and __END_DECLS to This allows C++ programs to call _umtx_op(). Sponsored by: Dell EMC Modified: stable/11/sys/sys/umtx.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/umtx.h ============================================================================== --- stable/11/sys/sys/umtx.h Thu Nov 16 21:28:14 2017 (r325903) +++ stable/11/sys/sys/umtx.h Thu Nov 16 21:45:10 2017 (r325904) @@ -122,7 +122,11 @@ struct umtx_robust_lists_params { #ifndef _KERNEL +__BEGIN_DECLS + int _umtx_op(void *obj, int op, u_long val, void *uaddr, void *uaddr2); + +__END_DECLS #else From owner-svn-src-stable@freebsd.org Thu Nov 16 21:47:43 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 420BADEA845; Thu, 16 Nov 2017 21:47:43 +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 mx1.freebsd.org (Postfix) with ESMTPS id EE8456C1B1; Thu, 16 Nov 2017 21:47:42 +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 vAGLlgxT028331; Thu, 16 Nov 2017 21:47:42 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGLlgNv028330; Thu, 16 Nov 2017 21:47:42 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201711162147.vAGLlgNv028330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 16 Nov 2017 21:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325905 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 325905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 21:47:43 -0000 Author: vangyzen Date: Thu Nov 16 21:47:41 2017 New Revision: 325905 URL: https://svnweb.freebsd.org/changeset/base/325905 Log: MFC r325766 Fix formatting of _umtx_op(2) Do not use macros in the -width of a .Bl, since mandoc does not support them. Fix issues reported by igor and mandoc -Tlint. Use a .Bl for list of clock IDs instead of a comma list. Sponsored by: Dell EMC Modified: stable/11/lib/libc/sys/_umtx_op.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/_umtx_op.2 ============================================================================== --- stable/11/lib/libc/sys/_umtx_op.2 Thu Nov 16 21:45:10 2017 (r325904) +++ stable/11/lib/libc/sys/_umtx_op.2 Thu Nov 16 21:47:41 2017 (r325905) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2017 +.Dd November 13, 2017 .Dt _UMTX_OP 2 .Os .Sh NAME @@ -61,7 +61,7 @@ All objects require ABI-mandated alignment, but this i enforced consistently on all architectures. .Pp The following flags are defined for flag fields of all structures: -.Bl -tag -width "Dv USYNC_PROCESS_SHARED" +.Bl -tag -width indent .It Dv USYNC_PROCESS_SHARED Allow selection of the process-shared sleep queue for the thread sleep container, when the lock ownership cannot be granted immediately, @@ -77,7 +77,6 @@ See the .Sx SLEEP QUEUES subsection below for more details on sleep queues. .El -.Pp .Bl -hang -offset indent .It Sy Mutex .Bd -literal @@ -96,7 +95,7 @@ It contains either the thread identifier of the lock o locked state, or zero when the lock is unowned. The highest bit set indicates that there is contention on the lock. The constants are defined for special values: -.Bl -tag -width "Dv UMUTEX_RB_OWNERDEAD" +.Bl -tag -width indent .It Dv UMUTEX_UNOWNED Zero, the value stored in the unowned lock. .It Dv UMUTEX_CONTESTED @@ -113,7 +112,7 @@ The .Dv m_flags field may contain the following umutex-specific flags, in addition to the common flags: -.Bl -tag -width "Dv UMUTEX_NONCONSISTENT" +.Bl -tag -width indent .It Dv UMUTEX_PRIO_INHERIT Mutex implements .Em Priority Inheritance @@ -136,8 +135,9 @@ In the manual page, mutexes not having and .Dv UMUTEX_PRIO_PROTECT flags set, are called normal mutexes. -Each type of mutex, i.e. normal mutexes, priority-inherited mutexes, -and priority-protected mutexes, have a separate sleep queue associated +Each type of mutex +.Pq normal, priority-inherited, and priority-protected +has a separate sleep queue associated with the given key. .Pp For priority protected mutexes, the @@ -182,8 +182,8 @@ request. The .Dv c_flags field contains flags. -Only the common flags, i.e. -.Dv USYNC_PROCESS_SHARED , +Only the common flags +.Pq Dv USYNC_PROCESS_SHARED are defined for ucond. .Pp The @@ -193,23 +193,34 @@ member provides the clock identifier to use for timeou request has both the .Dv CVWAIT_CLOCKID flag and the timeout specified. -Valid clock identifiers are subset of the valid clock ids for the -.Xr clock_gettime 2 -syscall, namely, -.Dv CLOCK_REALTIME , -.Dv CLOCK_VIRTUAL , -.Dv CLOCK_PROF , -.Dv CLOCK_MONOTONIC , -.Dv CLOCK_UPTIME , -.Dv CLOCK_UPTIME_PRECISE , -.Dv CLOCK_UPTIME_FAST , -.Dv CLOCK_REALTIME_PRECISE , -.Dv CLOCK_REALTIME_FAST , -.Dv CLOCK_MONOTONIC_PRECISE , -.Dv CLOCK_MONOTONIC_FAST , -and +Valid clock identifiers are a subset of those for +.Xr clock_gettime 2 : +.Bl -bullet -compact +.It +.Dv CLOCK_MONOTONIC +.It +.Dv CLOCK_MONOTONIC_FAST +.It +.Dv CLOCK_MONOTONIC_PRECISE +.It +.Dv CLOCK_PROF +.It +.Dv CLOCK_REALTIME +.It +.Dv CLOCK_REALTIME_FAST +.It +.Dv CLOCK_REALTIME_PRECISE +.It .Dv CLOCK_SECOND -are allowed. +.It +.Dv CLOCK_UPTIME +.It +.Dv CLOCK_UPTIME_FAST +.It +.Dv CLOCK_UPTIME_PRECISE +.It +.Dv CLOCK_VIRTUAL +.El .It Sy Reader/writer lock .Bd -literal struct urwlock { @@ -228,7 +239,7 @@ granted. Names of the .Dv rw_state bits are following: -.Bl -tag -width "Dv URWLOCK_WRITE_WAITERS" +.Bl -tag -width indent .It Dv URWLOCK_WRITE_OWNER Write lock was granted. .It Dv URWLOCK_WRITE_WAITERS @@ -253,7 +264,7 @@ The following flags for the member of .Vt struct urwlock are defined, in addition to the common flags: -.Bl -tag -width "Dv URWLOCK_PREFER_READER" +.Bl -tag -width indent .It Dv URWLOCK_PREFER_READER If specified, immediately grant read lock requests when .Dv urwlock @@ -302,7 +313,7 @@ The .Dv USEM_COUNT() macro, applied to the .Dv _count -word, returns the current semaphore counter, i.e. the number of posts +word, returns the current semaphore counter, which is the number of posts issued on the semaphore. .Pp The following bits for the @@ -310,7 +321,7 @@ The following bits for the member of .Vt struct _usem2 are defined, in addition to the common flags: -.Bl -tag -width "Dv USEM_NAMED" +.Bl -tag -width indent .It Dv USEM_NAMED Flag is ignored by kernel. .El @@ -359,7 +370,7 @@ Interval counting is always performed by the monotonic The .Dv _flags argument allows the following flags to further define the timeout behaviour: -.Bl -tag -width "It Dv UMTX_ABSTIME" +.Bl -tag -width indent .It Dv UMTX_ABSTIME The .Dv _timeout @@ -374,7 +385,6 @@ start. .El .El .Ss SLEEP QUEUES -.Pp When a locking request cannot be immediately satisfied, the thread is typically put to .Em sleep , @@ -416,7 +426,7 @@ regardless of the kind of backing memory. .Pp Only the address of the start byte of the variable specified as key is important for determining corresponding sleep queue. -The size of the variable does not matter, so e.g. sleep on the same +The size of the variable does not matter, so, for example, sleep on the same address interpeted as .Vt uint32_t and @@ -505,11 +515,11 @@ error for lock attempts, without granting the lock. The following operations, requested by the .Fa op argument to the function, are implemented: -.Bl -tag -width "It Dv UMTX_OP_WAIT_UINT_PRIVATE" +.Bl -tag -width indent .It Dv UMTX_OP_WAIT Wait. The arguments for the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to a variable of type .Vt long . @@ -558,7 +568,7 @@ Optionally, a timeout for the request may be specified Wake the threads possibly sleeping due to .Dv UMTX_OP_WAIT . The arguments for the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to a variable, used as a key to find sleeping threads. .It Fa val @@ -572,7 +582,7 @@ to wake up all waiters. .It Dv UMTX_OP_MUTEX_TRYLOCK Try to lock umutex. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .El @@ -585,7 +595,7 @@ instead of sleeping if the lock cannot be obtained imm .It Dv UMTX_OP_MUTEX_LOCK Lock umutex. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .El @@ -624,7 +634,7 @@ from a signal handler. .It Dv UMTX_OP_MUTEX_UNLOCK Unlock umutex. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .El @@ -661,7 +671,7 @@ priority protected protocol mutex. .It Dv UMTX_OP_SET_CEILING Set ceiling for the priority protected umutex. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "uaddr" .It Fa obj Pointer to the umutex. .It Fa val @@ -696,7 +706,7 @@ interface. .It Dv UMTX_OP_CV_WAIT Wait for a condition. The arguments to the request are: -.Bl -tag -width "It Fa uaddr2" +.Bl -tag -width "uaddr2" .It Fa obj Pointer to the .Vt struct ucond . @@ -743,7 +753,7 @@ After wakeup, the umutex is not relocked. .Pp The following flags are defined: -.Bl -tag -width "Dv CVWAIT_CLOCKID" +.Bl -tag -width "CVWAIT_CLOCKID" .It Dv CVWAIT_ABSTIME Timeout is absolute. .It Dv CVWAIT_CLOCKID @@ -782,7 +792,7 @@ error. .It Dv UMTX_OP_CV_SIGNAL Wake up one condition waiter. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to .Vt struct ucond . @@ -800,7 +810,7 @@ is cleared. .It Dv UMTX_OP_CV_BROADCAST Wake up all condition waiters. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to .Vt struct ucond . @@ -820,14 +830,14 @@ Same as but the type of the variable pointed to by .Fa obj is -.Vt u_int , -i.e. 32-bit integer. +.Vt u_int +.Pq a 32-bit integer . .It Dv UMTX_OP_RW_RDLOCK Read-lock a .Vt struct rwlock lock. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the lock (of type .Vt struct rwlock ) @@ -837,7 +847,7 @@ Additional flags to augment locking behaviour. The valid flags in the .Fa val argument are: -.Bl -tag -width "It Dv URWLOCK_PREFER_READER" +.Bl -tag -width indent .It Dv URWLOCK_PREFER_READER .El .El @@ -889,7 +899,7 @@ Write-lock a .Vt struct rwlock lock. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the lock (of type .Vt struct rwlock ) @@ -925,7 +935,7 @@ error. .It Dv UMTX_OP_RW_UNLOCK Unlock rwlock. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the lock (of type .Vt struct rwlock ) @@ -967,7 +977,7 @@ but unconditionally select the process-private sleep q .It Dv UMTX_OP_MUTEX_WAIT Wait for mutex availability. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Address of the mutex. .El @@ -991,7 +1001,6 @@ priority inherited protocol mutexes. .Pp Optionally, a timeout for the request may be specified. .Pp -.Pp A request with a timeout specified is not restartable. An unblocked signal delivered during the wait always results in sleep interruption and @@ -1007,7 +1016,7 @@ member .It Dv UMTX_OP_NWAKE_PRIVATE Wake up a batch of sleeping threads. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the array of pointers. .It Fa val @@ -1024,7 +1033,7 @@ being the byte addressed by the array element. .It Dv UMTX_OP_MUTEX_WAKE Check if a normal umutex is unlocked and wake up a waiter. The arguments for the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .El @@ -1058,7 +1067,7 @@ bit may then modify freed memory. .It Dv UMTX_OP_MUTEX_WAKE2 Check if a umutex is unlocked and wake up a waiter. The arguments for the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the umutex. .It Fa val @@ -1088,11 +1097,12 @@ word of the .It Dv UMTX_OP_SEM2_WAIT Wait until semaphore is available. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the semaphore (of type .Vt struct _usem2 ) . .El +.Pp Put the requesting thread onto a sleep queue if the semaphore counter is zero. If the thread is put to sleep, the @@ -1117,7 +1127,7 @@ error. .It Dv UMTX_OP_SEM2_WAKE Wake up waiters on semaphore lock. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "obj" .It Fa obj Pointer to the semaphore (of type .Vt struct _usem2 ) . @@ -1145,7 +1155,7 @@ The argument specifies the sub-request of the .Dv UMTX_OP_SHM request: -.Bl -tag -width "Dv UMTX_SHM_DESTROY" +.Bl -tag -width indent .It Dv UMTX_SHM_CREAT Creates the anonymous shared memory object, which can be looked up with the specified key @@ -1191,7 +1201,7 @@ creation or lookup. .It Dv UMTX_OP_ROBUST_LISTS Register the list heads for the current thread's robust mutex lists. The arguments to the request are: -.Bl -tag -width "It Fa obj" +.Bl -tag -width "uaddr" .It Fa val Size of the structure passed in the .Fa uaddr @@ -1261,8 +1271,8 @@ variable is set to indicate the error. .Sh ERRORS The .Fn _umtx_op -operations will return the following errors: -.Bl -tag -width "Bq Er ENOTRECOVERABLE" +operations can fail with the following errors: +.Bl -tag -width "[ETIMEDOUT]" .It Bq Er EFAULT One of the arguments point to invalid memory. .It Bq Er EINVAL From owner-svn-src-stable@freebsd.org Thu Nov 16 22:25:14 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ADB4DEB6B6; Thu, 16 Nov 2017 22:25:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 798586DB0E; Thu, 16 Nov 2017 22:25: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 vAGMPCid045880; Thu, 16 Nov 2017 22:25:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGMPCJn045879; Thu, 16 Nov 2017 22:25:12 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162225.vAGMPCJn045879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 22:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325907 - stable/11/sys/geom X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/geom X-SVN-Commit-Revision: 325907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 22:25:14 -0000 Author: avg Date: Thu Nov 16 22:25:12 2017 New Revision: 325907 URL: https://svnweb.freebsd.org/changeset/base/325907 Log: MFC r325227,r325272: geom_slice: do not destroy softc until providers are gone Modified: stable/11/sys/geom/geom_slice.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/geom_slice.c ============================================================================== --- stable/11/sys/geom/geom_slice.c Thu Nov 16 22:14:49 2017 (r325906) +++ stable/11/sys/geom/geom_slice.c Thu Nov 16 22:25:12 2017 (r325907) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -72,10 +71,19 @@ g_slice_alloc(unsigned nslice, unsigned scsize) } static void -g_slice_free(struct g_slicer *gsp) +g_slice_free(struct g_geom *gp) { + struct g_slicer *gsp; - if (gsp == NULL) /* XXX: phk thinks about this */ + gsp = gp->softc; + gp->softc = NULL; + + /* + * We can get multiple spoiled events before wither-washer + * detaches our consumer, so this can get called multiple + * times. + */ + if (gsp == NULL) return; g_free(gsp->slices); if (gsp->hotspot != NULL) @@ -127,6 +135,15 @@ g_slice_access(struct g_provider *pp, int dr, int dw, if ((cp->acr + dr) == 0 && (cp->acw + dw) == 0 && (cp->ace + de) == 1) de--; error = g_access(cp, dr, dw, de); + + /* + * Free the softc if all providers have been closed and this geom + * is being removed. + */ + if (error == 0 && (gp->flags & G_GEOM_WITHER) != 0 && + (cp->acr + cp->acw + cp->ace) == 0) + g_slice_free(gp); + return (error); } @@ -470,21 +487,32 @@ g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t o } void -g_slice_spoiled(struct g_consumer *cp) +g_slice_orphan(struct g_consumer *cp) { struct g_geom *gp; - struct g_slicer *gsp; g_topology_assert(); gp = cp->geom; - g_trace(G_T_TOPOLOGY, "g_slice_spoiled(%p/%s)", cp, gp->name); - cp->flags |= G_CF_ORPHAN; - gsp = gp->softc; - gp->softc = NULL; - g_slice_free(gsp); + g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, gp->name); g_wither_geom(gp, ENXIO); + + /* + * We can safely free the softc now if there are no accesses, + * otherwise g_slice_access() will do that after the last close. + */ + if ((cp->acr + cp->acw + cp->ace) == 0) + g_slice_free(gp); } +void +g_slice_spoiled(struct g_consumer *cp) +{ + + g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, cp->geom->name); + cp->flags |= G_CF_ORPHAN; + g_slice_orphan(cp); +} + int g_slice_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp) { @@ -507,10 +535,10 @@ g_slice_new(struct g_class *mp, u_int slices, struct g gp = g_new_geomf(mp, "%s", pp->name); gsp = g_slice_alloc(slices, extra); gsp->start = start; - gp->access = g_slice_access; - gp->orphan = g_slice_orphan; gp->softc = gsp; gp->start = g_slice_start; + gp->access = g_slice_access; + gp->orphan = g_slice_orphan; gp->spoiled = g_slice_spoiled; if (gp->dumpconf == NULL) gp->dumpconf = g_slice_dumpconf; @@ -529,19 +557,4 @@ g_slice_new(struct g_class *mp, u_int slices, struct g *vp = gsp->softc; *cpp = cp; return (gp); -} - -void -g_slice_orphan(struct g_consumer *cp) -{ - struct g_slicer *gsp; - - g_trace(G_T_TOPOLOGY, "g_slice_orphan(%p/%s)", cp, cp->provider->name); - g_topology_assert(); - - /* XXX: Not good enough we leak the softc and its suballocations */ - gsp = cp->geom->softc; - cp->geom->softc = NULL; - g_slice_free(gsp); - g_wither_geom(cp->geom, ENXIO); } From owner-svn-src-stable@freebsd.org Thu Nov 16 22:37:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B13FDEBB66; Thu, 16 Nov 2017 22:37: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 mx1.freebsd.org (Postfix) with ESMTPS id DC9ED6E7F3; Thu, 16 Nov 2017 22:37: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 vAGMb4Ow050830; Thu, 16 Nov 2017 22:37:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGMb4q6050829; Thu, 16 Nov 2017 22:37:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162237.vAGMb4q6050829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 22:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325908 - stable/10/sys/geom X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/geom X-SVN-Commit-Revision: 325908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 22:37:05 -0000 Author: avg Date: Thu Nov 16 22:37:03 2017 New Revision: 325908 URL: https://svnweb.freebsd.org/changeset/base/325908 Log: MFC r325227,r325272: geom_slice: do not destroy softc until providers are gone Note: there was a merge conflict, likely because of a missing MFC of an earlier change. Modified: stable/10/sys/geom/geom_slice.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_slice.c ============================================================================== --- stable/10/sys/geom/geom_slice.c Thu Nov 16 22:25:12 2017 (r325907) +++ stable/10/sys/geom/geom_slice.c Thu Nov 16 22:37:03 2017 (r325908) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -72,10 +71,19 @@ g_slice_alloc(unsigned nslice, unsigned scsize) } static void -g_slice_free(struct g_slicer *gsp) +g_slice_free(struct g_geom *gp) { + struct g_slicer *gsp; - if (gsp == NULL) /* XXX: phk thinks about this */ + gsp = gp->softc; + gp->softc = NULL; + + /* + * We can get multiple spoiled events before wither-washer + * detaches our consumer, so this can get called multiple + * times. + */ + if (gsp == NULL) return; g_free(gsp->slices); if (gsp->hotspot != NULL) @@ -127,6 +135,15 @@ g_slice_access(struct g_provider *pp, int dr, int dw, if ((cp->acr + dr) == 0 && (cp->acw + dw) == 0 && (cp->ace + de) == 1) de--; error = g_access(cp, dr, dw, de); + + /* + * Free the softc if all providers have been closed and this geom + * is being removed. + */ + if (error == 0 && (gp->flags & G_GEOM_WITHER) != 0 && + (cp->acr + cp->acw + cp->ace) == 0) + g_slice_free(gp); + return (error); } @@ -470,21 +487,32 @@ g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t o } void -g_slice_spoiled(struct g_consumer *cp) +g_slice_orphan(struct g_consumer *cp) { struct g_geom *gp; - struct g_slicer *gsp; g_topology_assert(); gp = cp->geom; - g_trace(G_T_TOPOLOGY, "g_slice_spoiled(%p/%s)", cp, gp->name); - cp->flags |= G_CF_ORPHAN; - gsp = gp->softc; - gp->softc = NULL; - g_slice_free(gsp); + g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, gp->name); g_wither_geom(gp, ENXIO); + + /* + * We can safely free the softc now if there are no accesses, + * otherwise g_slice_access() will do that after the last close. + */ + if ((cp->acr + cp->acw + cp->ace) == 0) + g_slice_free(gp); } +void +g_slice_spoiled(struct g_consumer *cp) +{ + + g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, cp->geom->name); + cp->flags |= G_CF_ORPHAN; + g_slice_orphan(cp); +} + int g_slice_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp) { @@ -507,10 +535,10 @@ g_slice_new(struct g_class *mp, u_int slices, struct g gp = g_new_geomf(mp, "%s", pp->name); gsp = g_slice_alloc(slices, extra); gsp->start = start; - gp->access = g_slice_access; - gp->orphan = g_slice_orphan; gp->softc = gsp; gp->start = g_slice_start; + gp->access = g_slice_access; + gp->orphan = g_slice_orphan; gp->spoiled = g_slice_spoiled; if (gp->dumpconf == NULL) gp->dumpconf = g_slice_dumpconf; @@ -529,16 +557,4 @@ g_slice_new(struct g_class *mp, u_int slices, struct g *vp = gsp->softc; *cpp = cp; return (gp); -} - -void -g_slice_orphan(struct g_consumer *cp) -{ - - g_trace(G_T_TOPOLOGY, "g_slice_orphan(%p/%s)", cp, cp->provider->name); - g_topology_assert(); - - /* XXX: Not good enough we leak the softc and its suballocations */ - g_slice_free(cp->geom->softc); - g_wither_geom(cp->geom, ENXIO); } From owner-svn-src-stable@freebsd.org Thu Nov 16 22:44:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF6C5DEBDEA; Thu, 16 Nov 2017 22:44:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88FD36EC8D; Thu, 16 Nov 2017 22:44:52 +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 vAGMipXo054928; Thu, 16 Nov 2017 22:44:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGMipHH054927; Thu, 16 Nov 2017 22:44:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162244.vAGMipHH054927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 22:44:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325909 - stable/11/sys/cddl/contrib/opensolaris/common/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/common/zfs X-SVN-Commit-Revision: 325909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 22:44:52 -0000 Author: avg Date: Thu Nov 16 22:44:51 2017 New Revision: 325909 URL: https://svnweb.freebsd.org/changeset/base/325909 Log: MFC r325606: MFV r325605: 8713 Buffer overflow in dsl_dataset_name() Modified: stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c Thu Nov 16 22:37:03 2017 (r325908) +++ stable/11/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c Thu Nov 16 22:44:51 2017 (r325909) @@ -44,6 +44,7 @@ #include #endif +#include #include #include #include "zfs_namecheck.h" @@ -301,8 +302,14 @@ pool_namecheck(const char *pool, namecheck_err_t *why, /* * Make sure the name is not too long. + * If we're creating a pool with version >= SPA_VERSION_DSL_SCRUB (v11) + * we need to account for additional space needed by the origin ds which + * will also be snapshotted: "poolname"+"/"+"$ORIGIN"+"@"+"$ORIGIN". + * Play it safe and enforce this limit even if the pool version is < 11 + * so it can be upgraded without issues. */ - if (strlen(pool) >= ZFS_MAX_DATASET_NAME_LEN) { + if (strlen(pool) >= (ZFS_MAX_DATASET_NAME_LEN - 2 - + strlen(ORIGIN_DIR_NAME) * 2)) { if (why) *why = NAME_ERR_TOOLONG; return (-1); From owner-svn-src-stable@freebsd.org Thu Nov 16 22:47:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F9B7DEBE79; Thu, 16 Nov 2017 22:47:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 289606EDE8; Thu, 16 Nov 2017 22:47:42 +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 vAGMlfl0055103; Thu, 16 Nov 2017 22:47:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGMlfuv055102; Thu, 16 Nov 2017 22:47:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162247.vAGMlfuv055102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 22:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325910 - stable/10/sys/cddl/contrib/opensolaris/common/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/common/zfs X-SVN-Commit-Revision: 325910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 22:47:42 -0000 Author: avg Date: Thu Nov 16 22:47:41 2017 New Revision: 325910 URL: https://svnweb.freebsd.org/changeset/base/325910 Log: MFC r325606: MFV r325605: 8713 Buffer overflow in dsl_dataset_name() Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c Thu Nov 16 22:44:51 2017 (r325909) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c Thu Nov 16 22:47:41 2017 (r325910) @@ -44,6 +44,7 @@ #include #endif +#include #include #include #include "zfs_namecheck.h" @@ -296,8 +297,14 @@ pool_namecheck(const char *pool, namecheck_err_t *why, /* * Make sure the name is not too long. + * If we're creating a pool with version >= SPA_VERSION_DSL_SCRUB (v11) + * we need to account for additional space needed by the origin ds which + * will also be snapshotted: "poolname"+"/"+"$ORIGIN"+"@"+"$ORIGIN". + * Play it safe and enforce this limit even if the pool version is < 11 + * so it can be upgraded without issues. */ - if (strlen(pool) >= ZFS_MAX_DATASET_NAME_LEN) { + if (strlen(pool) >= (ZFS_MAX_DATASET_NAME_LEN - 2 - + strlen(ORIGIN_DIR_NAME) * 2)) { if (why) *why = NAME_ERR_TOOLONG; return (-1); From owner-svn-src-stable@freebsd.org Thu Nov 16 22:53:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85542DEC32A; Thu, 16 Nov 2017 22:53:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CB9F6F40F; Thu, 16 Nov 2017 22:53:37 +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 vAGMraB6059396; Thu, 16 Nov 2017 22:53:36 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGMraiQ059394; Thu, 16 Nov 2017 22:53:36 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162253.vAGMraiQ059394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 22:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325911 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 325911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 22:53:37 -0000 Author: avg Date: Thu Nov 16 22:53:36 2017 New Revision: 325911 URL: https://svnweb.freebsd.org/changeset/base/325911 Log: MFC r325608: MFV r325607: 8607 zfs: variable set but not used Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Nov 16 22:47:41 2017 (r325910) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Nov 16 22:53:36 2017 (r325911) @@ -487,7 +487,6 @@ dsl_pool_create(spa_t *spa, nvlist_t *zplprops, uint64 int err; dsl_pool_t *dp = dsl_pool_open_impl(spa, txg); dmu_tx_t *tx = dmu_tx_create_assigned(dp, txg); - objset_t *os; dsl_dataset_t *ds; uint64_t obj; @@ -538,12 +537,15 @@ dsl_pool_create(spa_t *spa, nvlist_t *zplprops, uint64 /* create the root objset */ VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, &ds)); - rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); - os = dmu_objset_create_impl(dp->dp_spa, ds, - dsl_dataset_get_blkptr(ds), DMU_OST_ZFS, tx); - rrw_exit(&ds->ds_bp_rwlock, FTAG); #ifdef _KERNEL - zfs_create_fs(os, kcred, zplprops, tx); + { + objset_t *os; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); + os = dmu_objset_create_impl(dp->dp_spa, ds, + dsl_dataset_get_blkptr(ds), DMU_OST_ZFS, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); + zfs_create_fs(os, kcred, zplprops, tx); + } #endif dsl_dataset_rele(ds, FTAG); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Nov 16 22:47:41 2017 (r325910) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Nov 16 22:53:36 2017 (r325911) @@ -5836,10 +5836,6 @@ zfs_ioc_send_space(const char *snapname, nvlist_t *inn dsl_dataset_t *tosnap; int error; char *fromname; - /* LINTED E_FUNC_SET_NOT_USED */ - boolean_t largeblockok; - /* LINTED E_FUNC_SET_NOT_USED */ - boolean_t embedok; boolean_t compressok; uint64_t space; @@ -5853,8 +5849,6 @@ zfs_ioc_send_space(const char *snapname, nvlist_t *inn return (error); } - largeblockok = nvlist_exists(innvl, "largeblockok"); - embedok = nvlist_exists(innvl, "embedok"); compressok = nvlist_exists(innvl, "compressok"); error = nvlist_lookup_string(innvl, "from", &fromname); @@ -5895,7 +5889,9 @@ zfs_ioc_send_space(const char *snapname, nvlist_t *inn goto out; } } else { - // If estimating the size of a full send, use dmu_send_estimate + /* + * If estimating the size of a full send, use dmu_send_estimate. + */ error = dmu_send_estimate(tosnap, NULL, compressok, &space); } From owner-svn-src-stable@freebsd.org Thu Nov 16 22:58:56 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5180DEC494; Thu, 16 Nov 2017 22:58:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E0EC6F609; Thu, 16 Nov 2017 22:58:56 +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 vAGMwtVm059700; Thu, 16 Nov 2017 22:58:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGMwtmc059699; Thu, 16 Nov 2017 22:58:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162258.vAGMwtmc059699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 22:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325912 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 325912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 22:58:56 -0000 Author: avg Date: Thu Nov 16 22:58:55 2017 New Revision: 325912 URL: https://svnweb.freebsd.org/changeset/base/325912 Log: MFC r325228: vdev_geom_close: close errored consumer even if vdev_reopening is set Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Nov 16 22:53:36 2017 (r325911) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Nov 16 22:58:55 2017 (r325912) @@ -932,13 +932,18 @@ skip_open: static void vdev_geom_close(vdev_t *vd) { + struct g_consumer *cp; - if (vd->vdev_reopening) - return; + cp = vd->vdev_tsd; DROP_GIANT(); g_topology_lock(); - vdev_geom_close_locked(vd); + + if (!vd->vdev_reopening || + (cp != NULL && ((cp->flags & G_CF_ORPHAN) != 0 || + (cp->provider != NULL && cp->provider->error != 0)))) + vdev_geom_close_locked(vd); + g_topology_unlock(); PICKUP_GIANT(); } From owner-svn-src-stable@freebsd.org Thu Nov 16 23:02:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87FACDEC6AA; Thu, 16 Nov 2017 23:02: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 mx1.freebsd.org (Postfix) with ESMTPS id 512066F894; Thu, 16 Nov 2017 23:02:05 +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 vAGN24nU061368; Thu, 16 Nov 2017 23:02:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGN2410061367; Thu, 16 Nov 2017 23:02:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162302.vAGN2410061367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 23:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325913 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 325913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 23:02:05 -0000 Author: avg Date: Thu Nov 16 23:02:04 2017 New Revision: 325913 URL: https://svnweb.freebsd.org/changeset/base/325913 Log: MFC r325228: vdev_geom_close: close errored consumer even if vdev_reopening is set Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Nov 16 22:58:55 2017 (r325912) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Nov 16 23:02:04 2017 (r325913) @@ -934,13 +934,18 @@ skip_open: static void vdev_geom_close(vdev_t *vd) { + struct g_consumer *cp; - if (vd->vdev_reopening) - return; + cp = vd->vdev_tsd; DROP_GIANT(); g_topology_lock(); - vdev_geom_close_locked(vd); + + if (!vd->vdev_reopening || + (cp != NULL && ((cp->flags & G_CF_ORPHAN) != 0 || + (cp->provider != NULL && cp->provider->error != 0)))) + vdev_geom_close_locked(vd); + g_topology_unlock(); PICKUP_GIANT(); } From owner-svn-src-stable@freebsd.org Thu Nov 16 23:27:29 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6E2ADED4DE; Thu, 16 Nov 2017 23:27:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94AAF70925; Thu, 16 Nov 2017 23:27:29 +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 vAGNRSrc072190; Thu, 16 Nov 2017 23:27:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGNRRcf072181; Thu, 16 Nov 2017 23:27:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162327.vAGNRRcf072181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 23:27:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325914 - in stable/11/cddl: contrib/opensolaris/cmd/zdb contrib/opensolaris/cmd/ztest contrib/opensolaris/lib/libcmdutils contrib/opensolaris/lib/libzfs/common contrib/opensolaris/lib/... X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/cddl: contrib/opensolaris/cmd/zdb contrib/opensolaris/cmd/ztest contrib/opensolaris/lib/libcmdutils contrib/opensolaris/lib/libzfs/common contrib/opensolaris/lib/libzpool/common contrib/o... X-SVN-Commit-Revision: 325914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 23:27:30 -0000 Author: avg Date: Thu Nov 16 23:27:27 2017 New Revision: 325914 URL: https://svnweb.freebsd.org/changeset/base/325914 Log: MFC r325035: MFV r325013,r325034: 640 number_to_scaled_string is duplicated in several commands FreeBSD note: of all libcmdutils functionality ZFS (and other illumos contrib code) currently uses only nicenum() function (which is similar to humanize_number but has some formatting differences). For this reason I decided to not port the whole library. As a result, nicenum.c from libcmdutils is compiled into libzfs and libzpool. This is a bit ugly, but works. If one day we are forced to create libillumos, then the file should be moved to that library. Added: stable/11/cddl/contrib/opensolaris/lib/libcmdutils/ - copied from r325035, head/cddl/contrib/opensolaris/lib/libcmdutils/ Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/11/cddl/contrib/opensolaris/lib/libzpool/common/util.c stable/11/cddl/lib/libzfs/Makefile stable/11/cddl/lib/libzpool/Makefile stable/11/cddl/usr.bin/ztest/Makefile stable/11/cddl/usr.sbin/zdb/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Nov 16 23:02:04 2017 (r325913) +++ stable/11/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Nov 16 23:27:27 2017 (r325914) @@ -63,6 +63,7 @@ #include #include #include +#include #undef verify #include @@ -276,12 +277,12 @@ dump_history_offsets(objset_t *os, uint64_t object, vo } static void -zdb_nicenum(uint64_t num, char *buf) +zdb_nicenum(uint64_t num, char *buf, size_t buflen) { if (dump_opt['P']) - (void) sprintf(buf, "%llu", (longlong_t)num); + (void) snprintf(buf, buflen, "%llu", (longlong_t)num); else - nicenum(num, buf); + nicenum(num, buf, sizeof (buf)); } const char histo_stars[] = "****************************************"; @@ -458,12 +459,17 @@ dump_bpobj(objset_t *os, uint64_t object, void *data, bpobj_phys_t *bpop = data; char bytes[32], comp[32], uncomp[32]; + /* make sure the output won't get truncated */ + CTASSERT(sizeof (bytes) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (comp) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (uncomp) >= NN_NUMBUF_SZ); + if (bpop == NULL) return; - zdb_nicenum(bpop->bpo_bytes, bytes); - zdb_nicenum(bpop->bpo_comp, comp); - zdb_nicenum(bpop->bpo_uncomp, uncomp); + zdb_nicenum(bpop->bpo_bytes, bytes, sizeof (bytes)); + zdb_nicenum(bpop->bpo_comp, comp, sizeof (comp)); + zdb_nicenum(bpop->bpo_uncomp, uncomp, sizeof (uncomp)); (void) printf("\t\tnum_blkptrs = %llu\n", (u_longlong_t)bpop->bpo_num_blkptrs); @@ -756,8 +762,11 @@ dump_metaslab_stats(metaslab_t *msp) avl_tree_t *t = &msp->ms_size_tree; int free_pct = range_tree_space(rt) * 100 / msp->ms_size; - zdb_nicenum(metaslab_block_maxsize(msp), maxbuf); + /* max sure nicenum has enough space */ + CTASSERT(sizeof (maxbuf) >= NN_NUMBUF_SZ); + zdb_nicenum(metaslab_block_maxsize(msp), maxbuf, sizeof (maxbuf)); + (void) printf("\t %25s %10lu %7s %6s %4s %4d%%\n", "segments", avl_numnodes(t), "maxsize", maxbuf, "freepct", free_pct); @@ -773,7 +782,8 @@ dump_metaslab(metaslab_t *msp) space_map_t *sm = msp->ms_sm; char freebuf[32]; - zdb_nicenum(msp->ms_size - space_map_allocated(sm), freebuf); + zdb_nicenum(msp->ms_size - space_map_allocated(sm), freebuf, + sizeof (freebuf)); (void) printf( "\tmetaslab %6llu offset %12llx spacemap %6llu free %5s\n", @@ -1356,6 +1366,9 @@ dump_dsl_dir(objset_t *os, uint64_t object, void *data time_t crtime; char nice[32]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (nice) >= NN_NUMBUF_SZ); + if (dd == NULL) return; @@ -1371,15 +1384,15 @@ dump_dsl_dir(objset_t *os, uint64_t object, void *data (u_longlong_t)dd->dd_origin_obj); (void) printf("\t\tchild_dir_zapobj = %llu\n", (u_longlong_t)dd->dd_child_dir_zapobj); - zdb_nicenum(dd->dd_used_bytes, nice); + zdb_nicenum(dd->dd_used_bytes, nice, sizeof (nice)); (void) printf("\t\tused_bytes = %s\n", nice); - zdb_nicenum(dd->dd_compressed_bytes, nice); + zdb_nicenum(dd->dd_compressed_bytes, nice, sizeof (nice)); (void) printf("\t\tcompressed_bytes = %s\n", nice); - zdb_nicenum(dd->dd_uncompressed_bytes, nice); + zdb_nicenum(dd->dd_uncompressed_bytes, nice, sizeof (nice)); (void) printf("\t\tuncompressed_bytes = %s\n", nice); - zdb_nicenum(dd->dd_quota, nice); + zdb_nicenum(dd->dd_quota, nice, sizeof (nice)); (void) printf("\t\tquota = %s\n", nice); - zdb_nicenum(dd->dd_reserved, nice); + zdb_nicenum(dd->dd_reserved, nice, sizeof (nice)); (void) printf("\t\treserved = %s\n", nice); (void) printf("\t\tprops_zapobj = %llu\n", (u_longlong_t)dd->dd_props_zapobj); @@ -1389,7 +1402,8 @@ dump_dsl_dir(objset_t *os, uint64_t object, void *data (u_longlong_t)dd->dd_flags); #define DO(which) \ - zdb_nicenum(dd->dd_used_breakdown[DD_USED_ ## which], nice); \ + zdb_nicenum(dd->dd_used_breakdown[DD_USED_ ## which], nice, \ + sizeof (nice)); \ (void) printf("\t\tused_breakdown[" #which "] = %s\n", nice) DO(HEAD); DO(SNAP); @@ -1408,15 +1422,22 @@ dump_dsl_dataset(objset_t *os, uint64_t object, void * char used[32], compressed[32], uncompressed[32], unique[32]; char blkbuf[BP_SPRINTF_LEN]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (used) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (compressed) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (uncompressed) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (unique) >= NN_NUMBUF_SZ); + if (ds == NULL) return; ASSERT(size == sizeof (*ds)); crtime = ds->ds_creation_time; - zdb_nicenum(ds->ds_referenced_bytes, used); - zdb_nicenum(ds->ds_compressed_bytes, compressed); - zdb_nicenum(ds->ds_uncompressed_bytes, uncompressed); - zdb_nicenum(ds->ds_unique_bytes, unique); + zdb_nicenum(ds->ds_referenced_bytes, used, sizeof (used)); + zdb_nicenum(ds->ds_compressed_bytes, compressed, sizeof (compressed)); + zdb_nicenum(ds->ds_uncompressed_bytes, uncompressed, + sizeof (uncompressed)); + zdb_nicenum(ds->ds_unique_bytes, unique, sizeof (unique)); snprintf_blkptr(blkbuf, sizeof (blkbuf), &ds->ds_bp); (void) printf("\t\tdir_obj = %llu\n", @@ -1475,12 +1496,15 @@ dump_bptree(objset_t *os, uint64_t obj, char *name) bptree_phys_t *bt; dmu_buf_t *db; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (bytes) >= NN_NUMBUF_SZ); + if (dump_opt['d'] < 3) return; VERIFY3U(0, ==, dmu_bonus_hold(os, obj, FTAG, &db)); bt = db->db_data; - zdb_nicenum(bt->bt_bytes, bytes); + zdb_nicenum(bt->bt_bytes, bytes, sizeof (bytes)); (void) printf("\n %s: %llu datasets, %s\n", name, (unsigned long long)(bt->bt_end - bt->bt_begin), bytes); dmu_buf_rele(db, FTAG); @@ -1512,13 +1536,18 @@ dump_full_bpobj(bpobj_t *bpo, char *name, int indent) char comp[32]; char uncomp[32]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (bytes) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (comp) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (uncomp) >= NN_NUMBUF_SZ); + if (dump_opt['d'] < 3) return; - zdb_nicenum(bpo->bpo_phys->bpo_bytes, bytes); + zdb_nicenum(bpo->bpo_phys->bpo_bytes, bytes, sizeof (bytes)); if (bpo->bpo_havesubobj && bpo->bpo_phys->bpo_subobjs != 0) { - zdb_nicenum(bpo->bpo_phys->bpo_comp, comp); - zdb_nicenum(bpo->bpo_phys->bpo_uncomp, uncomp); + zdb_nicenum(bpo->bpo_phys->bpo_comp, comp, sizeof (comp)); + zdb_nicenum(bpo->bpo_phys->bpo_uncomp, uncomp, sizeof (uncomp)); (void) printf(" %*s: object %llu, %llu local blkptrs, " "%llu subobjs in object %llu, %s (%s/%s comp)\n", indent * 8, name, @@ -1572,6 +1601,11 @@ dump_deadlist(dsl_deadlist_t *dl) char comp[32]; char uncomp[32]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (bytes) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (comp) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (uncomp) >= NN_NUMBUF_SZ); + if (dump_opt['d'] < 3) return; @@ -1580,9 +1614,9 @@ dump_deadlist(dsl_deadlist_t *dl) return; } - zdb_nicenum(dl->dl_phys->dl_used, bytes); - zdb_nicenum(dl->dl_phys->dl_comp, comp); - zdb_nicenum(dl->dl_phys->dl_uncomp, uncomp); + zdb_nicenum(dl->dl_phys->dl_used, bytes, sizeof (bytes)); + zdb_nicenum(dl->dl_phys->dl_comp, comp, sizeof (comp)); + zdb_nicenum(dl->dl_phys->dl_uncomp, uncomp, sizeof (uncomp)); (void) printf("\n Deadlist: %s (%s/%s comp)\n", bytes, comp, uncomp); @@ -1883,6 +1917,13 @@ dump_object(objset_t *os, uint64_t object, int verbosi char aux[50]; int error; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (iblk) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (dblk) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (lsize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (asize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (bonus_size) >= NN_NUMBUF_SZ); + if (*print_header) { (void) printf("\n%10s %3s %5s %5s %5s %5s %6s %s\n", "Object", "lvl", "iblk", "dblk", "dsize", "lsize", @@ -1903,11 +1944,11 @@ dump_object(objset_t *os, uint64_t object, int verbosi } dmu_object_info_from_dnode(dn, &doi); - zdb_nicenum(doi.doi_metadata_block_size, iblk); - zdb_nicenum(doi.doi_data_block_size, dblk); - zdb_nicenum(doi.doi_max_offset, lsize); - zdb_nicenum(doi.doi_physical_blocks_512 << 9, asize); - zdb_nicenum(doi.doi_bonus_size, bonus_size); + zdb_nicenum(doi.doi_metadata_block_size, iblk, sizeof (iblk)); + zdb_nicenum(doi.doi_data_block_size, dblk, sizeof (dblk)); + zdb_nicenum(doi.doi_max_offset, lsize, sizeof (lsize)); + zdb_nicenum(doi.doi_physical_blocks_512 << 9, asize, sizeof (asize)); + zdb_nicenum(doi.doi_bonus_size, bonus_size, sizeof (bonus_size)); (void) sprintf(fill, "%6.2f", 100.0 * doi.doi_fill_count * doi.doi_data_block_size / (object == 0 ? DNODES_PER_BLOCK : 1) / doi.doi_max_offset); @@ -1970,6 +2011,8 @@ dump_object(objset_t *os, uint64_t object, int verbosi for (;;) { char segsize[32]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (segsize) >= NN_NUMBUF_SZ); error = dnode_next_offset(dn, 0, &start, minlvl, blkfill, 0); if (error) @@ -1977,7 +2020,7 @@ dump_object(objset_t *os, uint64_t object, int verbosi end = start; error = dnode_next_offset(dn, DNODE_FIND_HOLE, &end, minlvl, blkfill, 0); - zdb_nicenum(end - start, segsize); + zdb_nicenum(end - start, segsize, sizeof (segsize)); (void) printf("\t\tsegment [%016llx, %016llx)" " size %5s\n", (u_longlong_t)start, (u_longlong_t)end, segsize); @@ -2008,6 +2051,9 @@ dump_dir(objset_t *os) int print_header = 1; int i, error; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (numbuf) >= NN_NUMBUF_SZ); + dsl_pool_config_enter(dmu_objset_pool(os), FTAG); dmu_objset_fast_stat(os, &dds); dsl_pool_config_exit(dmu_objset_pool(os), FTAG); @@ -2026,7 +2072,7 @@ dump_dir(objset_t *os) ASSERT3U(usedobjs, ==, BP_GET_FILL(os->os_rootbp)); - zdb_nicenum(refdbytes, numbuf); + zdb_nicenum(refdbytes, numbuf, sizeof (numbuf)); if (verbosity >= 4) { (void) snprintf(blkbuf, sizeof (blkbuf), ", rootbp "); @@ -2673,6 +2719,9 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr int sec_remaining = (zcb->zcb_totalasize - bytes) / 1024 / kb_per_sec; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (buf) >= NN_NUMBUF_SZ); + zfs_nicenum(bytes, buf, sizeof (buf)); (void) fprintf(stderr, "\r%5s completed (%4dMB/s) " @@ -3022,6 +3071,14 @@ dump_block_stats(spa_t *spa) char avg[32], gang[32]; char *typename; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (csize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (lsize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (psize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (asize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (avg) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (gang) >= NN_NUMBUF_SZ); + if (t < DMU_OT_NUMTYPES) typename = dmu_ot[t].ot_name; else @@ -3055,12 +3112,17 @@ dump_block_stats(spa_t *spa) zcb.zcb_type[ZB_TOTAL][t].zb_asize) continue; - zdb_nicenum(zb->zb_count, csize); - zdb_nicenum(zb->zb_lsize, lsize); - zdb_nicenum(zb->zb_psize, psize); - zdb_nicenum(zb->zb_asize, asize); - zdb_nicenum(zb->zb_asize / zb->zb_count, avg); - zdb_nicenum(zb->zb_gangs, gang); + zdb_nicenum(zb->zb_count, csize, + sizeof (csize)); + zdb_nicenum(zb->zb_lsize, lsize, + sizeof (lsize)); + zdb_nicenum(zb->zb_psize, psize, + sizeof (psize)); + zdb_nicenum(zb->zb_asize, asize, + sizeof (asize)); + zdb_nicenum(zb->zb_asize / zb->zb_count, avg, + sizeof (avg)); + zdb_nicenum(zb->zb_gangs, gang, sizeof (gang)); (void) printf("%6s\t%5s\t%5s\t%5s\t%5s" "\t%5.2f\t%6.2f\t", Modified: stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Nov 16 23:02:04 2017 (r325913) +++ stable/11/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Nov 16 23:27:27 2017 (r325914) @@ -25,6 +25,7 @@ * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Joyent, Inc. */ /* @@ -125,6 +126,7 @@ #include #include #include +#include static int ztest_fd_data = -1; static int ztest_fd_rand = -1; @@ -556,12 +558,13 @@ usage(boolean_t requested) { const ztest_shared_opts_t *zo = &ztest_opts_defaults; - char nice_vdev_size[10]; - char nice_gang_bang[10]; + char nice_vdev_size[NN_NUMBUF_SZ]; + char nice_gang_bang[NN_NUMBUF_SZ]; FILE *fp = requested ? stdout : stderr; - nicenum(zo->zo_vdev_size, nice_vdev_size); - nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang); + nicenum(zo->zo_vdev_size, nice_vdev_size, sizeof (nice_vdev_size)); + nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang, + sizeof (nice_gang_bang)); (void) fprintf(fp, "Usage: %s\n" "\t[-v vdevs (default: %llu)]\n" @@ -3158,10 +3161,10 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id) old_class_space, new_class_space); if (ztest_opts.zo_verbose >= 5) { - char oldnumbuf[6], newnumbuf[6]; + char oldnumbuf[NN_NUMBUF_SZ], newnumbuf[NN_NUMBUF_SZ]; - nicenum(old_class_space, oldnumbuf); - nicenum(new_class_space, newnumbuf); + nicenum(old_class_space, oldnumbuf, sizeof (oldnumbuf)); + nicenum(new_class_space, newnumbuf, sizeof (newnumbuf)); (void) printf("%s grew from %s to %s\n", spa->spa_name, oldnumbuf, newnumbuf); } @@ -6204,7 +6207,7 @@ main(int argc, char **argv) ztest_info_t *zi; ztest_shared_callstate_t *zc; char timebuf[100]; - char numbuf[6]; + char numbuf[NN_NUMBUF_SZ]; spa_t *spa; char *cmd; boolean_t hasalt; @@ -6341,7 +6344,7 @@ main(int argc, char **argv) now = MIN(now, zs->zs_proc_stop); print_time(zs->zs_proc_stop - now, timebuf); - nicenum(zs->zs_space, numbuf); + nicenum(zs->zs_space, numbuf, sizeof (numbuf)); (void) printf("Pass %3d, %8s, %3llu ENOSPC, " "%4.1f%% of %5s used, %3.0f%% done, %8s to go\n", Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Thu Nov 16 23:02:04 2017 (r325913) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Thu Nov 16 23:27:27 2017 (r325914) @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -579,42 +580,7 @@ zfs_strdup(libzfs_handle_t *hdl, const char *str) void zfs_nicenum(uint64_t num, char *buf, size_t buflen) { - uint64_t n = num; - int index = 0; - char u; - - while (n >= 1024) { - n /= 1024; - index++; - } - - u = " KMGTPE"[index]; - - if (index == 0) { - (void) snprintf(buf, buflen, "%llu", n); - } else if ((num & ((1ULL << 10 * index) - 1)) == 0) { - /* - * If this is an even multiple of the base, always display - * without any decimal precision. - */ - (void) snprintf(buf, buflen, "%llu%c", n, u); - } else { - /* - * We want to choose a precision that reflects the best choice - * for fitting in 5 characters. This can get rather tricky when - * we have numbers that are very close to an order of magnitude. - * For example, when displaying 10239 (which is really 9.999K), - * we want only a single place of precision for 10.0K. We could - * develop some complex heuristics for this, but it's much - * easier just to try each combination in turn. - */ - int i; - for (i = 2; i >= 0; i--) { - if (snprintf(buf, buflen, "%.*f%c", i, - (double)num / (1ULL << 10 * index), u) <= 5) - break; - } - } + nicenum(num, buf, buflen); } void Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Nov 16 23:02:04 2017 (r325913) +++ stable/11/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Nov 16 23:27:27 2017 (r325914) @@ -581,7 +581,7 @@ extern void kernel_init(int); extern void kernel_fini(void); struct spa; -extern void nicenum(uint64_t num, char *buf); +extern void nicenum(uint64_t num, char *buf, size_t); extern void show_pool_stats(struct spa *); extern int set_global_var(char *arg); Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/util.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzpool/common/util.c Thu Nov 16 23:02:04 2017 (r325913) +++ stable/11/cddl/contrib/opensolaris/lib/libzpool/common/util.c Thu Nov 16 23:27:27 2017 (r325914) @@ -38,33 +38,6 @@ * Routines needed by more than one client of libzpool. */ -void -nicenum(uint64_t num, char *buf) -{ - uint64_t n = num; - int index = 0; - char u; - - while (n >= 1024) { - n = (n + (1024 / 2)) / 1024; /* Round up or down */ - index++; - } - - u = " KMGTPE"[index]; - - if (index == 0) { - (void) sprintf(buf, "%llu", (u_longlong_t)n); - } else if (n < 10 && (num & (num - 1)) != 0) { - (void) sprintf(buf, "%.2f%c", - (double)num / (1ULL << 10 * index), u); - } else if (n < 100 && (num & (num - 1)) != 0) { - (void) sprintf(buf, "%.1f%c", - (double)num / (1ULL << 10 * index), u); - } else { - (void) sprintf(buf, "%llu%c", (u_longlong_t)n, u); - } -} - static void show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent) { @@ -97,15 +70,17 @@ show_vdev_stats(const char *desc, const char *ctype, n sec = MAX(1, vs->vs_timestamp / NANOSEC); - nicenum(vs->vs_alloc, used); - nicenum(vs->vs_space - vs->vs_alloc, avail); - nicenum(vs->vs_ops[ZIO_TYPE_READ] / sec, rops); - nicenum(vs->vs_ops[ZIO_TYPE_WRITE] / sec, wops); - nicenum(vs->vs_bytes[ZIO_TYPE_READ] / sec, rbytes); - nicenum(vs->vs_bytes[ZIO_TYPE_WRITE] / sec, wbytes); - nicenum(vs->vs_read_errors, rerr); - nicenum(vs->vs_write_errors, werr); - nicenum(vs->vs_checksum_errors, cerr); + nicenum(vs->vs_alloc, used, sizeof (used)); + nicenum(vs->vs_space - vs->vs_alloc, avail, sizeof (avail)); + nicenum(vs->vs_ops[ZIO_TYPE_READ] / sec, rops, sizeof (rops)); + nicenum(vs->vs_ops[ZIO_TYPE_WRITE] / sec, wops, sizeof (wops)); + nicenum(vs->vs_bytes[ZIO_TYPE_READ] / sec, rbytes, + sizeof (rbytes)); + nicenum(vs->vs_bytes[ZIO_TYPE_WRITE] / sec, wbytes, + sizeof (wbytes)); + nicenum(vs->vs_read_errors, rerr, sizeof (rerr)); + nicenum(vs->vs_write_errors, werr, sizeof (werr)); + nicenum(vs->vs_checksum_errors, cerr, sizeof (cerr)); (void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n", indent, "", Modified: stable/11/cddl/lib/libzfs/Makefile ============================================================================== --- stable/11/cddl/lib/libzfs/Makefile Thu Nov 16 23:02:04 2017 (r325913) +++ stable/11/cddl/lib/libzfs/Makefile Thu Nov 16 23:27:27 2017 (r325914) @@ -4,6 +4,7 @@ .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils/common LIB= zfs LIBADD= md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core @@ -15,6 +16,8 @@ SRCS= deviceid.c \ zmount.c \ zone.c +SRCS+= nicenum.c + SRCS+= libzfs_changelist.c \ libzfs_compat.c \ libzfs_config.c \ @@ -53,5 +56,6 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libn CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils .include Modified: stable/11/cddl/lib/libzpool/Makefile ============================================================================== --- stable/11/cddl/lib/libzpool/Makefile Thu Nov 16 23:02:04 2017 (r325913) +++ stable/11/cddl/lib/libzpool/Makefile Thu Nov 16 23:27:27 2017 (r325914) @@ -25,6 +25,8 @@ ATOMIC_SRCS= opensolaris_atomic.c .endif # UNICODE_SRCS .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/unicode +# LIBCMDUTILS_SRCS +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils/common LIB= zpool @@ -34,10 +36,11 @@ LUA_SRCS= ${LUA_OBJS:C/.o$/.c/} KERNEL_SRCS= kernel.c taskq.c util.c LIST_SRCS= list.c UNICODE_SRCS= u8_textprep.c +LIBCMDUTILS_SRCS=nicenum.c SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} ${LUA_SRCS} \ ${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS} \ - ${UNICODE_SRCS} + ${UNICODE_SRCS} ${LIBCMDUTILS_SRCS} WARNS?= 0 CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris @@ -51,6 +54,7 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/comm CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils # XXX: pthread doesn't have mutex_owned() equivalent, so we need to look # into libthr private structures. That's sooo evil, but it's only for # ZFS debugging tools needs. Modified: stable/11/cddl/usr.bin/ztest/Makefile ============================================================================== --- stable/11/cddl/usr.bin/ztest/Makefile Thu Nov 16 23:02:04 2017 (r325913) +++ stable/11/cddl/usr.bin/ztest/Makefile Thu Nov 16 23:27:27 2017 (r325914) @@ -11,6 +11,7 @@ CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys Modified: stable/11/cddl/usr.sbin/zdb/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/zdb/Makefile Thu Nov 16 23:02:04 2017 (r325913) +++ stable/11/cddl/usr.sbin/zdb/Makefile Thu Nov 16 23:27:27 2017 (r325914) @@ -12,6 +12,7 @@ CSTD= c99 CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common From owner-svn-src-stable@freebsd.org Thu Nov 16 23:36:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F3A2DED841; Thu, 16 Nov 2017 23:36: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 mx1.freebsd.org (Postfix) with ESMTPS id 3FFDF70E4B; Thu, 16 Nov 2017 23:36: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 vAGNaK82076393; Thu, 16 Nov 2017 23:36:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAGNaJre076384; Thu, 16 Nov 2017 23:36:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711162336.vAGNaJre076384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Nov 2017 23:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325915 - in stable/10/cddl: contrib/opensolaris/cmd/zdb contrib/opensolaris/cmd/ztest contrib/opensolaris/lib/libcmdutils contrib/opensolaris/lib/libzfs/common contrib/opensolaris/lib/... X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10/cddl: contrib/opensolaris/cmd/zdb contrib/opensolaris/cmd/ztest contrib/opensolaris/lib/libcmdutils contrib/opensolaris/lib/libzfs/common contrib/opensolaris/lib/libzpool/common contrib/o... X-SVN-Commit-Revision: 325915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 23:36:21 -0000 Author: avg Date: Thu Nov 16 23:36:19 2017 New Revision: 325915 URL: https://svnweb.freebsd.org/changeset/base/325915 Log: MFC r325035: MFV r325013,r325034: 640 number_to_scaled_string is duplicated in several commands FreeBSD note: of all libcmdutils functionality ZFS (and other illumos contrib code) currently uses only nicenum() function (which is similar to humanize_number but has some formatting differences). For this reason I decided to not port the whole library. As a result, nicenum.c from libcmdutils is compiled into libzfs and libzpool. This is a bit ugly, but works. If one day we are forced to create libillumos, then the file should be moved to that library. Added: stable/10/cddl/contrib/opensolaris/lib/libcmdutils/ - copied from r325035, head/cddl/contrib/opensolaris/lib/libcmdutils/ Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/10/cddl/contrib/opensolaris/lib/libzpool/common/util.c stable/10/cddl/lib/libzfs/Makefile stable/10/cddl/lib/libzpool/Makefile stable/10/cddl/usr.bin/ztest/Makefile stable/10/cddl/usr.sbin/zdb/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Nov 16 23:27:27 2017 (r325914) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Nov 16 23:36:19 2017 (r325915) @@ -60,6 +60,7 @@ #include #include #include +#include #undef verify #include @@ -257,12 +258,12 @@ dump_history_offsets(objset_t *os, uint64_t object, vo } static void -zdb_nicenum(uint64_t num, char *buf) +zdb_nicenum(uint64_t num, char *buf, size_t buflen) { if (dump_opt['P']) - (void) sprintf(buf, "%llu", (longlong_t)num); + (void) snprintf(buf, buflen, "%llu", (longlong_t)num); else - nicenum(num, buf); + nicenum(num, buf, sizeof (buf)); } const char histo_stars[] = "****************************************"; @@ -439,12 +440,17 @@ dump_bpobj(objset_t *os, uint64_t object, void *data, bpobj_phys_t *bpop = data; char bytes[32], comp[32], uncomp[32]; + /* make sure the output won't get truncated */ + CTASSERT(sizeof (bytes) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (comp) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (uncomp) >= NN_NUMBUF_SZ); + if (bpop == NULL) return; - zdb_nicenum(bpop->bpo_bytes, bytes); - zdb_nicenum(bpop->bpo_comp, comp); - zdb_nicenum(bpop->bpo_uncomp, uncomp); + zdb_nicenum(bpop->bpo_bytes, bytes, sizeof (bytes)); + zdb_nicenum(bpop->bpo_comp, comp, sizeof (comp)); + zdb_nicenum(bpop->bpo_uncomp, uncomp, sizeof (uncomp)); (void) printf("\t\tnum_blkptrs = %llu\n", (u_longlong_t)bpop->bpo_num_blkptrs); @@ -737,8 +743,11 @@ dump_metaslab_stats(metaslab_t *msp) avl_tree_t *t = &msp->ms_size_tree; int free_pct = range_tree_space(rt) * 100 / msp->ms_size; - zdb_nicenum(metaslab_block_maxsize(msp), maxbuf); + /* max sure nicenum has enough space */ + CTASSERT(sizeof (maxbuf) >= NN_NUMBUF_SZ); + zdb_nicenum(metaslab_block_maxsize(msp), maxbuf, sizeof (maxbuf)); + (void) printf("\t %25s %10lu %7s %6s %4s %4d%%\n", "segments", avl_numnodes(t), "maxsize", maxbuf, "freepct", free_pct); @@ -754,7 +763,8 @@ dump_metaslab(metaslab_t *msp) space_map_t *sm = msp->ms_sm; char freebuf[32]; - zdb_nicenum(msp->ms_size - space_map_allocated(sm), freebuf); + zdb_nicenum(msp->ms_size - space_map_allocated(sm), freebuf, + sizeof (freebuf)); (void) printf( "\tmetaslab %6llu offset %12llx spacemap %6llu free %5s\n", @@ -1337,6 +1347,9 @@ dump_dsl_dir(objset_t *os, uint64_t object, void *data time_t crtime; char nice[32]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (nice) >= NN_NUMBUF_SZ); + if (dd == NULL) return; @@ -1352,15 +1365,15 @@ dump_dsl_dir(objset_t *os, uint64_t object, void *data (u_longlong_t)dd->dd_origin_obj); (void) printf("\t\tchild_dir_zapobj = %llu\n", (u_longlong_t)dd->dd_child_dir_zapobj); - zdb_nicenum(dd->dd_used_bytes, nice); + zdb_nicenum(dd->dd_used_bytes, nice, sizeof (nice)); (void) printf("\t\tused_bytes = %s\n", nice); - zdb_nicenum(dd->dd_compressed_bytes, nice); + zdb_nicenum(dd->dd_compressed_bytes, nice, sizeof (nice)); (void) printf("\t\tcompressed_bytes = %s\n", nice); - zdb_nicenum(dd->dd_uncompressed_bytes, nice); + zdb_nicenum(dd->dd_uncompressed_bytes, nice, sizeof (nice)); (void) printf("\t\tuncompressed_bytes = %s\n", nice); - zdb_nicenum(dd->dd_quota, nice); + zdb_nicenum(dd->dd_quota, nice, sizeof (nice)); (void) printf("\t\tquota = %s\n", nice); - zdb_nicenum(dd->dd_reserved, nice); + zdb_nicenum(dd->dd_reserved, nice, sizeof (nice)); (void) printf("\t\treserved = %s\n", nice); (void) printf("\t\tprops_zapobj = %llu\n", (u_longlong_t)dd->dd_props_zapobj); @@ -1370,7 +1383,8 @@ dump_dsl_dir(objset_t *os, uint64_t object, void *data (u_longlong_t)dd->dd_flags); #define DO(which) \ - zdb_nicenum(dd->dd_used_breakdown[DD_USED_ ## which], nice); \ + zdb_nicenum(dd->dd_used_breakdown[DD_USED_ ## which], nice, \ + sizeof (nice)); \ (void) printf("\t\tused_breakdown[" #which "] = %s\n", nice) DO(HEAD); DO(SNAP); @@ -1389,15 +1403,22 @@ dump_dsl_dataset(objset_t *os, uint64_t object, void * char used[32], compressed[32], uncompressed[32], unique[32]; char blkbuf[BP_SPRINTF_LEN]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (used) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (compressed) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (uncompressed) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (unique) >= NN_NUMBUF_SZ); + if (ds == NULL) return; ASSERT(size == sizeof (*ds)); crtime = ds->ds_creation_time; - zdb_nicenum(ds->ds_referenced_bytes, used); - zdb_nicenum(ds->ds_compressed_bytes, compressed); - zdb_nicenum(ds->ds_uncompressed_bytes, uncompressed); - zdb_nicenum(ds->ds_unique_bytes, unique); + zdb_nicenum(ds->ds_referenced_bytes, used, sizeof (used)); + zdb_nicenum(ds->ds_compressed_bytes, compressed, sizeof (compressed)); + zdb_nicenum(ds->ds_uncompressed_bytes, uncompressed, + sizeof (uncompressed)); + zdb_nicenum(ds->ds_unique_bytes, unique, sizeof (unique)); snprintf_blkptr(blkbuf, sizeof (blkbuf), &ds->ds_bp); (void) printf("\t\tdir_obj = %llu\n", @@ -1456,12 +1477,15 @@ dump_bptree(objset_t *os, uint64_t obj, char *name) bptree_phys_t *bt; dmu_buf_t *db; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (bytes) >= NN_NUMBUF_SZ); + if (dump_opt['d'] < 3) return; VERIFY3U(0, ==, dmu_bonus_hold(os, obj, FTAG, &db)); bt = db->db_data; - zdb_nicenum(bt->bt_bytes, bytes); + zdb_nicenum(bt->bt_bytes, bytes, sizeof (bytes)); (void) printf("\n %s: %llu datasets, %s\n", name, (unsigned long long)(bt->bt_end - bt->bt_begin), bytes); dmu_buf_rele(db, FTAG); @@ -1493,13 +1517,18 @@ dump_full_bpobj(bpobj_t *bpo, char *name, int indent) char comp[32]; char uncomp[32]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (bytes) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (comp) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (uncomp) >= NN_NUMBUF_SZ); + if (dump_opt['d'] < 3) return; - zdb_nicenum(bpo->bpo_phys->bpo_bytes, bytes); + zdb_nicenum(bpo->bpo_phys->bpo_bytes, bytes, sizeof (bytes)); if (bpo->bpo_havesubobj && bpo->bpo_phys->bpo_subobjs != 0) { - zdb_nicenum(bpo->bpo_phys->bpo_comp, comp); - zdb_nicenum(bpo->bpo_phys->bpo_uncomp, uncomp); + zdb_nicenum(bpo->bpo_phys->bpo_comp, comp, sizeof (comp)); + zdb_nicenum(bpo->bpo_phys->bpo_uncomp, uncomp, sizeof (uncomp)); (void) printf(" %*s: object %llu, %llu local blkptrs, " "%llu subobjs in object %llu, %s (%s/%s comp)\n", indent * 8, name, @@ -1553,6 +1582,11 @@ dump_deadlist(dsl_deadlist_t *dl) char comp[32]; char uncomp[32]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (bytes) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (comp) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (uncomp) >= NN_NUMBUF_SZ); + if (dump_opt['d'] < 3) return; @@ -1561,9 +1595,9 @@ dump_deadlist(dsl_deadlist_t *dl) return; } - zdb_nicenum(dl->dl_phys->dl_used, bytes); - zdb_nicenum(dl->dl_phys->dl_comp, comp); - zdb_nicenum(dl->dl_phys->dl_uncomp, uncomp); + zdb_nicenum(dl->dl_phys->dl_used, bytes, sizeof (bytes)); + zdb_nicenum(dl->dl_phys->dl_comp, comp, sizeof (comp)); + zdb_nicenum(dl->dl_phys->dl_uncomp, uncomp, sizeof (uncomp)); (void) printf("\n Deadlist: %s (%s/%s comp)\n", bytes, comp, uncomp); @@ -1835,6 +1869,13 @@ dump_object(objset_t *os, uint64_t object, int verbosi char aux[50]; int error; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (iblk) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (dblk) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (lsize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (asize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (bonus_size) >= NN_NUMBUF_SZ); + if (*print_header) { (void) printf("\n%10s %3s %5s %5s %5s %5s %6s %s\n", "Object", "lvl", "iblk", "dblk", "dsize", "lsize", @@ -1855,11 +1896,11 @@ dump_object(objset_t *os, uint64_t object, int verbosi } dmu_object_info_from_dnode(dn, &doi); - zdb_nicenum(doi.doi_metadata_block_size, iblk); - zdb_nicenum(doi.doi_data_block_size, dblk); - zdb_nicenum(doi.doi_max_offset, lsize); - zdb_nicenum(doi.doi_physical_blocks_512 << 9, asize); - zdb_nicenum(doi.doi_bonus_size, bonus_size); + zdb_nicenum(doi.doi_metadata_block_size, iblk, sizeof (iblk)); + zdb_nicenum(doi.doi_data_block_size, dblk, sizeof (dblk)); + zdb_nicenum(doi.doi_max_offset, lsize, sizeof (lsize)); + zdb_nicenum(doi.doi_physical_blocks_512 << 9, asize, sizeof (asize)); + zdb_nicenum(doi.doi_bonus_size, bonus_size, sizeof (bonus_size)); (void) sprintf(fill, "%6.2f", 100.0 * doi.doi_fill_count * doi.doi_data_block_size / (object == 0 ? DNODES_PER_BLOCK : 1) / doi.doi_max_offset); @@ -1922,6 +1963,8 @@ dump_object(objset_t *os, uint64_t object, int verbosi for (;;) { char segsize[32]; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (segsize) >= NN_NUMBUF_SZ); error = dnode_next_offset(dn, 0, &start, minlvl, blkfill, 0); if (error) @@ -1929,7 +1972,7 @@ dump_object(objset_t *os, uint64_t object, int verbosi end = start; error = dnode_next_offset(dn, DNODE_FIND_HOLE, &end, minlvl, blkfill, 0); - zdb_nicenum(end - start, segsize); + zdb_nicenum(end - start, segsize, sizeof (segsize)); (void) printf("\t\tsegment [%016llx, %016llx)" " size %5s\n", (u_longlong_t)start, (u_longlong_t)end, segsize); @@ -1960,6 +2003,9 @@ dump_dir(objset_t *os) int print_header = 1; int i, error; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (numbuf) >= NN_NUMBUF_SZ); + dsl_pool_config_enter(dmu_objset_pool(os), FTAG); dmu_objset_fast_stat(os, &dds); dsl_pool_config_exit(dmu_objset_pool(os), FTAG); @@ -1978,7 +2024,7 @@ dump_dir(objset_t *os) ASSERT3U(usedobjs, ==, BP_GET_FILL(os->os_rootbp)); - zdb_nicenum(refdbytes, numbuf); + zdb_nicenum(refdbytes, numbuf, sizeof (numbuf)); if (verbosity >= 4) { (void) snprintf(blkbuf, sizeof (blkbuf), ", rootbp "); @@ -2511,6 +2557,9 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr int sec_remaining = (zcb->zcb_totalasize - bytes) / 1024 / kb_per_sec; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (buf) >= NN_NUMBUF_SZ); + zfs_nicenum(bytes, buf, sizeof (buf)); (void) fprintf(stderr, "\r%5s completed (%4dMB/s) " @@ -2843,6 +2892,14 @@ dump_block_stats(spa_t *spa) char avg[32], gang[32]; char *typename; + /* make sure nicenum has enough space */ + CTASSERT(sizeof (csize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (lsize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (psize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (asize) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (avg) >= NN_NUMBUF_SZ); + CTASSERT(sizeof (gang) >= NN_NUMBUF_SZ); + if (t < DMU_OT_NUMTYPES) typename = dmu_ot[t].ot_name; else @@ -2876,12 +2933,17 @@ dump_block_stats(spa_t *spa) zcb.zcb_type[ZB_TOTAL][t].zb_asize) continue; - zdb_nicenum(zb->zb_count, csize); - zdb_nicenum(zb->zb_lsize, lsize); - zdb_nicenum(zb->zb_psize, psize); - zdb_nicenum(zb->zb_asize, asize); - zdb_nicenum(zb->zb_asize / zb->zb_count, avg); - zdb_nicenum(zb->zb_gangs, gang); + zdb_nicenum(zb->zb_count, csize, + sizeof (csize)); + zdb_nicenum(zb->zb_lsize, lsize, + sizeof (lsize)); + zdb_nicenum(zb->zb_psize, psize, + sizeof (psize)); + zdb_nicenum(zb->zb_asize, asize, + sizeof (asize)); + zdb_nicenum(zb->zb_asize / zb->zb_count, avg, + sizeof (avg)); + zdb_nicenum(zb->zb_gangs, gang, sizeof (gang)); (void) printf("%6s\t%5s\t%5s\t%5s\t%5s" "\t%5.2f\t%6.2f\t", Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Nov 16 23:27:27 2017 (r325914) +++ stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Nov 16 23:36:19 2017 (r325915) @@ -25,6 +25,7 @@ * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Joyent, Inc. */ /* @@ -124,6 +125,7 @@ #include #include #include +#include static int ztest_fd_data = -1; static int ztest_fd_rand = -1; @@ -554,12 +556,13 @@ usage(boolean_t requested) { const ztest_shared_opts_t *zo = &ztest_opts_defaults; - char nice_vdev_size[10]; - char nice_gang_bang[10]; + char nice_vdev_size[NN_NUMBUF_SZ]; + char nice_gang_bang[NN_NUMBUF_SZ]; FILE *fp = requested ? stdout : stderr; - nicenum(zo->zo_vdev_size, nice_vdev_size); - nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang); + nicenum(zo->zo_vdev_size, nice_vdev_size, sizeof (nice_vdev_size)); + nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang, + sizeof (nice_gang_bang)); (void) fprintf(fp, "Usage: %s\n" "\t[-v vdevs (default: %llu)]\n" @@ -3150,10 +3153,10 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id) old_class_space, new_class_space); if (ztest_opts.zo_verbose >= 5) { - char oldnumbuf[6], newnumbuf[6]; + char oldnumbuf[NN_NUMBUF_SZ], newnumbuf[NN_NUMBUF_SZ]; - nicenum(old_class_space, oldnumbuf); - nicenum(new_class_space, newnumbuf); + nicenum(old_class_space, oldnumbuf, sizeof (oldnumbuf)); + nicenum(new_class_space, newnumbuf, sizeof (newnumbuf)); (void) printf("%s grew from %s to %s\n", spa->spa_name, oldnumbuf, newnumbuf); } @@ -6190,7 +6193,7 @@ main(int argc, char **argv) ztest_info_t *zi; ztest_shared_callstate_t *zc; char timebuf[100]; - char numbuf[6]; + char numbuf[NN_NUMBUF_SZ]; spa_t *spa; char *cmd; boolean_t hasalt; @@ -6327,7 +6330,7 @@ main(int argc, char **argv) now = MIN(now, zs->zs_proc_stop); print_time(zs->zs_proc_stop - now, timebuf); - nicenum(zs->zs_space, numbuf); + nicenum(zs->zs_space, numbuf, sizeof (numbuf)); (void) printf("Pass %3d, %8s, %3llu ENOSPC, " "%4.1f%% of %5s used, %3.0f%% done, %8s to go\n", Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Thu Nov 16 23:27:27 2017 (r325914) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Thu Nov 16 23:36:19 2017 (r325915) @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -575,42 +576,7 @@ zfs_strdup(libzfs_handle_t *hdl, const char *str) void zfs_nicenum(uint64_t num, char *buf, size_t buflen) { - uint64_t n = num; - int index = 0; - char u; - - while (n >= 1024) { - n /= 1024; - index++; - } - - u = " KMGTPE"[index]; - - if (index == 0) { - (void) snprintf(buf, buflen, "%llu", n); - } else if ((num & ((1ULL << 10 * index) - 1)) == 0) { - /* - * If this is an even multiple of the base, always display - * without any decimal precision. - */ - (void) snprintf(buf, buflen, "%llu%c", n, u); - } else { - /* - * We want to choose a precision that reflects the best choice - * for fitting in 5 characters. This can get rather tricky when - * we have numbers that are very close to an order of magnitude. - * For example, when displaying 10239 (which is really 9.999K), - * we want only a single place of precision for 10.0K. We could - * develop some complex heuristics for this, but it's much - * easier just to try each combination in turn. - */ - int i; - for (i = 2; i >= 0; i--) { - if (snprintf(buf, buflen, "%.*f%c", i, - (double)num / (1ULL << 10 * index), u) <= 5) - break; - } - } + nicenum(num, buf, buflen); } void Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Nov 16 23:27:27 2017 (r325914) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Nov 16 23:36:19 2017 (r325915) @@ -579,7 +579,7 @@ extern void kernel_init(int); extern void kernel_fini(void); struct spa; -extern void nicenum(uint64_t num, char *buf); +extern void nicenum(uint64_t num, char *buf, size_t); extern void show_pool_stats(struct spa *); typedef struct callb_cpr { Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/util.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/util.c Thu Nov 16 23:27:27 2017 (r325914) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/util.c Thu Nov 16 23:36:19 2017 (r325915) @@ -36,33 +36,6 @@ * Routines needed by more than one client of libzpool. */ -void -nicenum(uint64_t num, char *buf) -{ - uint64_t n = num; - int index = 0; - char u; - - while (n >= 1024) { - n = (n + (1024 / 2)) / 1024; /* Round up or down */ - index++; - } - - u = " KMGTPE"[index]; - - if (index == 0) { - (void) sprintf(buf, "%llu", (u_longlong_t)n); - } else if (n < 10 && (num & (num - 1)) != 0) { - (void) sprintf(buf, "%.2f%c", - (double)num / (1ULL << 10 * index), u); - } else if (n < 100 && (num & (num - 1)) != 0) { - (void) sprintf(buf, "%.1f%c", - (double)num / (1ULL << 10 * index), u); - } else { - (void) sprintf(buf, "%llu%c", (u_longlong_t)n, u); - } -} - static void show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent) { @@ -95,15 +68,17 @@ show_vdev_stats(const char *desc, const char *ctype, n sec = MAX(1, vs->vs_timestamp / NANOSEC); - nicenum(vs->vs_alloc, used); - nicenum(vs->vs_space - vs->vs_alloc, avail); - nicenum(vs->vs_ops[ZIO_TYPE_READ] / sec, rops); - nicenum(vs->vs_ops[ZIO_TYPE_WRITE] / sec, wops); - nicenum(vs->vs_bytes[ZIO_TYPE_READ] / sec, rbytes); - nicenum(vs->vs_bytes[ZIO_TYPE_WRITE] / sec, wbytes); - nicenum(vs->vs_read_errors, rerr); - nicenum(vs->vs_write_errors, werr); - nicenum(vs->vs_checksum_errors, cerr); + nicenum(vs->vs_alloc, used, sizeof (used)); + nicenum(vs->vs_space - vs->vs_alloc, avail, sizeof (avail)); + nicenum(vs->vs_ops[ZIO_TYPE_READ] / sec, rops, sizeof (rops)); + nicenum(vs->vs_ops[ZIO_TYPE_WRITE] / sec, wops, sizeof (wops)); + nicenum(vs->vs_bytes[ZIO_TYPE_READ] / sec, rbytes, + sizeof (rbytes)); + nicenum(vs->vs_bytes[ZIO_TYPE_WRITE] / sec, wbytes, + sizeof (wbytes)); + nicenum(vs->vs_read_errors, rerr, sizeof (rerr)); + nicenum(vs->vs_write_errors, werr, sizeof (werr)); + nicenum(vs->vs_checksum_errors, cerr, sizeof (cerr)); (void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n", indent, "", Modified: stable/10/cddl/lib/libzfs/Makefile ============================================================================== --- stable/10/cddl/lib/libzfs/Makefile Thu Nov 16 23:27:27 2017 (r325914) +++ stable/10/cddl/lib/libzfs/Makefile Thu Nov 16 23:36:19 2017 (r325915) @@ -4,6 +4,7 @@ .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils/common LIB= zfs DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ @@ -21,6 +22,8 @@ SRCS= deviceid.c \ zmount.c \ zone.c +SRCS+= nicenum.c + SRCS+= libzfs_changelist.c \ libzfs_compat.c \ libzfs_config.c \ @@ -59,5 +62,6 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libn CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils .include Modified: stable/10/cddl/lib/libzpool/Makefile ============================================================================== --- stable/10/cddl/lib/libzpool/Makefile Thu Nov 16 23:27:27 2017 (r325914) +++ stable/10/cddl/lib/libzpool/Makefile Thu Nov 16 23:36:19 2017 (r325915) @@ -23,6 +23,8 @@ ATOMIC_SRCS= opensolaris_atomic.c .endif # UNICODE_SRCS .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/unicode +# LIBCMDUTILS_SRCS +.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils/common LIB= zpool @@ -31,10 +33,11 @@ ZFS_SHARED_SRCS= ${ZFS_SHARED_OBJS:C/.o$/.c/} KERNEL_SRCS= kernel.c taskq.c util.c LIST_SRCS= list.c UNICODE_SRCS= u8_textprep.c +LIBCMDUTILS_SRCS=nicenum.c SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} \ ${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS} \ - ${UNICODE_SRCS} + ${UNICODE_SRCS} ${LIBCMDUTILS_SRCS} WARNS?= 0 CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris @@ -47,6 +50,7 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/comm CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils # XXX: pthread doesn't have mutex_owned() equivalent, so we need to look # into libthr private structures. That's sooo evil, but it's only for # ZFS debugging tools needs. Modified: stable/10/cddl/usr.bin/ztest/Makefile ============================================================================== --- stable/10/cddl/usr.bin/ztest/Makefile Thu Nov 16 23:27:27 2017 (r325914) +++ stable/10/cddl/usr.bin/ztest/Makefile Thu Nov 16 23:36:19 2017 (r325915) @@ -11,6 +11,7 @@ CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys Modified: stable/10/cddl/usr.sbin/zdb/Makefile ============================================================================== --- stable/10/cddl/usr.sbin/zdb/Makefile Thu Nov 16 23:27:27 2017 (r325914) +++ stable/10/cddl/usr.sbin/zdb/Makefile Thu Nov 16 23:36:19 2017 (r325915) @@ -12,6 +12,7 @@ CSTD= c99 CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common From owner-svn-src-stable@freebsd.org Fri Nov 17 00:38:02 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10303DEF090; Fri, 17 Nov 2017 00:38:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDF4372A65; Fri, 17 Nov 2017 00:38:01 +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 vAH0c03G001216; Fri, 17 Nov 2017 00:38:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH0c054001215; Fri, 17 Nov 2017 00:38:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201711170038.vAH0c054001215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 17 Nov 2017 00:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325916 - stable/11/sys/dev/vnic X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/vnic X-SVN-Commit-Revision: 325916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 00:38:02 -0000 Author: emaste Date: Fri Nov 17 00:38:00 2017 New Revision: 325916 URL: https://svnweb.freebsd.org/changeset/base/325916 Log: MFC r325683: vnic: apply BPF tap before passing packet to hardware Previously we passed tx packets to hardware via nicvf_tx_mbuf_locked and then to the BPF tap, with a possibly invalid mbuf which would result in a panic. PR: 223600 Discussed with: bz Sponsored by: The FreeBSD Foundation, Packet.net (hardware) Modified: stable/11/sys/dev/vnic/nicvf_queues.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vnic/nicvf_queues.c ============================================================================== --- stable/11/sys/dev/vnic/nicvf_queues.c Thu Nov 16 23:36:19 2017 (r325915) +++ stable/11/sys/dev/vnic/nicvf_queues.c Fri Nov 17 00:38:00 2017 (r325916) @@ -992,6 +992,9 @@ nicvf_xmit_locked(struct snd_queue *sq) err = 0; while ((next = drbr_peek(ifp, sq->br)) != NULL) { + /* Send a copy of the frame to the BPF listener */ + ETHER_BPF_MTAP(ifp, next); + err = nicvf_tx_mbuf_locked(sq, &next); if (err != 0) { if (next == NULL) @@ -1002,8 +1005,6 @@ nicvf_xmit_locked(struct snd_queue *sq) break; } drbr_advance(ifp, sq->br); - /* Send a copy of the frame to the BPF listener */ - ETHER_BPF_MTAP(ifp, next); } return (err); } From owner-svn-src-stable@freebsd.org Fri Nov 17 09:14:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A20ADBF2A2; Fri, 17 Nov 2017 09:14:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36A21806C8; Fri, 17 Nov 2017 09:14:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAH9EJRQ019232; Fri, 17 Nov 2017 09:14:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAH9EIKk019221; Fri, 17 Nov 2017 09:14:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711170914.vAH9EIKk019221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 17 Nov 2017 09:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325928 - in stable/11/share: colldef ctypedef monetdef msgdef numericdef X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in stable/11/share: colldef ctypedef monetdef msgdef numericdef X-SVN-Commit-Revision: 325928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 09:14:20 -0000 Author: bapt Date: Fri Nov 17 09:14:18 2017 New Revision: 325928 URL: https://svnweb.freebsd.org/changeset/base/325928 Log: MFC r325361: Update to CLDR 32 and Unicode 10 Relnotes: yes Added: stable/11/share/monetdef/it_CH.ISO8859-15.src - copied unchanged from r325361, head/share/monetdef/it_CH.ISO8859-15.src stable/11/share/msgdef/he_IL.UTF-8.src - copied unchanged from r325361, head/share/msgdef/he_IL.UTF-8.src stable/11/share/numericdef/it_CH.ISO8859-15.src - copied unchanged from r325361, head/share/numericdef/it_CH.ISO8859-15.src Deleted: stable/11/share/numericdef/fr_CH.ISO8859-15.src stable/11/share/numericdef/fr_CH.UTF-8.src Modified: stable/11/share/colldef/af_ZA.UTF-8.src stable/11/share/colldef/am_ET.UTF-8.src stable/11/share/colldef/ar_SA.UTF-8.src stable/11/share/colldef/be_BY.UTF-8.src stable/11/share/colldef/ca_AD.UTF-8.src stable/11/share/colldef/cs_CZ.ISO8859-2.src stable/11/share/colldef/cs_CZ.UTF-8.src stable/11/share/colldef/da_DK.ISO8859-1.src stable/11/share/colldef/da_DK.ISO8859-15.src stable/11/share/colldef/da_DK.UTF-8.src stable/11/share/colldef/el_GR.UTF-8.src stable/11/share/colldef/en_US.UTF-8.src stable/11/share/colldef/es_MX.UTF-8.src stable/11/share/colldef/et_EE.UTF-8.src stable/11/share/colldef/fi_FI.UTF-8.src stable/11/share/colldef/fr_CA.UTF-8.src stable/11/share/colldef/he_IL.UTF-8.src stable/11/share/colldef/hi_IN.UTF-8.src stable/11/share/colldef/hr_HR.ISO8859-2.src stable/11/share/colldef/hu_HU.ISO8859-2.src stable/11/share/colldef/hu_HU.UTF-8.src stable/11/share/colldef/hy_AM.UTF-8.src stable/11/share/colldef/is_IS.UTF-8.src stable/11/share/colldef/ja_JP.UTF-8.src stable/11/share/colldef/ja_JP.eucJP.src stable/11/share/colldef/kk_KZ.UTF-8.src stable/11/share/colldef/ko_KR.UTF-8.src stable/11/share/colldef/lt_LT.UTF-8.src stable/11/share/colldef/lv_LV.UTF-8.src stable/11/share/colldef/nb_NO.ISO8859-1.src stable/11/share/colldef/nb_NO.ISO8859-15.src stable/11/share/colldef/nn_NO.ISO8859-1.src stable/11/share/colldef/nn_NO.ISO8859-15.src stable/11/share/colldef/nn_NO.UTF-8.src stable/11/share/colldef/pl_PL.UTF-8.src stable/11/share/colldef/ro_RO.UTF-8.src stable/11/share/colldef/ru_RU.UTF-8.src stable/11/share/colldef/se_NO.UTF-8.src stable/11/share/colldef/sk_SK.ISO8859-2.src stable/11/share/colldef/sk_SK.UTF-8.src stable/11/share/colldef/sl_SI.UTF-8.src stable/11/share/colldef/sr_RS.ISO8859-2.src stable/11/share/colldef/sr_RS.ISO8859-5.src stable/11/share/colldef/sr_RS.UTF-8.src stable/11/share/colldef/sr_RS.UTF-8@latin.src stable/11/share/colldef/sv_SE.UTF-8.src stable/11/share/colldef/tr_TR.UTF-8.src stable/11/share/colldef/uk_UA.UTF-8.src stable/11/share/colldef/zh_CN.GB18030.src stable/11/share/colldef/zh_CN.GB2312.src stable/11/share/colldef/zh_CN.GBK.src stable/11/share/colldef/zh_CN.UTF-8.src stable/11/share/colldef/zh_CN.eucCN.src stable/11/share/colldef/zh_TW.Big5.src stable/11/share/colldef/zh_TW.UTF-8.src stable/11/share/ctypedef/Makefile stable/11/share/ctypedef/en_US.UTF-8.src stable/11/share/ctypedef/ja_JP.eucJP.src stable/11/share/monetdef/Makefile stable/11/share/monetdef/fr_CH.ISO8859-15.src stable/11/share/monetdef/fr_CH.UTF-8.src stable/11/share/monetdef/hy_AM.ARMSCII-8.src stable/11/share/monetdef/hy_AM.UTF-8.src stable/11/share/monetdef/it_CH.UTF-8.src stable/11/share/monetdef/pt_BR.UTF-8.src stable/11/share/monetdef/sl_SI.UTF-8.src stable/11/share/msgdef/Makefile stable/11/share/numericdef/Makefile stable/11/share/numericdef/it_CH.UTF-8.src Directory Properties: stable/11/ (props changed) Modified: stable/11/share/colldef/af_ZA.UTF-8.src ============================================================================== --- stable/11/share/colldef/af_ZA.UTF-8.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/af_ZA.UTF-8.src Fri Nov 17 09:14:18 2017 (r325928) @@ -71,9 +71,9 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -98,7 +98,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -561,9 +561,9 @@ order_start forward;forward;forward;forward - - - + + + @@ -588,7 +588,7 @@ order_start forward;forward;forward;forward - + @@ -1026,9 +1026,9 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -1053,7 +1053,7 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; @@ -1637,8 +1637,8 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;"";""; - ;"";""; + ;"";""; + ;"";""; "";"";""; "";"";""; "";"";""; Modified: stable/11/share/colldef/am_ET.UTF-8.src ============================================================================== --- stable/11/share/colldef/am_ET.UTF-8.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/am_ET.UTF-8.src Fri Nov 17 09:14:18 2017 (r325928) @@ -34,15 +34,15 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -76,7 +76,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -372,15 +372,15 @@ order_start forward;forward;forward;forward - - + - - - + + + + @@ -414,7 +414,7 @@ order_start forward;forward;forward;forward - + @@ -725,15 +725,15 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -771,7 +771,7 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; Modified: stable/11/share/colldef/ar_SA.UTF-8.src ============================================================================== --- stable/11/share/colldef/ar_SA.UTF-8.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/ar_SA.UTF-8.src Fri Nov 17 09:14:18 2017 (r325928) @@ -162,10 +162,10 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -198,8 +198,8 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -487,10 +487,10 @@ order_start forward;forward;forward;forward - - - - + + + + @@ -523,8 +523,8 @@ order_start forward;forward;forward;forward - - + + @@ -745,6 +745,7 @@ order_start forward;forward;forward;forward IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; @@ -906,10 +907,10 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -962,8 +963,8 @@ order_start forward;forward;forward;forward ;;; "";;""; "";;""; - ;;; - ;;; + ;;; + ;;; ;;; ;;; ;;; Modified: stable/11/share/colldef/be_BY.UTF-8.src ============================================================================== --- stable/11/share/colldef/be_BY.UTF-8.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/be_BY.UTF-8.src Fri Nov 17 09:14:18 2017 (r325928) @@ -46,9 +46,9 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -67,7 +67,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -77,7 +77,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -289,9 +289,9 @@ order_start forward;forward;forward;forward - - - + + + @@ -310,7 +310,7 @@ order_start forward;forward;forward;forward - + @@ -320,7 +320,7 @@ order_start forward;forward;forward;forward - + @@ -545,9 +545,9 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -565,7 +565,7 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; + ;;; ;;; ;;; "";;""; @@ -575,7 +575,7 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; Modified: stable/11/share/colldef/ca_AD.UTF-8.src ============================================================================== --- stable/11/share/colldef/ca_AD.UTF-8.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/ca_AD.UTF-8.src Fri Nov 17 09:14:18 2017 (r325928) @@ -70,9 +70,9 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -98,7 +98,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -561,9 +561,9 @@ order_start forward;forward;forward;forward - - - + + + @@ -589,7 +589,7 @@ order_start forward;forward;forward;forward - + @@ -1028,9 +1028,9 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -1056,7 +1056,7 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; @@ -1640,8 +1640,8 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;"";""; - ;"";""; + ;"";""; + ;"";""; "";"";""; "";"";""; "";"";""; Modified: stable/11/share/colldef/cs_CZ.ISO8859-2.src ============================================================================== --- stable/11/share/colldef/cs_CZ.ISO8859-2.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/cs_CZ.ISO8859-2.src Fri Nov 17 09:14:18 2017 (r325928) @@ -46,9 +46,9 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -85,8 +85,8 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -166,9 +166,9 @@ order_start forward;forward;forward;forward - - - + + + @@ -205,8 +205,8 @@ order_start forward;forward;forward;forward - - + + @@ -323,9 +323,9 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -362,8 +362,8 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; + ;;; + ;;; ;;; ;;; ;;; Modified: stable/11/share/colldef/cs_CZ.UTF-8.src ============================================================================== --- stable/11/share/colldef/cs_CZ.UTF-8.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/cs_CZ.UTF-8.src Fri Nov 17 09:14:18 2017 (r325928) @@ -107,9 +107,9 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -134,7 +134,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -605,9 +605,9 @@ order_start forward;forward;forward;forward - - - + + + @@ -632,7 +632,7 @@ order_start forward;forward;forward;forward - + @@ -1076,9 +1076,9 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -1103,7 +1103,7 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; @@ -1721,8 +1721,8 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;"";""; - ;"";""; + ;"";""; + ;"";""; "";"";""; "";"";""; "";"";""; Modified: stable/11/share/colldef/da_DK.ISO8859-1.src ============================================================================== --- stable/11/share/colldef/da_DK.ISO8859-1.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/da_DK.ISO8859-1.src Fri Nov 17 09:14:18 2017 (r325928) @@ -37,6 +37,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -55,7 +56,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -71,11 +71,11 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -118,11 +118,11 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -173,6 +173,7 @@ order_start forward;forward;forward;forward + @@ -191,7 +192,6 @@ order_start forward;forward;forward;forward - @@ -207,11 +207,11 @@ order_start forward;forward;forward;forward - - + - + + @@ -254,11 +254,11 @@ order_start forward;forward;forward;forward - - - - - + + + + + @@ -372,11 +372,11 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -418,11 +418,11 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -520,8 +520,8 @@ order_start forward;forward;forward;forward "";"";""; ;;; ;;; - "";"";""; - "";"";""; + "";"";""; + "";"";""; ;;; ;;; ;"";""; Modified: stable/11/share/colldef/da_DK.ISO8859-15.src ============================================================================== --- stable/11/share/colldef/da_DK.ISO8859-15.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/da_DK.ISO8859-15.src Fri Nov 17 09:14:18 2017 (r325928) @@ -37,6 +37,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -44,6 +45,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -54,7 +56,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -70,11 +71,11 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -112,11 +113,11 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -167,6 +168,7 @@ order_start forward;forward;forward;forward + @@ -174,6 +176,7 @@ order_start forward;forward;forward;forward + @@ -184,7 +187,6 @@ order_start forward;forward;forward;forward - @@ -200,11 +202,11 @@ order_start forward;forward;forward;forward - - + - + + @@ -242,11 +244,11 @@ order_start forward;forward;forward;forward - - - - - + + + + + @@ -360,11 +362,11 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -402,11 +404,11 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -490,6 +492,8 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; + "";"";""; + "";"";"";

;;;

;;;

;;; @@ -503,8 +507,8 @@ order_start forward;forward;forward;forward "";"";""; ;;; ;;; - "";"";""; - "";"";""; + "";"";""; + "";"";""; ;;; ;;; ;"";""; @@ -539,8 +543,6 @@ order_start forward;forward;forward;forward "";;""; "";;""; "";;""; - "";;""; - "";;""; "";;""; "";;""; "";;""; Modified: stable/11/share/colldef/da_DK.UTF-8.src ============================================================================== --- stable/11/share/colldef/da_DK.UTF-8.src Fri Nov 17 04:29:32 2017 (r325927) +++ stable/11/share/colldef/da_DK.UTF-8.src Fri Nov 17 09:14:18 2017 (r325928) @@ -108,6 +108,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -120,6 +121,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -132,7 +134,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -169,9 +170,9 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -196,7 +197,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -607,6 +608,7 @@ order_start forward;forward;forward;forward + @@ -619,6 +621,7 @@ order_start forward;forward;forward;forward + @@ -631,7 +634,6 @@ order_start forward;forward;forward;forward - @@ -668,9 +670,9 @@ order_start forward;forward;forward;forward - - - + + + @@ -695,7 +697,7 @@ order_start forward;forward;forward;forward - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Fri Nov 17 10:10:23 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFABCDC00A2; Fri, 17 Nov 2017 10:10:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6B781EEE; Fri, 17 Nov 2017 10:10:23 +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 vAHAAM4p040342; Fri, 17 Nov 2017 10:10:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHAAM8D040340; Fri, 17 Nov 2017 10:10:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711171010.vAHAAM8D040340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 17 Nov 2017 10:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325931 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 325931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 10:10:24 -0000 Author: avg Date: Fri Nov 17 10:10:22 2017 New Revision: 325931 URL: https://svnweb.freebsd.org/changeset/base/325931 Log: MFC r325610: MFV r325609: 7531 Assign correct flags to prefetched buffers Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Nov 17 09:33:29 2017 (r325930) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Nov 17 10:10:22 2017 (r325931) @@ -2373,6 +2373,10 @@ dbuf_prefetch_indirect_done(zio_t *zio, arc_buf_t *abu arc_flags_t iter_aflags = ARC_FLAG_NOWAIT; zbookmark_phys_t zb; + /* flag if L2ARC eligible, l2arc_noprefetch then decides */ + if (dpa->dpa_aflags & ARC_FLAG_L2CACHE) + iter_aflags |= ARC_FLAG_L2CACHE; + ASSERT3U(dpa->dpa_curlevel, ==, BP_GET_LEVEL(bp)); SET_BOOKMARK(&zb, dpa->dpa_zb.zb_objset, @@ -2482,6 +2486,10 @@ dbuf_prefetch(dnode_t *dn, int64_t level, uint64_t blk dpa->dpa_epbs = epbs; dpa->dpa_zio = pio; + /* flag if L2ARC eligible, l2arc_noprefetch then decides */ + if (DNODE_LEVEL_IS_L2CACHEABLE(dn, level)) + dpa->dpa_aflags |= ARC_FLAG_L2CACHE; + /* * If we have the indirect just above us, no need to do the asynchronous * prefetch chain; we'll just run the last step ourselves. If we're at @@ -2496,6 +2504,10 @@ dbuf_prefetch(dnode_t *dn, int64_t level, uint64_t blk } else { arc_flags_t iter_aflags = ARC_FLAG_NOWAIT; zbookmark_phys_t zb; + + /* flag if L2ARC eligible, l2arc_noprefetch then decides */ + if (DNODE_LEVEL_IS_L2CACHEABLE(dn, level)) + iter_aflags |= ARC_FLAG_L2CACHE; SET_BOOKMARK(&zb, ds != NULL ? ds->ds_object : DMU_META_OBJSET, dn->dn_object, curlevel, curblkid); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Fri Nov 17 09:33:29 2017 (r325930) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Fri Nov 17 10:10:22 2017 (r325931) @@ -347,6 +347,12 @@ boolean_t dbuf_is_metadata(dmu_buf_impl_t *db); (dbuf_is_metadata(_db) && \ ((_db)->db_objset->os_secondary_cache == ZFS_CACHE_METADATA))) +#define DNODE_LEVEL_IS_L2CACHEABLE(_dn, _level) \ + ((_dn)->dn_objset->os_secondary_cache == ZFS_CACHE_ALL || \ + (((_level) > 0 || \ + DMU_OT_IS_METADATA((_dn)->dn_handle->dnh_dnode->dn_type)) && \ + ((_dn)->dn_objset->os_secondary_cache == ZFS_CACHE_METADATA))) + #ifdef ZFS_DEBUG /* From owner-svn-src-stable@freebsd.org Fri Nov 17 10:13:25 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBD50DC02C6; Fri, 17 Nov 2017 10:13:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A911322DF; Fri, 17 Nov 2017 10:13:25 +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 vAHADOsf044379; Fri, 17 Nov 2017 10:13:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHADO2L044377; Fri, 17 Nov 2017 10:13:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711171013.vAHADO2L044377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 17 Nov 2017 10:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325932 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 325932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 10:13:26 -0000 Author: avg Date: Fri Nov 17 10:13:24 2017 New Revision: 325932 URL: https://svnweb.freebsd.org/changeset/base/325932 Log: MFC r325610: MFV r325609: 7531 Assign correct flags to prefetched buffers Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Nov 17 10:10:22 2017 (r325931) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Nov 17 10:13:24 2017 (r325932) @@ -2388,6 +2388,10 @@ dbuf_prefetch_indirect_done(zio_t *zio, arc_buf_t *abu arc_flags_t iter_aflags = ARC_FLAG_NOWAIT; zbookmark_phys_t zb; + /* flag if L2ARC eligible, l2arc_noprefetch then decides */ + if (dpa->dpa_aflags & ARC_FLAG_L2CACHE) + iter_aflags |= ARC_FLAG_L2CACHE; + ASSERT3U(dpa->dpa_curlevel, ==, BP_GET_LEVEL(bp)); SET_BOOKMARK(&zb, dpa->dpa_zb.zb_objset, @@ -2497,6 +2501,10 @@ dbuf_prefetch(dnode_t *dn, int64_t level, uint64_t blk dpa->dpa_epbs = epbs; dpa->dpa_zio = pio; + /* flag if L2ARC eligible, l2arc_noprefetch then decides */ + if (DNODE_LEVEL_IS_L2CACHEABLE(dn, level)) + dpa->dpa_aflags |= ARC_FLAG_L2CACHE; + /* * If we have the indirect just above us, no need to do the asynchronous * prefetch chain; we'll just run the last step ourselves. If we're at @@ -2511,6 +2519,10 @@ dbuf_prefetch(dnode_t *dn, int64_t level, uint64_t blk } else { arc_flags_t iter_aflags = ARC_FLAG_NOWAIT; zbookmark_phys_t zb; + + /* flag if L2ARC eligible, l2arc_noprefetch then decides */ + if (DNODE_LEVEL_IS_L2CACHEABLE(dn, level)) + iter_aflags |= ARC_FLAG_L2CACHE; SET_BOOKMARK(&zb, ds != NULL ? ds->ds_object : DMU_META_OBJSET, dn->dn_object, curlevel, curblkid); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Fri Nov 17 10:10:22 2017 (r325931) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Fri Nov 17 10:13:24 2017 (r325932) @@ -347,6 +347,12 @@ boolean_t dbuf_is_metadata(dmu_buf_impl_t *db); (dbuf_is_metadata(_db) && \ ((_db)->db_objset->os_secondary_cache == ZFS_CACHE_METADATA))) +#define DNODE_LEVEL_IS_L2CACHEABLE(_dn, _level) \ + ((_dn)->dn_objset->os_secondary_cache == ZFS_CACHE_ALL || \ + (((_level) > 0 || \ + DMU_OT_IS_METADATA((_dn)->dn_handle->dnh_dnode->dn_type)) && \ + ((_dn)->dn_objset->os_secondary_cache == ZFS_CACHE_METADATA))) + #ifdef ZFS_DEBUG /* From owner-svn-src-stable@freebsd.org Fri Nov 17 12:45:34 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E00FBDD92F2; Fri, 17 Nov 2017 12:45:34 +0000 (UTC) (envelope-from freebsd@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 91204656B3; Fri, 17 Nov 2017 12:45:34 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [78.138.80.135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id vAHCjVoZ006194; Fri, 17 Nov 2017 13:45:31 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 02505128; Fri, 17 Nov 2017 13:45:30 +0100 (CET) Message-ID: <5A0ED9EA.6010801@omnilan.de> Date: Fri, 17 Nov 2017 13:45:30 +0100 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Baptiste Daroussin CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r325928 - in stable/11/share: colldef ctypedef monetdef msgdef numericdef References: <201711170914.vAH9EIKk019221@repo.freebsd.org> In-Reply-To: <201711170914.vAH9EIKk019221@repo.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: ACL 129 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Fri, 17 Nov 2017 13:45:31 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 12:45:35 -0000 Bezüglich Baptiste Daroussin's Nachricht vom 17.11.2017 10:14 (localtime): > Author: bapt > Date: Fri Nov 17 09:14:18 2017 > New Revision: 325928 > URL: https://svnweb.freebsd.org/changeset/base/325928 > > Log: > MFC r325361: > > Update to CLDR 32 and Unicode 10 > > Relnotes: ye Hello, unfortunately installworld fails after this commit: ===> share/ctypedef (install) install -o root -g wheel -m 444 be_BY.CP1131.LC_CTYPE /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/locale/be_BY.CP1131/LC_CTYPE install -o root -g wheel -m 444 ca_IT.ISO8859-1.LC_CTYPE /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/locale/ca_IT.ISO8859-1/LC_CTYP E install -o root -g wheel -m 444 ca_IT.ISO8859-15.LC_CTYPE /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/locale/ca_IT.ISO8859-15/LC_CT YPE install -o root -g wheel -m 444 el_GR.ISO8859-7.LC_CTYPE /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/locale/el_GR.ISO8859-7/LC_CTYP E install -o root -g wheel -m 444 en_US.ISO8859-1.LC_CTYPE /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/locale/en_US.ISO8859-1/LC_CTYP E install -o root -g wheel -m 444 en_US.ISO8859-15.LC_CTYPE /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/locale/en_US.ISO8859-15/LC_CT YPE install -o root -g wheel -m 444 en_US.US-ASCII.LC_CTYPE /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/locale/en_US.US-ASCII/LC_CTYPE localedef -D -U -c -w /usr/local/share/deploy-tools/RELENG_11/src/share/ctypedef/../../tools/tools/locale/etc/final-maps/widths.txt -f /usr/local/share/deploy-t ools/RELENG_11/src/share/ctypedef/../../tools/tools/locale/etc/final-maps/map.UTF-8 -i /usr/local/share/deploy-tools/RELENG_11/src/share/ctypedef/en_US.UTF-8.sr c /usr/local/share/deploy-tools/obj-amd64/UNSPEC/usr/local/share/deploy-tools/RELENG_11/src/share/ctypedef/en_US.UTF-8 || true /usr/local/share/deploy-tools/RELENG_11/src/share/ctypedef/en_US.UTF-8.src: 3184: error: syntax error install -o root -g wheel -m 444 en_US.UTF-8.LC_CTYPE /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/locale/en_US.UTF-8/LC_CTYPE install: en_US.UTF-8.LC_CTYPE: No such file or directory *** Error code 71 Stop. make[11]: stopped in /usr/local/share/deploy-tools/RELENG_11/src/share/ctypedef *** Error code 1 Does jenkins only make buildworld target, not installworld? Local fallout?!? - never touched anything ctypedef related... Thanks, -harry From owner-svn-src-stable@freebsd.org Fri Nov 17 13:01:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 023CFDD98C6; Fri, 17 Nov 2017 13:01:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9307265F17; Fri, 17 Nov 2017 13:01:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHD1ukr012930; Fri, 17 Nov 2017 13:01:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHD1ujB012928; Fri, 17 Nov 2017 13:01:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201711171301.vAHD1ujB012928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 17 Nov 2017 13:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325933 - in stable/11/tools/tools/locale/etc: . final-maps X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in stable/11/tools/tools/locale/etc: . final-maps X-SVN-Commit-Revision: 325933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 13:01:58 -0000 Author: bapt Date: Fri Nov 17 13:01:56 2017 New Revision: 325933 URL: https://svnweb.freebsd.org/changeset/base/325933 Log: MFC: 325359 Upgrade to Unicode 10.0.0 Modified: stable/11/tools/tools/locale/etc/common.UTF-8.src stable/11/tools/tools/locale/etc/final-maps/map.UTF-8 Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/locale/etc/common.UTF-8.src ============================================================================== --- stable/11/tools/tools/locale/etc/common.UTF-8.src Fri Nov 17 10:13:24 2017 (r325932) +++ stable/11/tools/tools/locale/etc/common.UTF-8.src Fri Nov 17 13:01:56 2017 (r325933) @@ -3162,7 +3162,8 @@ alpha ;...;;/ ;/ ;...;;/ ;/ - + ;/ + graph ;...;;/ ;...;;/ ;/ @@ -3180,7 +3181,8 @@ graph ;...;;/ ;/ ;/ ;...;;/ - ;...; + ;...; +punct ********************************************************************** * 0x0A00 - 0x0A7F Gurmukhi @@ -3250,7 +3252,7 @@ alpha ;...;;/ ;/ ;...;;/ - + ;...; graph ;...;;/ ;...;;/ ;...;;/ @@ -3266,7 +3268,7 @@ graph ;...;;/ ;...;;/ ;...;;/ - + ;...; punct ********************************************************************** @@ -3433,7 +3435,7 @@ graph ;...;;...;;/ +alpha ;...;;/ ;...;;/ ;...;;/ ;...;;/ @@ -3445,11 +3447,10 @@ alpha ;...;;...;;/ ;...;;/ ;...; -graph ;...;;/ +graph ;...;;/ ;...;;/ ;...;;/ - ;...;;/ - ;...;;/ + ;...;;/ ;...;;/ ;...;;/ ;...;;/ Modified: stable/11/tools/tools/locale/etc/final-maps/map.UTF-8 ============================================================================== --- stable/11/tools/tools/locale/etc/final-maps/map.UTF-8 Fri Nov 17 10:13:24 2017 (r325932) +++ stable/11/tools/tools/locale/etc/final-maps/map.UTF-8 Fri Nov 17 13:01:56 2017 (r325933) @@ -2232,6 +2232,17 @@ CHARMAP \xE0\xA1\x9A \xE0\xA1\x9B \xE0\xA1\x9E + \xE0\xA1\xA0 + \xE0\xA1\xA1 + \xE0\xA1\xA2 + \xE0\xA1\xA3 + \xE0\xA1\xA4 + \xE0\xA1\xA5 + \xE0\xA1\xA6 + \xE0\xA1\xA7 + \xE0\xA1\xA8 + \xE0\xA1\xA9 + \xE0\xA1\xAA \xE0\xA2\xA0 \xE0\xA2\xA1 \xE0\xA2\xA2 @@ -2526,6 +2537,8 @@ CHARMAP \xE0\xA7\xB9 \xE0\xA7\xBA \xE0\xA7\xBB + \xE0\xA7\xBC + \xE0\xA7\xBD \xE0\xA8\x81 \xE0\xA8\x82 \xE0\xA8\x83 @@ -2690,6 +2703,12 @@ CHARMAP \xE0\xAB\xB0 \xE0\xAB\xB1 \xE0\xAB\xB9 + \xE0\xAB\xBA + \xE0\xAB\xBB + \xE0\xAB\xBC + \xE0\xAB\xBD + \xE0\xAB\xBE + \xE0\xAB\xBF \xE0\xAC\x81 \xE0\xAC\x82 \xE0\xAC\x83 @@ -3036,6 +3055,7 @@ CHARMAP \xE0\xB3\xAF \xE0\xB3\xB1 \xE0\xB3\xB2 + \xE0\xB4\x80 \xE0\xB4\x81 \xE0\xB4\x82 \xE0\xB4\x83 @@ -3091,6 +3111,8 @@ CHARMAP \xE0\xB4\xB8 \xE0\xB4\xB9 \xE0\xB4\xBA + \xE0\xB4\xBB + \xE0\xB4\xBC \xE0\xB4\xBD \xE0\xB4\xBE \xE0\xB4\xBF @@ -6573,6 +6595,7 @@ CHARMAP \xE1\xB3\xB4 \xE1\xB3\xB5 \xE1\xB3\xB6 + \xE1\xB3\xB7 \xE1\xB3\xB8 \xE1\xB3\xB9 \xE1\xB4\x80 @@ -6821,6 +6844,10 @@ CHARMAP \xE1\xB7\xB3 \xE1\xB7\xB4 \xE1\xB7\xB5 + \xE1\xB7\xB6 + \xE1\xB7\xB7 + \xE1\xB7\xB8 + \xE1\xB7\xB9 \xE1\xB7\xBB \xE1\xB7\xBC \xE1\xB7\xBD @@ -7499,6 +7526,7 @@ CHARMAP \xE2\x82\xBC \xE2\x82\xBD \xE2\x82\xBE + \xE2\x82\xBF \xE2\x83\x90 \xE2\x83\x91 \xE2\x83\x92 @@ -8295,6 +8323,7 @@ CHARMAP \xE2\x8F\xBC \xE2\x8F\xBD \xE2\x8F\xBE + \xE2\x8F\xBF \xE2\x90\x80 \xE2\x90\x81 \xE2\x90\x82 @@ -10243,6 +10272,7 @@ CHARMAP \xE2\xAF\x8F \xE2\xAF\x90 \xE2\xAF\x91 + \xE2\xAF\x92 \xE2\xAF\xAC \xE2\xAF\xAD \xE2\xAF\xAE @@ -10775,6 +10805,11 @@ CHARMAP \xE2\xB9\x82 \xE2\xB9\x83 \xE2\xB9\x84 + \xE2\xB9\x85 + \xE2\xB9\x86 + \xE2\xB9\x87 + \xE2\xB9\x88 + \xE2\xB9\x89 \xE2\xBA\x80 \xE2\xBA\x81 \xE2\xBA\x82 @@ -11410,6 +11445,7 @@ CHARMAP \xE3\x84\xAB \xE3\x84\xAC \xE3\x84\xAD + \xE3\x84\xAE \xE3\x84\xB1 \xE3\x84\xB2 \xE3\x84\xB3 @@ -39705,6 +39741,27 @@ CHARMAP \xE9\xBF\x93 \xE9\xBF\x94 \xE9\xBF\x95 + \xE9\xBF\x96 + \xE9\xBF\x97 + \xE9\xBF\x98 + \xE9\xBF\x99 + \xE9\xBF\x9A + \xE9\xBF\x9B + \xE9\xBF\x9C + \xE9\xBF\x9D + \xE9\xBF\x9E + \xE9\xBF\x9F + \xE9\xBF\xA0 + \xE9\xBF\xA1 + \xE9\xBF\xA2 + \xE9\xBF\xA3 + \xE9\xBF\xA4 + \xE9\xBF\xA5 + \xE9\xBF\xA6 + \xE9\xBF\xA7 + \xE9\xBF\xA8 + \xE9\xBF\xA9 + \xE9\xBF\xAA \xEA\x80\x80 \xEA\x80\x81 \xEA\x80\x82 @@ -62343,6 +62400,9 @@ CHARMAP \xF0\x90\x8C\xA1 \xF0\x90\x8C\xA2 \xF0\x90\x8C\xA3 + \xF0\x90\x8C\xAD + \xF0\x90\x8C\xAE + \xF0\x90\x8C\xAF \xF0\x90\x8C\xB0 \xF0\x90\x8C\xB1 \xF0\x90\x8C\xB2 @@ -65318,6 +65378,158 @@ CHARMAP \xF0\x91\xA3\xB1 \xF0\x91\xA3\xB2 \xF0\x91\xA3\xBF + \xF0\x91\xA8\x80 + \xF0\x91\xA8\x81 + \xF0\x91\xA8\x82 + \xF0\x91\xA8\x83 + \xF0\x91\xA8\x84 + \xF0\x91\xA8\x85 + \xF0\x91\xA8\x86 + \xF0\x91\xA8\x87 + \xF0\x91\xA8\x88 + \xF0\x91\xA8\x89 + \xF0\x91\xA8\x8A + \xF0\x91\xA8\x8B + \xF0\x91\xA8\x8C + \xF0\x91\xA8\x8D + \xF0\x91\xA8\x8E + \xF0\x91\xA8\x8F + \xF0\x91\xA8\x90 + \xF0\x91\xA8\x91 + \xF0\x91\xA8\x92 + \xF0\x91\xA8\x93 + \xF0\x91\xA8\x94 + \xF0\x91\xA8\x95 + \xF0\x91\xA8\x96 + \xF0\x91\xA8\x97 + \xF0\x91\xA8\x98 + \xF0\x91\xA8\x99 + \xF0\x91\xA8\x9A + \xF0\x91\xA8\x9B + \xF0\x91\xA8\x9C + \xF0\x91\xA8\x9D + \xF0\x91\xA8\x9E + \xF0\x91\xA8\x9F + \xF0\x91\xA8\xA0 + \xF0\x91\xA8\xA1 + \xF0\x91\xA8\xA2 + \xF0\x91\xA8\xA3 + \xF0\x91\xA8\xA4 + \xF0\x91\xA8\xA5 + \xF0\x91\xA8\xA6 + \xF0\x91\xA8\xA7 + \xF0\x91\xA8\xA8 + \xF0\x91\xA8\xA9 + \xF0\x91\xA8\xAA + \xF0\x91\xA8\xAB + \xF0\x91\xA8\xAC + \xF0\x91\xA8\xAD + \xF0\x91\xA8\xAE + \xF0\x91\xA8\xAF + \xF0\x91\xA8\xB0 + \xF0\x91\xA8\xB1 + \xF0\x91\xA8\xB2 + \xF0\x91\xA8\xB3 + \xF0\x91\xA8\xB4 + \xF0\x91\xA8\xB5 + \xF0\x91\xA8\xB6 + \xF0\x91\xA8\xB7 + \xF0\x91\xA8\xB8 + \xF0\x91\xA8\xB9 + \xF0\x91\xA8\xBA + \xF0\x91\xA8\xBB + \xF0\x91\xA8\xBC + \xF0\x91\xA8\xBD + \xF0\x91\xA8\xBE + \xF0\x91\xA8\xBF + \xF0\x91\xA9\x80 + \xF0\x91\xA9\x81 + \xF0\x91\xA9\x82 + \xF0\x91\xA9\x83 + \xF0\x91\xA9\x84 + \xF0\x91\xA9\x85 + \xF0\x91\xA9\x86 + \xF0\x91\xA9\x87 + \xF0\x91\xA9\x90 + \xF0\x91\xA9\x91 + \xF0\x91\xA9\x92 + \xF0\x91\xA9\x93 + \xF0\x91\xA9\x94 + \xF0\x91\xA9\x95 + \xF0\x91\xA9\x96 + \xF0\x91\xA9\x97 + \xF0\x91\xA9\x98 + \xF0\x91\xA9\x99 + \xF0\x91\xA9\x9A + \xF0\x91\xA9\x9B + \xF0\x91\xA9\x9C + \xF0\x91\xA9\x9D + \xF0\x91\xA9\x9E + \xF0\x91\xA9\x9F + \xF0\x91\xA9\xA0 + \xF0\x91\xA9\xA1 + \xF0\x91\xA9\xA2 + \xF0\x91\xA9\xA3 + \xF0\x91\xA9\xA4 + \xF0\x91\xA9\xA5 + \xF0\x91\xA9\xA6 + \xF0\x91\xA9\xA7 + \xF0\x91\xA9\xA8 + \xF0\x91\xA9\xA9 + \xF0\x91\xA9\xAA + \xF0\x91\xA9\xAB + \xF0\x91\xA9\xAC + \xF0\x91\xA9\xAD + \xF0\x91\xA9\xAE + \xF0\x91\xA9\xAF + \xF0\x91\xA9\xB0 + \xF0\x91\xA9\xB1 + \xF0\x91\xA9\xB2 + \xF0\x91\xA9\xB3 + \xF0\x91\xA9\xB4 + \xF0\x91\xA9\xB5 + \xF0\x91\xA9\xB6 + \xF0\x91\xA9\xB7 + \xF0\x91\xA9\xB8 + \xF0\x91\xA9\xB9 + \xF0\x91\xA9\xBA + \xF0\x91\xA9\xBB + \xF0\x91\xA9\xBC + \xF0\x91\xA9\xBD + \xF0\x91\xA9\xBE + \xF0\x91\xA9\xBF + \xF0\x91\xAA\x80 + \xF0\x91\xAA\x81 + \xF0\x91\xAA\x82 + \xF0\x91\xAA\x83 + \xF0\x91\xAA\x86 + \xF0\x91\xAA\x87 + \xF0\x91\xAA\x88 + \xF0\x91\xAA\x89 + \xF0\x91\xAA\x8A + \xF0\x91\xAA\x8B + \xF0\x91\xAA\x8C + \xF0\x91\xAA\x8D + \xF0\x91\xAA\x8E + \xF0\x91\xAA\x8F + \xF0\x91\xAA\x90 + \xF0\x91\xAA\x91 + \xF0\x91\xAA\x92 + \xF0\x91\xAA\x93 + \xF0\x91\xAA\x94 + \xF0\x91\xAA\x95 + \xF0\x91\xAA\x96 + \xF0\x91\xAA\x97 + \xF0\x91\xAA\x98 + \xF0\x91\xAA\x99 + \xF0\x91\xAA\x9A + \xF0\x91\xAA\x9B + \xF0\x91\xAA\x9C + \xF0\x91\xAA\x9E + \xF0\x91\xAA\x9F + \xF0\x91\xAA\xA0 + \xF0\x91\xAA\xA1 + \xF0\x91\xAA\xA2 \xF0\x91\xAB\x80 \xF0\x91\xAB\x81 \xF0\x91\xAB\x82 @@ -65540,6 +65752,81 @@ CHARMAP \xF0\x91\xB2\xB4 \xF0\x91\xB2\xB5 \xF0\x91\xB2\xB6 + \xF0\x91\xB4\x80 + \xF0\x91\xB4\x81 + \xF0\x91\xB4\x82 + \xF0\x91\xB4\x83 + \xF0\x91\xB4\x84 + \xF0\x91\xB4\x85 + \xF0\x91\xB4\x86 + \xF0\x91\xB4\x88 + \xF0\x91\xB4\x89 + \xF0\x91\xB4\x8B + \xF0\x91\xB4\x8C + \xF0\x91\xB4\x8D + \xF0\x91\xB4\x8E + \xF0\x91\xB4\x8F + \xF0\x91\xB4\x90 + \xF0\x91\xB4\x91 + \xF0\x91\xB4\x92 + \xF0\x91\xB4\x93 + \xF0\x91\xB4\x94 + \xF0\x91\xB4\x95 + \xF0\x91\xB4\x96 + \xF0\x91\xB4\x97 + \xF0\x91\xB4\x98 + \xF0\x91\xB4\x99 + \xF0\x91\xB4\x9A + \xF0\x91\xB4\x9B + \xF0\x91\xB4\x9C + \xF0\x91\xB4\x9D + \xF0\x91\xB4\x9E + \xF0\x91\xB4\x9F + \xF0\x91\xB4\xA0 + \xF0\x91\xB4\xA1 + \xF0\x91\xB4\xA2 + \xF0\x91\xB4\xA3 + \xF0\x91\xB4\xA4 + \xF0\x91\xB4\xA5 + \xF0\x91\xB4\xA6 + \xF0\x91\xB4\xA7 + \xF0\x91\xB4\xA8 + \xF0\x91\xB4\xA9 + \xF0\x91\xB4\xAA + \xF0\x91\xB4\xAB + \xF0\x91\xB4\xAC + \xF0\x91\xB4\xAD + \xF0\x91\xB4\xAE + \xF0\x91\xB4\xAF + \xF0\x91\xB4\xB0 + \xF0\x91\xB4\xB1 + \xF0\x91\xB4\xB2 + \xF0\x91\xB4\xB3 + \xF0\x91\xB4\xB4 + \xF0\x91\xB4\xB5 + \xF0\x91\xB4\xB6 + \xF0\x91\xB4\xBA + \xF0\x91\xB4\xBC + \xF0\x91\xB4\xBD + \xF0\x91\xB4\xBF + \xF0\x91\xB5\x80 + \xF0\x91\xB5\x81 + \xF0\x91\xB5\x82 + \xF0\x91\xB5\x83 + \xF0\x91\xB5\x84 + \xF0\x91\xB5\x85 + \xF0\x91\xB5\x86 + \xF0\x91\xB5\x87 + \xF0\x91\xB5\x90 + \xF0\x91\xB5\x91 + \xF0\x91\xB5\x92 + \xF0\x91\xB5\x93 + \xF0\x91\xB5\x94 + \xF0\x91\xB5\x95 + \xF0\x91\xB5\x96 + \xF0\x91\xB5\x97 + \xF0\x91\xB5\x98 + \xF0\x91\xB5\x99 \xF0\x92\x80\x80 \xF0\x92\x80\x81 \xF0\x92\x80\x82 @@ -69337,6 +69624,7 @@ CHARMAP \xF0\x96\xBE\x9E \xF0\x96\xBE\x9F \xF0\x96\xBF\xA0 + \xF0\x96\xBF\xA1 \xF0\x97\x80\x80 \xF0\x97\x80\x81 \xF0\x97\x80\x82 @@ -76219,6 +76507,687 @@ CHARMAP \xF0\x98\xAB\xB2 \xF0\x9B\x80\x80 \xF0\x9B\x80\x81 + \xF0\x9B\x80\x82 + \xF0\x9B\x80\x83 + \xF0\x9B\x80\x84 + \xF0\x9B\x80\x85 + \xF0\x9B\x80\x86 + \xF0\x9B\x80\x87 + \xF0\x9B\x80\x88 + \xF0\x9B\x80\x89 + \xF0\x9B\x80\x8A + \xF0\x9B\x80\x8B + \xF0\x9B\x80\x8C + \xF0\x9B\x80\x8D + \xF0\x9B\x80\x8E + \xF0\x9B\x80\x8F + \xF0\x9B\x80\x90 + \xF0\x9B\x80\x91 + \xF0\x9B\x80\x92 + \xF0\x9B\x80\x93 + \xF0\x9B\x80\x94 + \xF0\x9B\x80\x95 + \xF0\x9B\x80\x96 + \xF0\x9B\x80\x97 + \xF0\x9B\x80\x98 + \xF0\x9B\x80\x99 + \xF0\x9B\x80\x9A + \xF0\x9B\x80\x9B + \xF0\x9B\x80\x9C + \xF0\x9B\x80\x9D + \xF0\x9B\x80\x9E + \xF0\x9B\x80\x9F + \xF0\x9B\x80\xA0 + \xF0\x9B\x80\xA1 + \xF0\x9B\x80\xA2 + \xF0\x9B\x80\xA3 + \xF0\x9B\x80\xA4 + \xF0\x9B\x80\xA5 + \xF0\x9B\x80\xA6 + \xF0\x9B\x80\xA7 + \xF0\x9B\x80\xA8 + \xF0\x9B\x80\xA9 + \xF0\x9B\x80\xAA + \xF0\x9B\x80\xAB + \xF0\x9B\x80\xAC + \xF0\x9B\x80\xAD + \xF0\x9B\x80\xAE + \xF0\x9B\x80\xAF + \xF0\x9B\x80\xB0 + \xF0\x9B\x80\xB1 + \xF0\x9B\x80\xB2 + \xF0\x9B\x80\xB3 + \xF0\x9B\x80\xB4 + \xF0\x9B\x80\xB5 + \xF0\x9B\x80\xB6 + \xF0\x9B\x80\xB7 + \xF0\x9B\x80\xB8 + \xF0\x9B\x80\xB9 + \xF0\x9B\x80\xBA + \xF0\x9B\x80\xBB + \xF0\x9B\x80\xBC + \xF0\x9B\x80\xBD + \xF0\x9B\x80\xBE + \xF0\x9B\x80\xBF + \xF0\x9B\x81\x80 + \xF0\x9B\x81\x81 + \xF0\x9B\x81\x82 + \xF0\x9B\x81\x83 + \xF0\x9B\x81\x84 + \xF0\x9B\x81\x85 + \xF0\x9B\x81\x86 + \xF0\x9B\x81\x87 + \xF0\x9B\x81\x88 + \xF0\x9B\x81\x89 + \xF0\x9B\x81\x8A + \xF0\x9B\x81\x8B + \xF0\x9B\x81\x8C + \xF0\x9B\x81\x8D + \xF0\x9B\x81\x8E + \xF0\x9B\x81\x8F + \xF0\x9B\x81\x90 + \xF0\x9B\x81\x91 + \xF0\x9B\x81\x92 + \xF0\x9B\x81\x93 + \xF0\x9B\x81\x94 + \xF0\x9B\x81\x95 + \xF0\x9B\x81\x96 + \xF0\x9B\x81\x97 + \xF0\x9B\x81\x98 + \xF0\x9B\x81\x99 + \xF0\x9B\x81\x9A + \xF0\x9B\x81\x9B + \xF0\x9B\x81\x9C + \xF0\x9B\x81\x9D + \xF0\x9B\x81\x9E + \xF0\x9B\x81\x9F + \xF0\x9B\x81\xA0 + \xF0\x9B\x81\xA1 + \xF0\x9B\x81\xA2 + \xF0\x9B\x81\xA3 + \xF0\x9B\x81\xA4 + \xF0\x9B\x81\xA5 + \xF0\x9B\x81\xA6 + \xF0\x9B\x81\xA7 + \xF0\x9B\x81\xA8 + \xF0\x9B\x81\xA9 + \xF0\x9B\x81\xAA + \xF0\x9B\x81\xAB + \xF0\x9B\x81\xAC + \xF0\x9B\x81\xAD + \xF0\x9B\x81\xAE + \xF0\x9B\x81\xAF + \xF0\x9B\x81\xB0 + \xF0\x9B\x81\xB1 + \xF0\x9B\x81\xB2 + \xF0\x9B\x81\xB3 + \xF0\x9B\x81\xB4 + \xF0\x9B\x81\xB5 + \xF0\x9B\x81\xB6 + \xF0\x9B\x81\xB7 + \xF0\x9B\x81\xB8 + \xF0\x9B\x81\xB9 + \xF0\x9B\x81\xBA + \xF0\x9B\x81\xBB + \xF0\x9B\x81\xBC + \xF0\x9B\x81\xBD + \xF0\x9B\x81\xBE + \xF0\x9B\x81\xBF + \xF0\x9B\x82\x80 + \xF0\x9B\x82\x81 + \xF0\x9B\x82\x82 + \xF0\x9B\x82\x83 + \xF0\x9B\x82\x84 + \xF0\x9B\x82\x85 + \xF0\x9B\x82\x86 + \xF0\x9B\x82\x87 + \xF0\x9B\x82\x88 + \xF0\x9B\x82\x89 + \xF0\x9B\x82\x8A + \xF0\x9B\x82\x8B + \xF0\x9B\x82\x8C + \xF0\x9B\x82\x8D + \xF0\x9B\x82\x8E + \xF0\x9B\x82\x8F + \xF0\x9B\x82\x90 + \xF0\x9B\x82\x91 + \xF0\x9B\x82\x92 + \xF0\x9B\x82\x93 + \xF0\x9B\x82\x94 + \xF0\x9B\x82\x95 + \xF0\x9B\x82\x96 + \xF0\x9B\x82\x97 + \xF0\x9B\x82\x98 + \xF0\x9B\x82\x99 + \xF0\x9B\x82\x9A + \xF0\x9B\x82\x9B + \xF0\x9B\x82\x9C + \xF0\x9B\x82\x9D + \xF0\x9B\x82\x9E + \xF0\x9B\x82\x9F + \xF0\x9B\x82\xA0 + \xF0\x9B\x82\xA1 + \xF0\x9B\x82\xA2 + \xF0\x9B\x82\xA3 + \xF0\x9B\x82\xA4 + \xF0\x9B\x82\xA5 + \xF0\x9B\x82\xA6 + \xF0\x9B\x82\xA7 + \xF0\x9B\x82\xA8 + \xF0\x9B\x82\xA9 + \xF0\x9B\x82\xAA + \xF0\x9B\x82\xAB + \xF0\x9B\x82\xAC + \xF0\x9B\x82\xAD + \xF0\x9B\x82\xAE + \xF0\x9B\x82\xAF + \xF0\x9B\x82\xB0 + \xF0\x9B\x82\xB1 + \xF0\x9B\x82\xB2 + \xF0\x9B\x82\xB3 + \xF0\x9B\x82\xB4 + \xF0\x9B\x82\xB5 + \xF0\x9B\x82\xB6 + \xF0\x9B\x82\xB7 + \xF0\x9B\x82\xB8 + \xF0\x9B\x82\xB9 + \xF0\x9B\x82\xBA + \xF0\x9B\x82\xBB + \xF0\x9B\x82\xBC + \xF0\x9B\x82\xBD + \xF0\x9B\x82\xBE + \xF0\x9B\x82\xBF + \xF0\x9B\x83\x80 + \xF0\x9B\x83\x81 + \xF0\x9B\x83\x82 + \xF0\x9B\x83\x83 + \xF0\x9B\x83\x84 + \xF0\x9B\x83\x85 + \xF0\x9B\x83\x86 + \xF0\x9B\x83\x87 + \xF0\x9B\x83\x88 + \xF0\x9B\x83\x89 + \xF0\x9B\x83\x8A + \xF0\x9B\x83\x8B + \xF0\x9B\x83\x8C + \xF0\x9B\x83\x8D + \xF0\x9B\x83\x8E + \xF0\x9B\x83\x8F + \xF0\x9B\x83\x90 + \xF0\x9B\x83\x91 + \xF0\x9B\x83\x92 + \xF0\x9B\x83\x93 + \xF0\x9B\x83\x94 + \xF0\x9B\x83\x95 + \xF0\x9B\x83\x96 + \xF0\x9B\x83\x97 + \xF0\x9B\x83\x98 + \xF0\x9B\x83\x99 + \xF0\x9B\x83\x9A + \xF0\x9B\x83\x9B + \xF0\x9B\x83\x9C + \xF0\x9B\x83\x9D + \xF0\x9B\x83\x9E + \xF0\x9B\x83\x9F + \xF0\x9B\x83\xA0 + \xF0\x9B\x83\xA1 + \xF0\x9B\x83\xA2 + \xF0\x9B\x83\xA3 + \xF0\x9B\x83\xA4 + \xF0\x9B\x83\xA5 + \xF0\x9B\x83\xA6 + \xF0\x9B\x83\xA7 + \xF0\x9B\x83\xA8 + \xF0\x9B\x83\xA9 + \xF0\x9B\x83\xAA + \xF0\x9B\x83\xAB + \xF0\x9B\x83\xAC + \xF0\x9B\x83\xAD + \xF0\x9B\x83\xAE + \xF0\x9B\x83\xAF + \xF0\x9B\x83\xB0 + \xF0\x9B\x83\xB1 + \xF0\x9B\x83\xB2 + \xF0\x9B\x83\xB3 + \xF0\x9B\x83\xB4 + \xF0\x9B\x83\xB5 + \xF0\x9B\x83\xB6 + \xF0\x9B\x83\xB7 + \xF0\x9B\x83\xB8 + \xF0\x9B\x83\xB9 + \xF0\x9B\x83\xBA + \xF0\x9B\x83\xBB + \xF0\x9B\x83\xBC + \xF0\x9B\x83\xBD + \xF0\x9B\x83\xBE + \xF0\x9B\x83\xBF + \xF0\x9B\x84\x80 + \xF0\x9B\x84\x81 + \xF0\x9B\x84\x82 + \xF0\x9B\x84\x83 + \xF0\x9B\x84\x84 + \xF0\x9B\x84\x85 + \xF0\x9B\x84\x86 + \xF0\x9B\x84\x87 + \xF0\x9B\x84\x88 + \xF0\x9B\x84\x89 + \xF0\x9B\x84\x8A + \xF0\x9B\x84\x8B + \xF0\x9B\x84\x8C + \xF0\x9B\x84\x8D + \xF0\x9B\x84\x8E + \xF0\x9B\x84\x8F + \xF0\x9B\x84\x90 + \xF0\x9B\x84\x91 + \xF0\x9B\x84\x92 + \xF0\x9B\x84\x93 + \xF0\x9B\x84\x94 + \xF0\x9B\x84\x95 + \xF0\x9B\x84\x96 + \xF0\x9B\x84\x97 + \xF0\x9B\x84\x98 + \xF0\x9B\x84\x99 + \xF0\x9B\x84\x9A + \xF0\x9B\x84\x9B + \xF0\x9B\x84\x9C + \xF0\x9B\x84\x9D + \xF0\x9B\x84\x9E + \xF0\x9B\x85\xB0 + \xF0\x9B\x85\xB1 + \xF0\x9B\x85\xB2 + \xF0\x9B\x85\xB3 + \xF0\x9B\x85\xB4 + \xF0\x9B\x85\xB5 + \xF0\x9B\x85\xB6 + \xF0\x9B\x85\xB7 + \xF0\x9B\x85\xB8 + \xF0\x9B\x85\xB9 + \xF0\x9B\x85\xBA + \xF0\x9B\x85\xBB + \xF0\x9B\x85\xBC + \xF0\x9B\x85\xBD + \xF0\x9B\x85\xBE + \xF0\x9B\x85\xBF + \xF0\x9B\x86\x80 + \xF0\x9B\x86\x81 + \xF0\x9B\x86\x82 + \xF0\x9B\x86\x83 + \xF0\x9B\x86\x84 + \xF0\x9B\x86\x85 + \xF0\x9B\x86\x86 + \xF0\x9B\x86\x87 + \xF0\x9B\x86\x88 + \xF0\x9B\x86\x89 + \xF0\x9B\x86\x8A + \xF0\x9B\x86\x8B + \xF0\x9B\x86\x8C + \xF0\x9B\x86\x8D + \xF0\x9B\x86\x8E + \xF0\x9B\x86\x8F + \xF0\x9B\x86\x90 + \xF0\x9B\x86\x91 + \xF0\x9B\x86\x92 + \xF0\x9B\x86\x93 + \xF0\x9B\x86\x94 + \xF0\x9B\x86\x95 + \xF0\x9B\x86\x96 + \xF0\x9B\x86\x97 + \xF0\x9B\x86\x98 + \xF0\x9B\x86\x99 + \xF0\x9B\x86\x9A + \xF0\x9B\x86\x9B + \xF0\x9B\x86\x9C + \xF0\x9B\x86\x9D + \xF0\x9B\x86\x9E + \xF0\x9B\x86\x9F + \xF0\x9B\x86\xA0 + \xF0\x9B\x86\xA1 + \xF0\x9B\x86\xA2 + \xF0\x9B\x86\xA3 + \xF0\x9B\x86\xA4 + \xF0\x9B\x86\xA5 + \xF0\x9B\x86\xA6 + \xF0\x9B\x86\xA7 + \xF0\x9B\x86\xA8 + \xF0\x9B\x86\xA9 + \xF0\x9B\x86\xAA + \xF0\x9B\x86\xAB + \xF0\x9B\x86\xAC + \xF0\x9B\x86\xAD + \xF0\x9B\x86\xAE + \xF0\x9B\x86\xAF + \xF0\x9B\x86\xB0 + \xF0\x9B\x86\xB1 + \xF0\x9B\x86\xB2 + \xF0\x9B\x86\xB3 + \xF0\x9B\x86\xB4 + \xF0\x9B\x86\xB5 + \xF0\x9B\x86\xB6 + \xF0\x9B\x86\xB7 + \xF0\x9B\x86\xB8 + \xF0\x9B\x86\xB9 + \xF0\x9B\x86\xBA + \xF0\x9B\x86\xBB + \xF0\x9B\x86\xBC + \xF0\x9B\x86\xBD + \xF0\x9B\x86\xBE + \xF0\x9B\x86\xBF + \xF0\x9B\x87\x80 + \xF0\x9B\x87\x81 + \xF0\x9B\x87\x82 + \xF0\x9B\x87\x83 + \xF0\x9B\x87\x84 + \xF0\x9B\x87\x85 + \xF0\x9B\x87\x86 + \xF0\x9B\x87\x87 + \xF0\x9B\x87\x88 + \xF0\x9B\x87\x89 + \xF0\x9B\x87\x8A + \xF0\x9B\x87\x8B + \xF0\x9B\x87\x8C + \xF0\x9B\x87\x8D + \xF0\x9B\x87\x8E + \xF0\x9B\x87\x8F + \xF0\x9B\x87\x90 + \xF0\x9B\x87\x91 + \xF0\x9B\x87\x92 + \xF0\x9B\x87\x93 + \xF0\x9B\x87\x94 + \xF0\x9B\x87\x95 + \xF0\x9B\x87\x96 + \xF0\x9B\x87\x97 + \xF0\x9B\x87\x98 + \xF0\x9B\x87\x99 + \xF0\x9B\x87\x9A + \xF0\x9B\x87\x9B + \xF0\x9B\x87\x9C + \xF0\x9B\x87\x9D + \xF0\x9B\x87\x9E + \xF0\x9B\x87\x9F + \xF0\x9B\x87\xA0 + \xF0\x9B\x87\xA1 + \xF0\x9B\x87\xA2 + \xF0\x9B\x87\xA3 + \xF0\x9B\x87\xA4 + \xF0\x9B\x87\xA5 + \xF0\x9B\x87\xA6 + \xF0\x9B\x87\xA7 + \xF0\x9B\x87\xA8 + \xF0\x9B\x87\xA9 + \xF0\x9B\x87\xAA + \xF0\x9B\x87\xAB + \xF0\x9B\x87\xAC + \xF0\x9B\x87\xAD + \xF0\x9B\x87\xAE + \xF0\x9B\x87\xAF + \xF0\x9B\x87\xB0 + \xF0\x9B\x87\xB1 + \xF0\x9B\x87\xB2 + \xF0\x9B\x87\xB3 + \xF0\x9B\x87\xB4 + \xF0\x9B\x87\xB5 + \xF0\x9B\x87\xB6 + \xF0\x9B\x87\xB7 + \xF0\x9B\x87\xB8 + \xF0\x9B\x87\xB9 + \xF0\x9B\x87\xBA + \xF0\x9B\x87\xBB + \xF0\x9B\x87\xBC + \xF0\x9B\x87\xBD + \xF0\x9B\x87\xBE + \xF0\x9B\x87\xBF + \xF0\x9B\x88\x80 + \xF0\x9B\x88\x81 + \xF0\x9B\x88\x82 + \xF0\x9B\x88\x83 + \xF0\x9B\x88\x84 + \xF0\x9B\x88\x85 + \xF0\x9B\x88\x86 + \xF0\x9B\x88\x87 + \xF0\x9B\x88\x88 + \xF0\x9B\x88\x89 + \xF0\x9B\x88\x8A + \xF0\x9B\x88\x8B + \xF0\x9B\x88\x8C + \xF0\x9B\x88\x8D + \xF0\x9B\x88\x8E + \xF0\x9B\x88\x8F + \xF0\x9B\x88\x90 + \xF0\x9B\x88\x91 + \xF0\x9B\x88\x92 + \xF0\x9B\x88\x93 + \xF0\x9B\x88\x94 + \xF0\x9B\x88\x95 + \xF0\x9B\x88\x96 + \xF0\x9B\x88\x97 + \xF0\x9B\x88\x98 + \xF0\x9B\x88\x99 + \xF0\x9B\x88\x9A + \xF0\x9B\x88\x9B + \xF0\x9B\x88\x9C + \xF0\x9B\x88\x9D + \xF0\x9B\x88\x9E + \xF0\x9B\x88\x9F + \xF0\x9B\x88\xA0 + \xF0\x9B\x88\xA1 + \xF0\x9B\x88\xA2 + \xF0\x9B\x88\xA3 + \xF0\x9B\x88\xA4 + \xF0\x9B\x88\xA5 + \xF0\x9B\x88\xA6 + \xF0\x9B\x88\xA7 + \xF0\x9B\x88\xA8 + \xF0\x9B\x88\xA9 + \xF0\x9B\x88\xAA + \xF0\x9B\x88\xAB + \xF0\x9B\x88\xAC + \xF0\x9B\x88\xAD + \xF0\x9B\x88\xAE + \xF0\x9B\x88\xAF + \xF0\x9B\x88\xB0 + \xF0\x9B\x88\xB1 + \xF0\x9B\x88\xB2 + \xF0\x9B\x88\xB3 + \xF0\x9B\x88\xB4 + \xF0\x9B\x88\xB5 + \xF0\x9B\x88\xB6 + \xF0\x9B\x88\xB7 + \xF0\x9B\x88\xB8 + \xF0\x9B\x88\xB9 + \xF0\x9B\x88\xBA + \xF0\x9B\x88\xBB + \xF0\x9B\x88\xBC + \xF0\x9B\x88\xBD + \xF0\x9B\x88\xBE + \xF0\x9B\x88\xBF + \xF0\x9B\x89\x80 + \xF0\x9B\x89\x81 + \xF0\x9B\x89\x82 + \xF0\x9B\x89\x83 + \xF0\x9B\x89\x84 + \xF0\x9B\x89\x85 + \xF0\x9B\x89\x86 + \xF0\x9B\x89\x87 + \xF0\x9B\x89\x88 + \xF0\x9B\x89\x89 + \xF0\x9B\x89\x8A + \xF0\x9B\x89\x8B + \xF0\x9B\x89\x8C + \xF0\x9B\x89\x8D + \xF0\x9B\x89\x8E + \xF0\x9B\x89\x8F + \xF0\x9B\x89\x90 + \xF0\x9B\x89\x91 + \xF0\x9B\x89\x92 + \xF0\x9B\x89\x93 + \xF0\x9B\x89\x94 + \xF0\x9B\x89\x95 + \xF0\x9B\x89\x96 + \xF0\x9B\x89\x97 + \xF0\x9B\x89\x98 + \xF0\x9B\x89\x99 + \xF0\x9B\x89\x9A + \xF0\x9B\x89\x9B + \xF0\x9B\x89\x9C + \xF0\x9B\x89\x9D + \xF0\x9B\x89\x9E *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Fri Nov 17 13:02:57 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC170DD9B03; Fri, 17 Nov 2017 13:02:57 +0000 (UTC) (envelope-from bapt@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 CCBCC661FA; Fri, 17 Nov 2017 13:02:57 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 34791145EE; Fri, 17 Nov 2017 13:02:57 +0000 (UTC) Date: Fri, 17 Nov 2017 14:02:56 +0100 From: Baptiste Daroussin To: Harry Schmalzbauer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r325928 - in stable/11/share: colldef ctypedef monetdef msgdef numericdef Message-ID: <20171117130256.c2kg2q3l7xt6citl@ivaldir.net> References: <201711170914.vAH9EIKk019221@repo.freebsd.org> <5A0ED9EA.6010801@omnilan.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e7zvx4pu4pfveeal" Content-Disposition: inline In-Reply-To: <5A0ED9EA.6010801@omnilan.de> User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 13:02:58 -0000 --e7zvx4pu4pfveeal Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 17, 2017 at 01:45:30PM +0100, Harry Schmalzbauer wrote: > Bez=FCglich Baptiste Daroussin's Nachricht vom 17.11.2017 10:14 (localti= me): > > Author: bapt > > Date: Fri Nov 17 09:14:18 2017 > > New Revision: 325928 > > URL: https://svnweb.freebsd.org/changeset/base/325928 > > > > Log: > > MFC r325361: > > =20 > > Update to CLDR 32 and Unicode 10 > > =20 > > Relnotes: ye >=20 > Hello, >=20 > unfortunately installworld fails after this commit: > =3D=3D=3D> share/ctypedef (install) =20 > install -o root -g wheel -m 444 be_BY.CP1131.LC_CTYPE=20 > /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/loc= ale/be_BY.CP1131/LC_CTYPE =20 >=20 > install -o root -g wheel -m 444 ca_IT.ISO8859-1.LC_CTYPE=20 > /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/loc= ale/ca_IT.ISO8859-1/LC_CTYP > E =20 > install -o root -g wheel -m 444 ca_IT.ISO8859-15.LC_CTYPE=20 > /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/loc= ale/ca_IT.ISO8859-15/LC_CT > YPE =20 > install -o root -g wheel -m 444 el_GR.ISO8859-7.LC_CTYPE=20 > /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/loc= ale/el_GR.ISO8859-7/LC_CTYP > E =20 > install -o root -g wheel -m 444 en_US.ISO8859-1.LC_CTYPE=20 > /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/loc= ale/en_US.ISO8859-1/LC_CTYP > E =20 > install -o root -g wheel -m 444 en_US.ISO8859-15.LC_CTYPE=20 > /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/loc= ale/en_US.ISO8859-15/LC_CT > YPE =20 > install -o root -g wheel -m 444 en_US.US-ASCII.LC_CTYPE=20 > /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/loc= ale/en_US.US-ASCII/LC_CTYPE >=20 > localedef -D -U -c -w > /usr/local/share/deploy-tools/RELENG_11/src/share/ctypedef/../../tools/to= ols/locale/etc/final-maps/widths.txt=20 > -f /usr/local/share/deploy-t > ools/RELENG_11/src/share/ctypedef/../../tools/tools/locale/etc/final-maps= /map.UTF-8=20 > -i /usr/local/share/deploy-tools/RELENG_11/src/share/ctypedef/en_US.UTF-8= =2Esr > c > /usr/local/share/deploy-tools/obj-amd64/UNSPEC/usr/local/share/deploy-too= ls/RELENG_11/src/share/ctypedef/en_US.UTF-8=20 > || true =20 > /usr/local/share/deploy-tools/RELENG_11/src/share/ctypedef/en_US.UTF-8.sr= c: > 3184: error: syntax > error =20 > install -o root -g wheel -m 444 en_US.UTF-8.LC_CTYPE=20 > /usr/local/share/deploy-tools/UNSPEC-amd64/preed/masterroot/usr/share/loc= ale/en_US.UTF-8/LC_CTYPE =20 >=20 > install: en_US.UTF-8.LC_CTYPE: No such file or > directory =20 > *** Error code 71 =20 > =20 > Stop. = =20 >=20 > make[11]: stopped in > /usr/local/share/deploy-tools/RELENG_11/src/share/ctypedef = =20 >=20 > *** Error code 1 >=20 > Does jenkins only make buildworld target, not installworld? Local > fallout?!? - never touched anything ctypedef related... I forgot to commit a merge, which I have just done as in r325933. Can you confirm it fixes your problem? Best regards, Bapt --e7zvx4pu4pfveeal Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAloO3f4ACgkQY4mL3PG3 PlrjHw//T/Jzl+a8KVv+ok0/+4DNegPCfTdZwlAkqXlhjOk0dZn5QgbUlJvdo31M Mebo817Ms2FkFrvn5B9u4vieyeCIl0leWwCQYneqG9WzXtlGfGSvSnOSSM9jczNH XuffFK0CcQfXQNZh4MYXy7nQ5fOfl7GL+t2a411YPUcVQQclKwDXFDpcW0r48bxm RFhy4BK0JzvexHRJmJlirTjUzcmXh4cRKEOKAvK2aPsa84nUGSS/U2Q3bJ4RvjKg IA1F2HzJIfsLR4kvdfLwQ82gGveqQ9EjuPTOjUOk41EY9C20RWb5a0lHMDX+cmpB UgNNM9ekLXomqLAdQpS5kAfg7GvMMCBSwJTdkuEIm3pIgNi/0u+SSP2Dcxobb6Fg 6+3sT8nbmrqFgpQfeOKj7RPFVf4VPlBNOlCi1eICg3w1vqwT7/YMwiM5BD8WynuT atjUSvlkIrS1W2O61D2Js+BZMZKk+aLcTjuo1jdWKNI2MBCKwUwu6WnwiiY3bC1B G8p18lU60KkKosf/53iJLOfk+AbNvVj8TaJlibl9oyJm/OQ2GEQnyo9I3+FFi+SO 4CbmGXOhueH3zHTGN4F9ZEmUL4uWPGac95oYF/vziH3zWz+lBbz3ijDTlwLvlFtr HG9+qur9T3CuP0af8xknO3zWLibHzwbfIS1Fy1aiNsQt+w8InKI= =HM9r -----END PGP SIGNATURE----- --e7zvx4pu4pfveeal-- From owner-svn-src-stable@freebsd.org Fri Nov 17 15:27:53 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B945BDDCBB2; Fri, 17 Nov 2017 15:27:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84BE06A411; Fri, 17 Nov 2017 15:27:53 +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 vAHFRq4A074301; Fri, 17 Nov 2017 15:27:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFRqOu074300; Fri, 17 Nov 2017 15:27:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171527.vAHFRqOu074300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325936 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 325936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:27:53 -0000 Author: hselasky Date: Fri Nov 17 15:27:52 2017 New Revision: 325936 URL: https://svnweb.freebsd.org/changeset/base/325936 Log: MFC r325533: Make the dma_alloc_coherent() function in the LinuxKPI NULL safe with regard to the "dev" argument. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Modified: stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Fri Nov 17 15:23:42 2017 (r325935) +++ stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Fri Nov 17 15:27:52 2017 (r325936) @@ -127,7 +127,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dm size_t align; void *mem; - if (dev->dma_mask) + if (dev != NULL && dev->dma_mask) high = *dev->dma_mask; else high = BUS_SPACE_MAXADDR_32BIT; From owner-svn-src-stable@freebsd.org Fri Nov 17 15:30:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92909DDCC49; Fri, 17 Nov 2017 15:30:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 596E46A583; Fri, 17 Nov 2017 15:30:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHFUasK077594; Fri, 17 Nov 2017 15:30:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFUa9n077593; Fri, 17 Nov 2017 15:30:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171530.vAHFUa9n077593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:30:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325937 - stable/10/sys/ofed/include/linux X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/ofed/include/linux X-SVN-Commit-Revision: 325937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:30:37 -0000 Author: hselasky Date: Fri Nov 17 15:30:36 2017 New Revision: 325937 URL: https://svnweb.freebsd.org/changeset/base/325937 Log: MFC r325533: Make the dma_alloc_coherent() function in the LinuxKPI NULL safe with regard to the "dev" argument. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Modified: stable/10/sys/ofed/include/linux/dma-mapping.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/include/linux/dma-mapping.h ============================================================================== --- stable/10/sys/ofed/include/linux/dma-mapping.h Fri Nov 17 15:27:52 2017 (r325936) +++ stable/10/sys/ofed/include/linux/dma-mapping.h Fri Nov 17 15:30:36 2017 (r325937) @@ -126,7 +126,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dm size_t align; void *mem; - if (dev->dma_mask) + if (dev != NULL && dev->dma_mask) high = *dev->dma_mask; else high = BUS_SPACE_MAXADDR_32BIT; From owner-svn-src-stable@freebsd.org Fri Nov 17 15:32:29 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09946DDCE21; Fri, 17 Nov 2017 15:32:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C90426A909; Fri, 17 Nov 2017 15:32:28 +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 vAHFWRpT078624; Fri, 17 Nov 2017 15:32:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFWRSB078623; Fri, 17 Nov 2017 15:32:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171532.vAHFWRSB078623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r325938 - stable/9/sys/ofed/include/linux X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/9/sys/ofed/include/linux X-SVN-Commit-Revision: 325938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:32:29 -0000 Author: hselasky Date: Fri Nov 17 15:32:27 2017 New Revision: 325938 URL: https://svnweb.freebsd.org/changeset/base/325938 Log: MFC r325533: Make the dma_alloc_coherent() function in the LinuxKPI NULL safe with regard to the "dev" argument. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Modified: stable/9/sys/ofed/include/linux/dma-mapping.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/include/linux/dma-mapping.h ============================================================================== --- stable/9/sys/ofed/include/linux/dma-mapping.h Fri Nov 17 15:30:36 2017 (r325937) +++ stable/9/sys/ofed/include/linux/dma-mapping.h Fri Nov 17 15:32:27 2017 (r325938) @@ -126,7 +126,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dm size_t align; void *mem; - if (dev->dma_mask) + if (dev != NULL && dev->dma_mask) high = *dev->dma_mask; else high = BUS_SPACE_MAXADDR_32BIT; From owner-svn-src-stable@freebsd.org Fri Nov 17 15:37:38 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81307DDD04C; Fri, 17 Nov 2017 15:37:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BCBA6ABA2; Fri, 17 Nov 2017 15:37:38 +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 vAHFbbpn078894; Fri, 17 Nov 2017 15:37:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFbbAR078887; Fri, 17 Nov 2017 15:37:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171537.vAHFbbAR078887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325939 - in stable/11/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Commit-Revision: 325939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:37:38 -0000 Author: hselasky Date: Fri Nov 17 15:37:36 2017 New Revision: 325939 URL: https://svnweb.freebsd.org/changeset/base/325939 Log: MFC r325614: Multiple fixes for using IPv6 link-local addresses with RDMA in ibcore. 1) Fail to resolve RDMA address if rtalloc1() returns the loopback device, lo0, as the gateway interface. Currently RDMA loopback is not supported. 2) Use ip_dev_find() and ip6_dev_find() to lookup network interfaces with matching IPv4 and IPv6 addresses, respectivly. 3) In addr_resolve() make sure the "ifa" pointer is always set, also when the "ifp" is NULL. Else a NULL pointer access might happen trying to read from the "ifa" pointer later on. 4) In rdma_addr_find_dmac_by_grh() make sure the "bound_dev_if" field gets set properly instead of passing the scope ID through the IPv6 socket address structure. This is more in line with upstream OFED in Linux. 5) In rdma_addr_find_smac_by_sgid() there is no need to pass the scope ID for IPv6. Either it is stored in the "bound_dev_if" field or ip6_dev_find() will find the correct network device regardless of the scope ID. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/addr.c stable/11/sys/ofed/drivers/infiniband/core/cma.c stable/11/sys/ofed/drivers/infiniband/core/uverbs_cmd.c stable/11/sys/ofed/drivers/infiniband/core/verbs.c stable/11/sys/ofed/include/rdma/ib_addr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/addr.c Fri Nov 17 15:32:27 2017 (r325938) +++ stable/11/sys/ofed/drivers/infiniband/core/addr.c Fri Nov 17 15:37:36 2017 (r325939) @@ -110,14 +110,6 @@ int rdma_copy_addr(struct rdma_dev_addr *dev_addr, str } EXPORT_SYMBOL(rdma_copy_addr); -#define SCOPE_ID_CACHE(_scope_id, _addr6) do { \ - (_addr6)->sin6_addr.s6_addr[3] = (_scope_id); \ - (_addr6)->sin6_scope_id = 0; } while (0) - -#define SCOPE_ID_RESTORE(_scope_id, _addr6) do { \ - (_addr6)->sin6_scope_id = (_scope_id); \ - (_addr6)->sin6_addr.s6_addr[3] = 0; } while (0) - int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr, u16 *vlan_id) { @@ -149,34 +141,17 @@ int rdma_translate_ip(struct sockaddr *addr, struct rd #if defined(INET6) case AF_INET6: - { - struct sockaddr_in6 *sin6; - struct ifaddr *ifa; - in_port_t port; - uint32_t scope_id; + dev = ip6_dev_find(&init_net, + ((const struct sockaddr_in6 *)addr)->sin6_addr); - sin6 = (struct sockaddr_in6 *)addr; - port = sin6->sin6_port; - sin6->sin6_port = 0; - scope_id = sin6->sin6_scope_id; - if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr)) - SCOPE_ID_CACHE(scope_id, sin6); - CURVNET_SET_QUIET(&init_net); - ifa = ifa_ifwithaddr(addr); - CURVNET_RESTORE(); - sin6->sin6_port = port; - if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr)) - SCOPE_ID_RESTORE(scope_id, sin6); - if (ifa == NULL) { - ret = -ENODEV; - break; - } - ret = rdma_copy_addr(dev_addr, ifa->ifa_ifp, NULL); - if (vlan_id) - *vlan_id = rdma_vlan_dev_vlan_id(ifa->ifa_ifp); - ifa_free(ifa); - break; - } + if (!dev) + return ret; + + ret = rdma_copy_addr(dev_addr, dev, NULL); + if (vlan_id) + *vlan_id = rdma_vlan_dev_vlan_id(dev); + dev_put(dev); + break; #endif default: break; @@ -222,12 +197,9 @@ static int addr_resolve(struct sockaddr *src_in, struct ifaddr *ifa; struct ifnet *ifp; struct rtentry *rte; -#if defined(INET) || defined(INET6) - in_port_t port; +#if defined(INET6) + struct sockaddr_in6 dstv6_tmp; #endif -#ifdef INET6 - uint32_t scope_id; -#endif u_char edst[MAX_ADDR_LEN]; int multi; int bcast; @@ -247,11 +219,7 @@ static int addr_resolve(struct sockaddr *src_in, ifp = NULL; rte = NULL; ifa = NULL; - ifp = NULL; memset(edst, 0, sizeof(edst)); -#ifdef INET6 - scope_id = -1U; -#endif switch (dst_in->sa_family) { #ifdef INET @@ -263,29 +231,11 @@ static int addr_resolve(struct sockaddr *src_in, multi = 1; sin = (struct sockaddr_in *)src_in; if (sin->sin_addr.s_addr != INADDR_ANY) { - /* - * Address comparison fails if the port is set - * cache it here to be restored later. - */ - port = sin->sin_port; - sin->sin_port = 0; - memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); - - /* - * If we have a source address to use look it - * up first and verify that it is a local - * interface: - */ - CURVNET_SET_QUIET(&init_net); - ifa = ifa_ifwithaddr(src_in); - CURVNET_RESTORE(); - sin->sin_port = port; - if (ifa == NULL) { + ifp = ip_dev_find(&init_net, sin->sin_addr.s_addr); + if (ifp == NULL) { error = ENETUNREACH; goto done; } - ifp = ifa->ifa_ifp; - ifa_free(ifa); if (bcast || multi) goto mcast; } @@ -293,42 +243,26 @@ static int addr_resolve(struct sockaddr *src_in, #endif #ifdef INET6 case AF_INET6: + /* Make destination socket address writeable */ + dstv6_tmp = *(struct sockaddr_in6 *)dst_in; + dst_in = (struct sockaddr *)&dstv6_tmp; sin6 = (struct sockaddr_in6 *)dst_in; if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) multi = 1; - if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr)) { - /* - * The IB address comparison fails if the - * scope ID is set and not part of the addr: - */ - scope_id = sin6->sin6_scope_id; - if (scope_id < 256) - SCOPE_ID_CACHE(scope_id, sin6); - } + /* + * Make sure the scope ID gets embedded, else rtalloc1() will + * resolve to the loopback interface. + */ + sin6->sin6_scope_id = addr->bound_dev_if; + sa6_embedscope(sin6, 0); + sin6 = (struct sockaddr_in6 *)src_in; if (!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { - port = sin6->sin6_port; - sin6->sin6_port = 0; - if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr)) { - if (scope_id < 256) - SCOPE_ID_CACHE(scope_id, sin6); - } - - /* - * If we have a source address to use look it - * up first and verify that it is a local - * interface: - */ - CURVNET_SET_QUIET(&init_net); - ifa = ifa_ifwithaddr(src_in); - CURVNET_RESTORE(); - sin6->sin6_port = port; - if (ifa == NULL) { + ifp = ip6_dev_find(&init_net, sin6->sin6_addr); + if (ifp == NULL) { error = ENETUNREACH; goto done; } - ifp = ifa->ifa_ifp; - ifa_free(ifa); if (bcast || multi) goto mcast; } @@ -342,9 +276,13 @@ static int addr_resolve(struct sockaddr *src_in, * Make sure the route exists and has a valid link. */ rte = rtalloc1(dst_in, 1, 0); - if (rte == NULL || rte->rt_ifp == NULL || !RT_LINK_IS_UP(rte->rt_ifp)) { - if (rte) + if (rte == NULL || rte->rt_ifp == NULL || + RT_LINK_IS_UP(rte->rt_ifp) == 0 || + rte->rt_ifp == V_loif) { + if (rte != NULL) { RTFREE_LOCKED(rte); + rte = NULL; + } error = EHOSTUNREACH; goto done; } @@ -356,20 +294,27 @@ static int addr_resolve(struct sockaddr *src_in, * correct interface pointer and unlock the route. */ if (multi || bcast) { + /* rt_ifa holds the route answer source address */ + ifa = rte->rt_ifa; + if (ifp == NULL) { ifp = rte->rt_ifp; - /* rt_ifa holds the route answer source address */ - ifa = rte->rt_ifa; + dev_hold(ifp); } RTFREE_LOCKED(rte); - } else if (ifp && ifp != rte->rt_ifp) { + rte = NULL; + } else if (ifp != NULL && ifp != rte->rt_ifp) { RTFREE_LOCKED(rte); + rte = NULL; error = ENETUNREACH; goto done; } else { + /* rt_ifa holds the route answer source address */ + ifa = rte->rt_ifa; + if (ifp == NULL) { ifp = rte->rt_ifp; - ifa = rte->rt_ifa; + dev_hold(ifp); } RT_UNLOCK(rte); } @@ -418,23 +363,17 @@ mcast: error = EINVAL; break; } - RTFREE(rte); done: if (error == 0) error = -rdma_copy_addr(addr, ifp, edst); if (error == 0) memcpy(src_in, ifa->ifa_addr, ip_addr_size(ifa->ifa_addr)); -#ifdef INET6 - if (scope_id < 256) { - sin6 = (struct sockaddr_in6 *)src_in; - if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr)) - SCOPE_ID_RESTORE(scope_id, sin6); - sin6 = (struct sockaddr_in6 *)dst_in; - SCOPE_ID_RESTORE(scope_id, sin6); - } -#endif if (error == EWOULDBLOCK) error = ENODATA; + if (rte != NULL) + RTFREE(rte); + if (ifp != NULL) + dev_put(ifp); CURVNET_RESTORE(); return -error; @@ -567,7 +506,7 @@ static void resolve_cb(int status, struct sockaddr *sr } int rdma_addr_find_dmac_by_grh(union ib_gid *sgid, union ib_gid *dgid, u8 *dmac, - u16 *vlan_id, u32 scope_id) + u16 *vlan_id, int *if_index) { int ret = 0; struct rdma_dev_addr dev_addr; @@ -580,16 +519,17 @@ int rdma_addr_find_dmac_by_grh(union ib_gid *sgid, uni struct sockaddr_in6 _sockaddr_in6; } sgid_addr, dgid_addr; - - ret = rdma_gid2ip(&sgid_addr._sockaddr, sgid, scope_id); + ret = rdma_gid2ip(&sgid_addr._sockaddr, sgid); if (ret) return ret; - ret = rdma_gid2ip(&dgid_addr._sockaddr, dgid, scope_id); + ret = rdma_gid2ip(&dgid_addr._sockaddr, dgid); if (ret) return ret; memset(&dev_addr, 0, sizeof(dev_addr)); + if (if_index) + dev_addr.bound_dev_if = *if_index; ctx.addr = &dev_addr; init_completion(&ctx.comp); @@ -611,24 +551,8 @@ int rdma_addr_find_dmac_by_grh(union ib_gid *sgid, uni } EXPORT_SYMBOL(rdma_addr_find_dmac_by_grh); -u32 rdma_get_ipv6_scope_id(struct ib_device *ib, u8 port_num) +int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id) { -#ifdef INET6 - struct ifnet *ifp; - if (ib->get_netdev == NULL) - return (-1U); - ifp = ib->get_netdev(ib, port_num); - if (ifp == NULL) - return (-1U); - return (in6_getscopezone(ifp, IPV6_ADDR_SCOPE_LINKLOCAL)); -#else - return (-1U); -#endif -} - -int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id, - u32 scope_id) -{ int ret = 0; struct rdma_dev_addr dev_addr; union { @@ -637,7 +561,7 @@ int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 struct sockaddr_in6 _sockaddr_in6; } gid_addr; - ret = rdma_gid2ip(&gid_addr._sockaddr, sgid, scope_id); + ret = rdma_gid2ip(&gid_addr._sockaddr, sgid); if (ret) return ret; memset(&dev_addr, 0, sizeof(dev_addr)); Modified: stable/11/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:32:27 2017 (r325938) +++ stable/11/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:37:36 2017 (r325939) @@ -51,6 +51,9 @@ #include #include +#include +#include + #include #include #include @@ -687,11 +690,7 @@ static int cma_modify_qp_rtr(struct rdma_id_private *i == RDMA_TRANSPORT_IB && rdma_port_get_link_layer(id_priv->id.device, id_priv->id.port_num) == IB_LINK_LAYER_ETHERNET) { - u32 scope_id = rdma_get_ipv6_scope_id(id_priv->id.device, - id_priv->id.port_num); - - ret = rdma_addr_find_smac_by_sgid(&sgid, qp_attr.smac, NULL, - scope_id); + ret = rdma_addr_find_smac_by_sgid(&sgid, qp_attr.smac, NULL); if (ret) goto out; } @@ -1429,19 +1428,16 @@ static int cma_req_handler(struct ib_cm_id *cm_id, str goto err3; if (is_iboe && !is_sidr) { - u32 scope_id = rdma_get_ipv6_scope_id(cm_id->device, - ib_event->param.req_rcvd.port); - if (ib_event->param.req_rcvd.primary_path != NULL) rdma_addr_find_smac_by_sgid( &ib_event->param.req_rcvd.primary_path->sgid, - psmac, NULL, scope_id); + psmac, NULL); else psmac = NULL; if (ib_event->param.req_rcvd.alternate_path != NULL) rdma_addr_find_smac_by_sgid( &ib_event->param.req_rcvd.alternate_path->sgid, - palt_smac, NULL, scope_id); + palt_smac, NULL); else palt_smac = NULL; } @@ -2288,8 +2284,12 @@ static int cma_bind_addr(struct rdma_cm_id *id, struct src_addr->sa_family = dst_addr->sa_family; #ifdef INET6 if (dst_addr->sa_family == AF_INET6) { - ((struct sockaddr_in6 *) src_addr)->sin6_scope_id = - ((struct sockaddr_in6 *) dst_addr)->sin6_scope_id; + struct sockaddr_in6 *src_addr6 = (struct sockaddr_in6 *) src_addr; + struct sockaddr_in6 *dst_addr6 = (struct sockaddr_in6 *) dst_addr; + src_addr6->sin6_scope_id = dst_addr6->sin6_scope_id; + if (IN6_IS_SCOPE_LINKLOCAL(&dst_addr6->sin6_addr) || + IN6_IS_ADDR_MC_INTFACELOCAL(&dst_addr6->sin6_addr)) + id->route.addr.dev_addr.bound_dev_if = dst_addr6->sin6_scope_id; } #endif } @@ -2643,20 +2643,23 @@ out: static int cma_check_linklocal(struct rdma_dev_addr *dev_addr, struct sockaddr *addr) { -#if defined(INET6) - struct sockaddr_in6 *sin6; +#ifdef INET6 + struct sockaddr_in6 sin6; if (addr->sa_family != AF_INET6) return 0; - sin6 = (struct sockaddr_in6 *) addr; - if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr) && - !sin6->sin6_scope_id) - return -EINVAL; + sin6 = *(struct sockaddr_in6 *)addr; - dev_addr->bound_dev_if = sin6->sin6_scope_id; + if (IN6_IS_SCOPE_LINKLOCAL(&sin6.sin6_addr) || + IN6_IS_ADDR_MC_INTFACELOCAL(&sin6.sin6_addr)) { + /* check if IPv6 scope ID is set */ + if (sa6_recoverscope(&sin6) || sin6.sin6_scope_id == 0) + return -EINVAL; + dev_addr->bound_dev_if = sin6.sin6_scope_id; + } #endif - return 0; + return (0); } int rdma_listen(struct rdma_cm_id *id, int backlog) Modified: stable/11/sys/ofed/drivers/infiniband/core/uverbs_cmd.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Fri Nov 17 15:32:27 2017 (r325938) +++ stable/11/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Fri Nov 17 15:37:36 2017 (r325939) @@ -2094,13 +2094,23 @@ static ssize_t __uverbs_modify_qp(struct ib_uverbs_fil attr->smac); attr->vlan_id = rdma_get_vlan_id(&sgid); } else { + struct net_device *idev; + int if_index; + + if (qp->device->get_netdev != NULL && + (idev = qp->device->get_netdev(qp->device, port_num)) != NULL) + if_index = idev->if_index; + else + if_index = 0; + ret = rdma_addr_find_dmac_by_grh(&sgid, dgid, attr->ah_attr.dmac, - &attr->vlan_id, -1U); + &attr->vlan_id, + &if_index); if (ret) goto out; ret = rdma_addr_find_smac_by_sgid(&sgid, attr->smac, - NULL, -1U); + NULL); if (ret) goto out; } Modified: stable/11/sys/ofed/drivers/infiniband/core/verbs.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/verbs.c Fri Nov 17 15:32:27 2017 (r325938) +++ stable/11/sys/ofed/drivers/infiniband/core/verbs.c Fri Nov 17 15:37:36 2017 (r325939) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -207,10 +208,18 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po memcpy(ah_attr->dmac, wc->smac, ETH_ALEN); ah_attr->vlan_id = wc->vlan_id; } else { - u32 scope_id = rdma_get_ipv6_scope_id(device, port_num); + struct net_device *idev; + int if_index; + + if (device->get_netdev != NULL && + (idev = device->get_netdev(device, port_num)) != NULL) + if_index = idev->if_index; + else + if_index = 0; + ret = rdma_addr_find_dmac_by_grh(&grh->dgid, &grh->sgid, ah_attr->dmac, &ah_attr->vlan_id, - scope_id); + &if_index); if (ret) return ret; } Modified: stable/11/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- stable/11/sys/ofed/include/rdma/ib_addr.h Fri Nov 17 15:32:27 2017 (r325938) +++ stable/11/sys/ofed/include/rdma/ib_addr.h Fri Nov 17 15:37:36 2017 (r325939) @@ -105,10 +105,9 @@ void rdma_addr_cancel(struct rdma_dev_addr *addr); int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev, const unsigned char *dst_dev_addr); -int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id, - u32 scope_id); +int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id); int rdma_addr_find_dmac_by_grh(union ib_gid *sgid, union ib_gid *dgid, u8 *smac, - u16 *vlan_id, u32 scope_id); + u16 *vlan_id, int *if_index); static inline int ip_addr_size(struct sockaddr *addr) { @@ -171,8 +170,7 @@ static inline int rdma_ip2gid(struct sockaddr *addr, u } /* Important - sockaddr should be a union of sockaddr_in and sockaddr_in6 */ -static inline int rdma_gid2ip(struct sockaddr *out, union ib_gid *gid, - uint32_t scope_id) +static inline int rdma_gid2ip(struct sockaddr *out, union ib_gid *gid) { if (ipv6_addr_v4mapped((struct in6_addr *)gid)) { struct sockaddr_in *out_in = (struct sockaddr_in *)out; @@ -186,14 +184,9 @@ static inline int rdma_gid2ip(struct sockaddr *out, un out_in->sin6_len = sizeof(*out_in); out_in->sin6_family = AF_INET6; memcpy(&out_in->sin6_addr.s6_addr, gid->raw, 16); - if (scope_id < 256 && - IN6_IS_SCOPE_LINKLOCAL(&out_in->sin6_addr)) - out_in->sin6_scope_id = scope_id; } return 0; } - -u32 rdma_get_ipv6_scope_id(struct ib_device *ib, u8 port_num); /* This func is called only in loopback ip address (127.0.0.1) * case in which sgid is not relevant From owner-svn-src-stable@freebsd.org Fri Nov 17 15:43:31 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04921DDD2B1; Fri, 17 Nov 2017 15:43:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C04096AFC1; Fri, 17 Nov 2017 15:43:30 +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 vAHFhTCC082915; Fri, 17 Nov 2017 15:43:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFhT3H082912; Fri, 17 Nov 2017 15:43:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171543.vAHFhT3H082912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325940 - stable/10/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 325940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:43:31 -0000 Author: hselasky Date: Fri Nov 17 15:43:29 2017 New Revision: 325940 URL: https://svnweb.freebsd.org/changeset/base/325940 Log: MFC r325614: Multiple fixes for using IPv6 link-local addresses with RDMA. 1) Fail to resolve RDMA address if rtalloc1() returns the loopback device, lo0, as the gateway interface. 2) Use ip_dev_find() and ip6_dev_find() to lookup network interfaces with matching IPv4 and IPv6 addresses, respectivly. 3) In addr_resolve() make sure the "ifa" pointer is always set, also when the "ifp" is NULL. Else a NULL pointer access might happen trying to read from the "ifa" pointer later on. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/core/addr.c stable/10/sys/ofed/drivers/infiniband/core/cma.c stable/10/sys/ofed/drivers/infiniband/core/device.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/addr.c Fri Nov 17 15:37:36 2017 (r325939) +++ stable/10/sys/ofed/drivers/infiniband/core/addr.c Fri Nov 17 15:43:29 2017 (r325940) @@ -43,6 +43,8 @@ #include #include #include +#include +#include MODULE_AUTHOR("Sean Hefty"); @@ -89,19 +91,6 @@ void rdma_addr_unregister_client(struct rdma_addr_clie } EXPORT_SYMBOL(rdma_addr_unregister_client); -#ifdef __linux__ -int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev, - const unsigned char *dst_dev_addr) -{ - dev_addr->dev_type = dev->type; - memcpy(dev_addr->src_dev_addr, dev->dev_addr, MAX_ADDR_LEN); - memcpy(dev_addr->broadcast, dev->broadcast, MAX_ADDR_LEN); - if (dst_dev_addr) - memcpy(dev_addr->dst_dev_addr, dst_dev_addr, MAX_ADDR_LEN); - dev_addr->bound_dev_if = dev->ifindex; - return 0; -} -#else int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct ifnet *dev, const unsigned char *dst_dev_addr) { @@ -119,7 +108,6 @@ int rdma_copy_addr(struct rdma_dev_addr *dev_addr, str dev_addr->bound_dev_if = dev->if_index; return 0; } -#endif EXPORT_SYMBOL(rdma_copy_addr); int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr) @@ -139,7 +127,7 @@ int rdma_translate_ip(struct sockaddr *addr, struct rd switch (addr->sa_family) { #ifdef INET case AF_INET: - dev = ip_dev_find(NULL, + dev = ip_dev_find(&init_net, ((struct sockaddr_in *) addr)->sin_addr.s_addr); if (!dev) @@ -152,41 +140,18 @@ int rdma_translate_ip(struct sockaddr *addr, struct rd #if defined(INET6) case AF_INET6: -#ifdef __linux__ - read_lock(&dev_base_lock); - for_each_netdev(&init_net, dev) { - if (ipv6_chk_addr(&init_net, - &((struct sockaddr_in6 *) addr)->sin6_addr, - dev, 1)) { - ret = rdma_copy_addr(dev_addr, dev, NULL); - break; - } - } - read_unlock(&dev_base_lock); -#else - { - struct sockaddr_in6 *sin6; - struct ifaddr *ifa; - in_port_t port; + dev = ip6_dev_find(&init_net, + ((const struct sockaddr_in6 *)addr)->sin6_addr); - sin6 = (struct sockaddr_in6 *)addr; - port = sin6->sin6_port; - sin6->sin6_port = 0; - CURVNET_SET_QUIET(&init_net); - ifa = ifa_ifwithaddr(addr); - CURVNET_RESTORE(); - sin6->sin6_port = port; - if (ifa == NULL) { - ret = -ENODEV; - break; - } - ret = rdma_copy_addr(dev_addr, ifa->ifa_ifp, NULL); - ifa_free(ifa); - break; - } -#endif + if (!dev) + return ret; + + ret = rdma_copy_addr(dev_addr, dev, NULL); + dev_put(dev); break; #endif + default: + break; } return ret; } @@ -220,128 +185,7 @@ static void queue_req(struct addr_req *req) mutex_unlock(&lock); } -#ifdef __linux__ -static int addr4_resolve(struct sockaddr_in *src_in, - struct sockaddr_in *dst_in, - struct rdma_dev_addr *addr) -{ - __be32 src_ip = src_in->sin_addr.s_addr; - __be32 dst_ip = dst_in->sin_addr.s_addr; - struct flowi fl; - struct rtable *rt; - struct neighbour *neigh; - int ret; - - memset(&fl, 0, sizeof fl); - fl.nl_u.ip4_u.daddr = dst_ip; - fl.nl_u.ip4_u.saddr = src_ip; - fl.oif = addr->bound_dev_if; - - ret = ip_route_output_key(&init_net, &rt, &fl); - if (ret) - goto out; - - src_in->sin_family = AF_INET; - src_in->sin_addr.s_addr = rt->rt_src; - - if (rt->idev->dev->flags & IFF_LOOPBACK) { - ret = rdma_translate_ip((struct sockaddr *) dst_in, addr); - if (!ret) - memcpy(addr->dst_dev_addr, addr->src_dev_addr, MAX_ADDR_LEN); - goto put; - } - - /* If the device does ARP internally, return 'done' */ - if (rt->idev->dev->flags & IFF_NOARP) { - rdma_copy_addr(addr, rt->idev->dev, NULL); - goto put; - } - - neigh = neigh_lookup(&arp_tbl, &rt->rt_gateway, rt->idev->dev); - if (!neigh || !(neigh->nud_state & NUD_VALID)) { - neigh_event_send(rt->u.dst.neighbour, NULL); - ret = -ENODATA; - if (neigh) - goto release; - goto put; - } - - ret = rdma_copy_addr(addr, neigh->dev, neigh->ha); -release: - neigh_release(neigh); -put: - ip_rt_put(rt); -out: - return ret; -} - -#if defined(INET6) -static int addr6_resolve(struct sockaddr_in6 *src_in, - struct sockaddr_in6 *dst_in, - struct rdma_dev_addr *addr) -{ - struct flowi fl; - struct neighbour *neigh; - struct dst_entry *dst; - int ret; - - memset(&fl, 0, sizeof fl); - ipv6_addr_copy(&fl.fl6_dst, &dst_in->sin6_addr); - ipv6_addr_copy(&fl.fl6_src, &src_in->sin6_addr); - fl.oif = addr->bound_dev_if; - - dst = ip6_route_output(&init_net, NULL, &fl); - if ((ret = dst->error)) - goto put; - - if (ipv6_addr_any(&fl.fl6_src)) { - ret = ipv6_dev_get_saddr(&init_net, ip6_dst_idev(dst)->dev, - &fl.fl6_dst, 0, &fl.fl6_src); - if (ret) - goto put; - - src_in->sin6_family = AF_INET6; - ipv6_addr_copy(&src_in->sin6_addr, &fl.fl6_src); - } - - if (dst->dev->flags & IFF_LOOPBACK) { - ret = rdma_translate_ip((struct sockaddr *) dst_in, addr); - if (!ret) - memcpy(addr->dst_dev_addr, addr->src_dev_addr, MAX_ADDR_LEN); - goto put; - } - - /* If the device does ARP internally, return 'done' */ - if (dst->dev->flags & IFF_NOARP) { - ret = rdma_copy_addr(addr, dst->dev, NULL); - goto put; - } - - neigh = dst->neighbour; - if (!neigh || !(neigh->nud_state & NUD_VALID)) { - neigh_event_send(dst->neighbour, NULL); - ret = -ENODATA; - goto put; - } - - ret = rdma_copy_addr(addr, dst->dev, neigh->ha); -put: - dst_release(dst); - return ret; -} -#else -static int addr6_resolve(struct sockaddr_in6 *src_in, - struct sockaddr_in6 *dst_in, - struct rdma_dev_addr *addr) -{ - return -EADDRNOTAVAIL; -} -#endif - -#else -#include - -static int addr_resolve_sub(struct sockaddr *src_in, +static int addr_resolve(struct sockaddr *src_in, struct sockaddr *dst_in, struct rdma_dev_addr *addr) { @@ -349,16 +193,22 @@ static int addr_resolve_sub(struct sockaddr *src_in, struct sockaddr_in6 *sin6; struct ifaddr *ifa; struct ifnet *ifp; + struct rtentry *rte; #if defined(INET) || defined(INET6) struct llentry *lle; #endif - struct rtentry *rte; - in_port_t port; +#if defined(INET6) + struct sockaddr_in6 dstv6_tmp; + uint16_t vlan_id; +#endif u_char edst[MAX_ADDR_LEN]; int multi; int bcast; + int is_gw = 0; int error = 0; + CURVNET_SET_QUIET(&init_net); + /* * Determine whether the address is unicast, multicast, or broadcast * and whether the source interface is valid. @@ -369,6 +219,9 @@ static int addr_resolve_sub(struct sockaddr *src_in, sin6 = NULL; ifp = NULL; rte = NULL; + ifa = NULL; + memset(edst, 0, sizeof(edst)); + switch (dst_in->sa_family) { #ifdef INET case AF_INET: @@ -379,89 +232,118 @@ static int addr_resolve_sub(struct sockaddr *src_in, multi = 1; sin = (struct sockaddr_in *)src_in; if (sin->sin_addr.s_addr != INADDR_ANY) { - /* - * Address comparison fails if the port is set - * cache it here to be restored later. - */ - port = sin->sin_port; - sin->sin_port = 0; - memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); - } else - src_in = NULL; + ifp = ip_dev_find(&init_net, sin->sin_addr.s_addr); + if (ifp == NULL) { + error = ENETUNREACH; + goto done; + } + if (bcast || multi) + goto mcast; + } break; #endif #ifdef INET6 case AF_INET6: + /* Make destination socket address writeable */ + dstv6_tmp = *(struct sockaddr_in6 *)dst_in; + dst_in = (struct sockaddr *)&dstv6_tmp; sin6 = (struct sockaddr_in6 *)dst_in; if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) multi = 1; + /* + * Make sure the scope ID gets embedded, else rtalloc1() will + * resolve to the loopback interface. + */ + sin6->sin6_scope_id = addr->bound_dev_if; + sa6_embedscope(sin6, 0); + sin6 = (struct sockaddr_in6 *)src_in; if (!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { - port = sin6->sin6_port; - sin6->sin6_port = 0; - } else - src_in = NULL; + ifp = ip6_dev_find(&init_net, sin6->sin6_addr); + if (ifp == NULL) { + error = ENETUNREACH; + goto done; + } + if (bcast || multi) + goto mcast; + } break; #endif default: - return -EINVAL; + error = EINVAL; + goto done; } /* - * If we have a source address to use look it up first and verify - * that it is a local interface. - */ - if (src_in) { - ifa = ifa_ifwithaddr(src_in); - if (sin) - sin->sin_port = port; - if (sin6) - sin6->sin6_port = port; - if (ifa == NULL) - return -ENETUNREACH; - ifp = ifa->ifa_ifp; - ifa_free(ifa); - if (bcast || multi) - goto mcast; - } - /* * Make sure the route exists and has a valid link. */ rte = rtalloc1(dst_in, 1, 0); - if (rte == NULL || rte->rt_ifp == NULL || !RT_LINK_IS_UP(rte->rt_ifp)) { - if (rte) + if (rte == NULL || rte->rt_ifp == NULL || + RT_LINK_IS_UP(rte->rt_ifp) == 0 || + rte->rt_ifp == V_loif) { + if (rte != NULL) { RTFREE_LOCKED(rte); - return -EHOSTUNREACH; + rte = NULL; + } + error = EHOSTUNREACH; + goto done; } + if (rte->rt_flags & RTF_GATEWAY) + is_gw = 1; /* * If it's not multicast or broadcast and the route doesn't match the * requested interface return unreachable. Otherwise fetch the * correct interface pointer and unlock the route. */ if (multi || bcast) { - if (ifp == NULL) + /* rt_ifa holds the route answer source address */ + ifa = rte->rt_ifa; + + if (ifp == NULL) { ifp = rte->rt_ifp; + dev_hold(ifp); + } RTFREE_LOCKED(rte); - } else if (ifp && ifp != rte->rt_ifp) { + rte = NULL; + } else if (ifp != NULL && ifp != rte->rt_ifp) { RTFREE_LOCKED(rte); - return -ENETUNREACH; + rte = NULL; + error = ENETUNREACH; + goto done; } else { - if (ifp == NULL) + /* rt_ifa holds the route answer source address */ + ifa = rte->rt_ifa; + + if (ifp == NULL) { ifp = rte->rt_ifp; + dev_hold(ifp); + } RT_UNLOCK(rte); } +#if defined(INET) || defined(INET6) mcast: - if (bcast) - return rdma_copy_addr(addr, ifp, ifp->if_broadcastaddr); - if (multi) { - struct sockaddr *llsa; +#endif + if (bcast) { + memcpy(edst, ifp->if_broadcastaddr, ifp->if_addrlen); + goto done; + } else if (multi) { + struct sockaddr *llsa = NULL; + if (ifp->if_resolvemulti == NULL) { + error = EOPNOTSUPP; + goto done; + } error = ifp->if_resolvemulti(ifp, &llsa, dst_in); - if (error) - return -error; - error = rdma_copy_addr(addr, ifp, - LLADDR((struct sockaddr_dl *)llsa)); - free(llsa, M_IFMADDR); - return error; + if (error == 0) { + if (llsa == NULL) { + error = EAFNOSUPPORT; + goto done; + } else { + memcpy(edst, LLADDR((struct sockaddr_dl *)llsa), + ifp->if_addrlen); + free(llsa, M_IFMADDR); + } + } + goto done; } /* * Resolve the link local address. @@ -469,39 +351,34 @@ mcast: switch (dst_in->sa_family) { #ifdef INET case AF_INET: - error = arpresolve(ifp, rte, NULL, dst_in, edst, &lle); + error = arpresolve(ifp, rte, NULL, is_gw ? rte->rt_gateway : dst_in, edst, &lle); break; #endif #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, NULL, dst_in, (u_char *)edst, &lle); + error = toe_l2_resolve(NULL, ifp, is_gw ? rte->rt_gateway : dst_in, edst, &vlan_id); break; #endif default: - /* XXX: Shouldn't happen. */ - error = -EINVAL; + KASSERT(0, ("rdma_addr_resolve: Unreachable")); + error = EINVAL; + break; } - RTFREE(rte); +done: if (error == 0) - return rdma_copy_addr(addr, ifp, edst); + error = -rdma_copy_addr(addr, ifp, edst); + if (error == 0) + memcpy(src_in, ifa->ifa_addr, ip_addr_size(ifa->ifa_addr)); if (error == EWOULDBLOCK) - return -ENODATA; - return -error; -} + error = ENODATA; + if (rte != NULL) + RTFREE(rte); + if (ifp != NULL) + dev_put(ifp); -static int addr_resolve(struct sockaddr *src_in, - struct sockaddr *dst_in, - struct rdma_dev_addr *addr) -{ - int error; - - CURVNET_SET_QUIET(&init_net); - error = addr_resolve_sub(src_in, dst_in, addr); CURVNET_RESTORE(); - - return (error); + return -error; } -#endif static void process_req(struct work_struct *work) { @@ -616,27 +493,6 @@ void rdma_addr_cancel(struct rdma_dev_addr *addr) } EXPORT_SYMBOL(rdma_addr_cancel); -static int netevent_callback(struct notifier_block *self, unsigned long event, - void *ctx) -{ - if (event == NETEVENT_NEIGH_UPDATE) { -#ifdef __linux__ - struct neighbour *neigh = ctx; - - if (neigh->nud_state & NUD_VALID) { - set_timeout(jiffies); - } -#else - set_timeout(jiffies); -#endif - } - return 0; -} - -static struct notifier_block nb = { - .notifier_call = netevent_callback -}; - static int __init addr_init(void) { INIT_DELAYED_WORK(&work, process_req); @@ -644,13 +500,11 @@ static int __init addr_init(void) if (!addr_wq) return -ENOMEM; - register_netevent_notifier(&nb); return 0; } static void __exit addr_cleanup(void) { - unregister_netevent_notifier(&nb); destroy_workqueue(addr_wq); } Modified: stable/10/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:37:36 2017 (r325939) +++ stable/10/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:43:29 2017 (r325940) @@ -47,6 +47,9 @@ #include #include +#include +#include + #include #include #include @@ -852,11 +855,13 @@ static void cma_save_net_info(struct rdma_addr *addr, ip4->sin_family = listen4->sin_family; ip4->sin_addr.s_addr = dst->ip4.addr; ip4->sin_port = listen4->sin_port; + ip4->sin_len = sizeof(struct sockaddr_in); ip4 = (struct sockaddr_in *) &addr->dst_addr; ip4->sin_family = listen4->sin_family; ip4->sin_addr.s_addr = src->ip4.addr; ip4->sin_port = port; + ip4->sin_len = sizeof(struct sockaddr_in); break; case 6: listen6 = (struct sockaddr_in6 *) &listen_addr->src_addr; @@ -864,11 +869,15 @@ static void cma_save_net_info(struct rdma_addr *addr, ip6->sin6_family = listen6->sin6_family; ip6->sin6_addr = dst->ip6; ip6->sin6_port = listen6->sin6_port; + ip6->sin6_len = sizeof(struct sockaddr_in6); + ip6->sin6_scope_id = listen6->sin6_scope_id; ip6 = (struct sockaddr_in6 *) &addr->dst_addr; ip6->sin6_family = listen6->sin6_family; ip6->sin6_addr = src->ip6; ip6->sin6_port = port; + ip6->sin6_len = sizeof(struct sockaddr_in6); + ip6->sin6_scope_id = listen6->sin6_scope_id; break; default: break; @@ -2127,20 +2136,52 @@ static int cma_bind_addr(struct rdma_cm_id *id, struct { if (!src_addr || !src_addr->sa_family) { src_addr = (struct sockaddr *) &id->route.addr.src_addr; - if ((src_addr->sa_family = dst_addr->sa_family) == AF_INET6) { - ((struct sockaddr_in6 *) src_addr)->sin6_scope_id = - ((struct sockaddr_in6 *) dst_addr)->sin6_scope_id; + src_addr->sa_family = dst_addr->sa_family; +#ifdef INET6 + if (dst_addr->sa_family == AF_INET6) { + struct sockaddr_in6 *src_addr6 = (struct sockaddr_in6 *) src_addr; + struct sockaddr_in6 *dst_addr6 = (struct sockaddr_in6 *) dst_addr; + src_addr6->sin6_scope_id = dst_addr6->sin6_scope_id; + if (IN6_IS_SCOPE_LINKLOCAL(&dst_addr6->sin6_addr) || + IN6_IS_ADDR_MC_INTFACELOCAL(&dst_addr6->sin6_addr)) + id->route.addr.dev_addr.bound_dev_if = dst_addr6->sin6_scope_id; } +#endif } if (!cma_any_addr(src_addr)) return rdma_bind_addr(id, src_addr); else { - struct sockaddr_in addr_in; +#if defined(INET6) || defined(INET) + union { +#ifdef INET + struct sockaddr_in in; +#endif +#ifdef INET6 + struct sockaddr_in6 in6; +#endif + } addr; +#endif - memset(&addr_in, 0, sizeof addr_in); - addr_in.sin_family = dst_addr->sa_family; - addr_in.sin_len = sizeof addr_in; - return rdma_bind_addr(id, (struct sockaddr *) &addr_in); + switch(dst_addr->sa_family) { +#ifdef INET + case AF_INET: + memset(&addr.in, 0, sizeof(addr.in)); + addr.in.sin_family = dst_addr->sa_family; + addr.in.sin_len = sizeof(addr.in); + return rdma_bind_addr(id, (struct sockaddr *)&addr.in); +#endif +#ifdef INET6 + case AF_INET6: + memset(&addr.in6, 0, sizeof(addr.in6)); + addr.in6.sin6_family = dst_addr->sa_family; + addr.in6.sin6_len = sizeof(addr.in6); + addr.in6.sin6_scope_id = + ((struct sockaddr_in6 *)dst_addr)->sin6_scope_id; + return rdma_bind_addr(id, (struct sockaddr *)&addr.in6); +#endif + default: + return -EINVAL; + } } } @@ -2403,24 +2444,23 @@ out: static int cma_check_linklocal(struct rdma_dev_addr *dev_addr, struct sockaddr *addr) { -#if defined(INET6) - struct sockaddr_in6 *sin6; +#ifdef INET6 + struct sockaddr_in6 sin6; if (addr->sa_family != AF_INET6) return 0; - sin6 = (struct sockaddr_in6 *) addr; -#ifdef __linux__ - if ((ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) && -#else - if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr) && -#endif - !sin6->sin6_scope_id) - return -EINVAL; + sin6 = *(struct sockaddr_in6 *)addr; - dev_addr->bound_dev_if = sin6->sin6_scope_id; + if (IN6_IS_SCOPE_LINKLOCAL(&sin6.sin6_addr) || + IN6_IS_ADDR_MC_INTFACELOCAL(&sin6.sin6_addr)) { + /* check if IPv6 scope ID is set */ + if (sa6_recoverscope(&sin6) || sin6.sin6_scope_id == 0) + return -EINVAL; + dev_addr->bound_dev_if = sin6.sin6_scope_id; + } #endif - return 0; + return (0); } int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr) @@ -3287,17 +3327,10 @@ static int cma_netdev_change(struct net_device *ndev, dev_addr = &id_priv->id.route.addr.dev_addr; -#ifdef __linux__ - if ((dev_addr->bound_dev_if == ndev->ifindex) && - memcmp(dev_addr->src_dev_addr, ndev->dev_addr, ndev->addr_len)) { - printk(KERN_INFO "RDMA CM addr change for ndev %s used by id %p\n", - ndev->name, &id_priv->id); -#else if ((dev_addr->bound_dev_if == ndev->if_index) && memcmp(dev_addr->src_dev_addr, IF_LLADDR(ndev), ndev->if_addrlen)) { printk(KERN_INFO "RDMA CM addr change for ndev %s used by id %p\n", ndev->if_xname, &id_priv->id); -#endif work = kzalloc(sizeof *work, GFP_KERNEL); if (!work) return -ENOMEM; Modified: stable/10/sys/ofed/drivers/infiniband/core/device.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/device.c Fri Nov 17 15:37:36 2017 (r325939) +++ stable/10/sys/ofed/drivers/infiniband/core/device.c Fri Nov 17 15:43:29 2017 (r325940) @@ -767,3 +767,4 @@ static moduledata_t ibcore_mod = { MODULE_VERSION(ibcore, 1); DECLARE_MODULE(ibcore, ibcore_mod, SI_SUB_SMP, SI_ORDER_ANY); +MODULE_DEPEND(ibcore, toecore, 1, 1, 1); From owner-svn-src-stable@freebsd.org Fri Nov 17 15:45:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CFC0DDD33E; Fri, 17 Nov 2017 15:45:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAB8F6B12E; Fri, 17 Nov 2017 15:45:36 +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 vAHFjZGO083079; Fri, 17 Nov 2017 15:45:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFjZ7U083078; Fri, 17 Nov 2017 15:45:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171545.vAHFjZ7U083078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325941 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 325941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:45:37 -0000 Author: hselasky Date: Fri Nov 17 15:45:35 2017 New Revision: 325941 URL: https://svnweb.freebsd.org/changeset/base/325941 Log: MFC r325615: Make sure the IPv6 scope ID gets zeroed when exchanging CMA messages in ibcore. Else the IPv6 address matching might fail. This change adds support for both embedded and non-embedded IPv6 scope IDs when passing a IPv6 link-local socket address to RDMA. Prior to this change only global IPv6 addresses would work with RDMA. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/cma.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:43:29 2017 (r325940) +++ stable/11/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:45:35 2017 (r325941) @@ -911,6 +911,17 @@ static int cma_get_net_info(void *hdr, enum rdma_port_ return 0; } +static void cma_ip6_clear_scope_id(struct in6_addr *addr) +{ + /* make sure link local scope ID gets zeroed */ + if (IN6_IS_SCOPE_LINKLOCAL(addr) || + IN6_IS_ADDR_MC_INTFACELOCAL(addr)) { + /* use byte-access to be alignment safe */ + addr->s6_addr[2] = 0; + addr->s6_addr[3] = 0; + } +} + static void cma_save_net_info(struct rdma_addr *addr, struct rdma_addr *listen_addr, u8 ip_ver, __be16 port, @@ -942,6 +953,7 @@ static void cma_save_net_info(struct rdma_addr *addr, ip6->sin6_port = listen6->sin6_port; ip6->sin6_len = sizeof(struct sockaddr_in6); ip6->sin6_scope_id = listen6->sin6_scope_id; + cma_ip6_clear_scope_id(&ip6->sin6_addr); ip6 = (struct sockaddr_in6 *) &addr->dst_addr; ip6->sin6_family = listen6->sin6_family; @@ -949,6 +961,7 @@ static void cma_save_net_info(struct rdma_addr *addr, ip6->sin6_port = port; ip6->sin6_len = sizeof(struct sockaddr_in6); ip6->sin6_scope_id = listen6->sin6_scope_id; + cma_ip6_clear_scope_id(&ip6->sin6_addr); break; default: break; @@ -1512,6 +1525,7 @@ static void cma_set_compare_data(enum rdma_port_space break; case AF_INET6: ip6_addr = ((struct sockaddr_in6 *) addr)->sin6_addr; + cma_ip6_clear_scope_id(&ip6_addr); if (ps == RDMA_PS_SDP) { sdp_set_ip_ver(sdp_data, 6); sdp_set_ip_ver(sdp_mask, 0xF); @@ -2817,6 +2831,8 @@ static int cma_format_hdr(void *hdr, enum rdma_port_sp cma_hdr->src_addr.ip6 = src6->sin6_addr; cma_hdr->dst_addr.ip6 = dst6->sin6_addr; cma_hdr->port = src6->sin6_port; + cma_ip6_clear_scope_id(&cma_hdr->src_addr.ip6); + cma_ip6_clear_scope_id(&cma_hdr->dst_addr.ip6); break; } } From owner-svn-src-stable@freebsd.org Fri Nov 17 15:46:47 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B368DDD468; Fri, 17 Nov 2017 15:46:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05B286B3CD; Fri, 17 Nov 2017 15:46:46 +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 vAHFkkgt083224; Fri, 17 Nov 2017 15:46:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFkkwm083223; Fri, 17 Nov 2017 15:46:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171546.vAHFkkwm083223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325943 - stable/10/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 325943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:46:47 -0000 Author: hselasky Date: Fri Nov 17 15:46:45 2017 New Revision: 325943 URL: https://svnweb.freebsd.org/changeset/base/325943 Log: MFC r325615: Make sure the IPv6 scope ID gets zeroed when exchanging CMA messages in ibcore. Else the IPv6 address matching might fail. This change adds support for both embedded and non-embedded IPv6 scope IDs when passing a IPv6 link-local socket address to RDMA. Prior to this change only global IPv6 addresses would work with RDMA. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/core/cma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:46:19 2017 (r325942) +++ stable/10/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:46:45 2017 (r325943) @@ -840,6 +840,17 @@ static int cma_get_net_info(void *hdr, enum rdma_port_ return 0; } +static void cma_ip6_clear_scope_id(struct in6_addr *addr) +{ + /* make sure link local scope ID gets zeroed */ + if (IN6_IS_SCOPE_LINKLOCAL(addr) || + IN6_IS_ADDR_MC_INTFACELOCAL(addr)) { + /* use byte-access to be alignment safe */ + addr->s6_addr[2] = 0; + addr->s6_addr[3] = 0; + } +} + static void cma_save_net_info(struct rdma_addr *addr, struct rdma_addr *listen_addr, u8 ip_ver, __be16 port, @@ -871,6 +882,7 @@ static void cma_save_net_info(struct rdma_addr *addr, ip6->sin6_port = listen6->sin6_port; ip6->sin6_len = sizeof(struct sockaddr_in6); ip6->sin6_scope_id = listen6->sin6_scope_id; + cma_ip6_clear_scope_id(&ip6->sin6_addr); ip6 = (struct sockaddr_in6 *) &addr->dst_addr; ip6->sin6_family = listen6->sin6_family; @@ -878,6 +890,7 @@ static void cma_save_net_info(struct rdma_addr *addr, ip6->sin6_port = port; ip6->sin6_len = sizeof(struct sockaddr_in6); ip6->sin6_scope_id = listen6->sin6_scope_id; + cma_ip6_clear_scope_id(&ip6->sin6_addr); break; default: break; @@ -1370,6 +1383,7 @@ static void cma_set_compare_data(enum rdma_port_space #ifdef INET6 case AF_INET6: ip6_addr = ((struct sockaddr_in6 *) addr)->sin6_addr; + cma_ip6_clear_scope_id(&ip6_addr); if (ps == RDMA_PS_SDP) { sdp_set_ip_ver(sdp_data, 6); sdp_set_ip_ver(sdp_mask, 0xF); @@ -2563,6 +2577,8 @@ static int cma_format_hdr(void *hdr, enum rdma_port_sp cma_hdr->src_addr.ip6 = src6->sin6_addr; cma_hdr->dst_addr.ip6 = dst6->sin6_addr; cma_hdr->port = src6->sin6_port; + cma_ip6_clear_scope_id(&cma_hdr->src_addr.ip6); + cma_ip6_clear_scope_id(&cma_hdr->dst_addr.ip6); break; } } From owner-svn-src-stable@freebsd.org Fri Nov 17 15:48:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B556DDD5D7; Fri, 17 Nov 2017 15:48:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1696E6B5D9; Fri, 17 Nov 2017 15:48:05 +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 vAHFm4ar083341; Fri, 17 Nov 2017 15:48:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFm42H083340; Fri, 17 Nov 2017 15:48:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171548.vAHFm42H083340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325944 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 325944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:48:05 -0000 Author: hselasky Date: Fri Nov 17 15:48:03 2017 New Revision: 325944 URL: https://svnweb.freebsd.org/changeset/base/325944 Log: MFC r325616: Make sure sin_zero is zero in ibcore. Else socket address maching using bcmp() might fail. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/cma.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:46:45 2017 (r325943) +++ stable/11/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:48:03 2017 (r325944) @@ -938,12 +938,14 @@ static void cma_save_net_info(struct rdma_addr *addr, ip4->sin_addr.s_addr = dst->ip4.addr; ip4->sin_port = listen4->sin_port; ip4->sin_len = sizeof(struct sockaddr_in); + memset(ip4->sin_zero, 0, sizeof(ip4->sin_zero)); ip4 = (struct sockaddr_in *) &addr->dst_addr; ip4->sin_family = listen4->sin_family; ip4->sin_addr.s_addr = src->ip4.addr; ip4->sin_port = port; ip4->sin_len = sizeof(struct sockaddr_in); + memset(ip4->sin_zero, 0, sizeof(ip4->sin_zero)); break; case 6: listen6 = (struct sockaddr_in6 *) &listen_addr->src_addr; From owner-svn-src-stable@freebsd.org Fri Nov 17 15:49:02 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA133DDD66F; Fri, 17 Nov 2017 15:49:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 963EF6B73E; Fri, 17 Nov 2017 15:49:02 +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 vAHFn1lh083435; Fri, 17 Nov 2017 15:49:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFn1qY083434; Fri, 17 Nov 2017 15:49:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171549.vAHFn1qY083434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325945 - stable/10/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 325945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:49:02 -0000 Author: hselasky Date: Fri Nov 17 15:49:01 2017 New Revision: 325945 URL: https://svnweb.freebsd.org/changeset/base/325945 Log: MFC r325616: Make sure sin_zero is zero in ibcore. Else socket address maching using bcmp() might fail. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/core/cma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:48:03 2017 (r325944) +++ stable/10/sys/ofed/drivers/infiniband/core/cma.c Fri Nov 17 15:49:01 2017 (r325945) @@ -867,12 +867,14 @@ static void cma_save_net_info(struct rdma_addr *addr, ip4->sin_addr.s_addr = dst->ip4.addr; ip4->sin_port = listen4->sin_port; ip4->sin_len = sizeof(struct sockaddr_in); + memset(ip4->sin_zero, 0, sizeof(ip4->sin_zero)); ip4 = (struct sockaddr_in *) &addr->dst_addr; ip4->sin_family = listen4->sin_family; ip4->sin_addr.s_addr = src->ip4.addr; ip4->sin_port = port; ip4->sin_len = sizeof(struct sockaddr_in); + memset(ip4->sin_zero, 0, sizeof(ip4->sin_zero)); break; case 6: listen6 = (struct sockaddr_in6 *) &listen_addr->src_addr; From owner-svn-src-stable@freebsd.org Fri Nov 17 18:38:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A504DE09D8; Fri, 17 Nov 2017 18:38:03 +0000 (UTC) (envelope-from freebsd@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 6289270BFC; Fri, 17 Nov 2017 18:38:02 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (ezra.dcm1.omnilan.net [78.138.80.135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id vAHIc0rK009394; Fri, 17 Nov 2017 19:38:00 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 0CE2D1E9; Fri, 17 Nov 2017 19:38:00 +0100 (CET) Message-ID: <5A0F2C80.9070809@omnilan.de> Date: Fri, 17 Nov 2017 19:37:52 +0100 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Baptiste Daroussin CC: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r325928 - in stable/11/share: colldef ctypedef monetdef msgdef numericdef References: <201711170914.vAH9EIKk019221@repo.freebsd.org> <5A0ED9EA.6010801@omnilan.de> <20171117130256.c2kg2q3l7xt6citl@ivaldir.net> In-Reply-To: <20171117130256.c2kg2q3l7xt6citl@ivaldir.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: ACL 129 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Fri, 17 Nov 2017 19:38:00 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 18:38:03 -0000 Bezüglich Baptiste Daroussin's Nachricht vom 17.11.2017 14:02 (localtime): > On Fri, Nov 17, 2017 at 01:45:30PM +0100, Harry Schmalzbauer wrote: >> Bezüglich Baptiste Daroussin's Nachricht vom 17.11.2017 10:14 (localtime): >>> Author: bapt >>> Date: Fri Nov 17 09:14:18 2017 >>> New Revision: 325928 >>> URL: https://svnweb.freebsd.org/changeset/base/325928 >>> >>> Log: >>> MFC r325361: >>> >>> Update to CLDR 32 and Unicode 10 >>> >>> Relnotes: ye … > > I forgot to commit a merge, which I have just done as in r325933. Can you > confirm it fixes your problem? Fix confiremd! Thanks, -harry